Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for canonicalization (2.23 sec)

  1. src/test/java/jcifs/smb1/smb1/SmbFileTest.java

                assertEquals(url, smbFile.getPath());
            }
    
            @Test
            public void testGetCanonicalPath() throws MalformedURLException {
                // Test path canonicalization (removing . and ..)
                assertEquals("smb1://server/share/file.txt", new SmbFile("smb1://server/share/dir/../file.txt").getCanonicalPath());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/resources/web-platform-test-urltestdata.txt

    \#\u03B2  s:http h:example.org p:/foo/bar f:#\u03B2
    data:text/html,test#test  s:data p:text/html,test f:#test
    
    # Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html
    
    # Basic canonicalization, uppercase should be converted to lowercase
    file:c:\\foo\\bar.html file:///tmp/mock/path s:file p:/c:/foo/bar.html
    
    # Spaces should fail
    \s\sFile:c|////foo\\bar.html  s:file p:/c:////foo/bar.html
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java

        @Test
        @DisplayName("Canonical and UNC paths are computed and stable")
        void testCanonicalAndUNCPaths() {
            SmbResourceLocatorImpl a = locator("smb://server/share/dir/.././file");
            // canonicalization removes . and resolves ..
            assertEquals("/share/file", a.getURLPath());
            assertEquals("\\file", a.getUNCPath());
            assertEquals("share", a.getShare());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbResourceLocatorImpl.java

            final char[] in = this.url.getPath().toCharArray();
            final char[] out = new char[in.length];
            final int length = in.length;
            int prefixLen = 0, state = 0;
    
            /*
             * The canonicalization routine
             */
            for (int i = 0; i < length; i++) {
                switch (state) {
                case 0:
                    if (in[i] != '/') {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 23.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/SmbFile.java

                final char[] out = new char[in.length];
                final int length = in.length;
                int i, o, state;
                final int s;
    
                /* The canonicalization routine
                 */
                state = 0;
                o = 0;
                for (i = 0; i < length; i++) {
                    switch (state) {
                    case 0:
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 112.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/SmbResourceLocatorTest.java

                assertEquals("file.txt", loc.getName());
                assertEquals("smb://server/share/path/", loc.getParent());
                assertEquals(url, loc.getPath());
                // canonicalisation simply removes '.' and '..'
                assertEquals("smb://server/share/path/filetxt", loc.getCanonicalURL());
                assertFalse(loc.isRoot());
            }
        }
    
        @Nested
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8K bytes
    - Viewed (0)
Back to top