Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/webdav: windows & gvfs does not accept as a webdav server #10506

Closed
tgulacsi opened this issue Apr 20, 2015 · 16 comments
Closed

x/net/webdav: windows & gvfs does not accept as a webdav server #10506

tgulacsi opened this issue Apr 20, 2015 · 16 comments

Comments

@tgulacsi
Copy link
Contributor

As I see gvfs starts with a PROPFIND (I'm using litmus_test_server.go).

(By the way, at the moment go test fails, too).

I'm not a DAV expert at all, but I'd really like to have this work with Windows (for camlistore.org :)).
Where should I start? What's missing, or known lack of care?

@nigeltao nigeltao self-assigned this Apr 21, 2015
@nigeltao
Copy link
Contributor

That's odd. AFAIK litmus_test_server.go defines a PropSystem, and webdav.go should honor PROPFIND. Can you give a more detailed error message?

@nigeltao
Copy link
Contributor

Also, what's the "g" in "gvfs"? GNOME? If so, is GVFS happy if the litmus_test_server runs on Linux instead of Windows?

@nigeltao
Copy link
Contributor

Possibly related: https://go-review.googlesource.com/#/c/9193/ fixes #10517 on Windows.

@mattn
Copy link
Member

mattn commented Apr 22, 2015

test fail on my environment (windows7).

--- FAIL: TestWalkFS (0.00s)
        file_test.go:1009: infinite walk from root:
                got  ["/" "\\a" "\\e" "\\f"]
                want ["/" "/a" "/a/b" "/a/b/c" "/a/d" "/e" "/f"]
        file_test.go:1009: infinite walk from subdir:
                got  ["/a" "\\a\\b" "\\a\\d"]
                want ["/a" "/a/b" "/a/b/c" "/a/d"]
        file_test.go:1009: depth 1 walk from root:
                got  ["/" "\\a" "\\e" "\\f"]
                want ["/" "/a" "/e" "/f"]
        file_test.go:1009: depth 1 walk from subdir:
                got  ["/a/b" "\\a\\b\\c" "\\a\\b\\g"]
                want ["/a/b" "/a/b/c" "/a/b/g"]
        file_test.go:1009: infinite walk with skipped subdir:
                got  ["/" "\\a"]
                want ["/" "/a" "/a/b" "/a/b/c" "/a/b/z"]

however, i'm thinking this is an issue of test code because first argument of walkFn should be a local path. i think.

@nigeltao
Copy link
Contributor

That test failure is issue #10517, fixed by 9193, as previously mentioned.

@tgulacsi
Copy link
Contributor Author

I still see

--- FAIL: TestMultistatusWriter (0.01s)
xml_test.go:615: section 9.2.2 (failed dependency): XML body
got "<multistatus xmlns="DAV:" xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:" xmlns="DAV:"><href xmlns="DAV:" xmlns="DAV:">http://example.com/foo<propstat xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><Authors xmlns="http://ns.example.com/\" xmlns="http://ns.example.com/\"><status xmlns="DAV:" xmlns="DAV:">HTTP/1.1 424 Failed Dependency<propstat xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><Copyright-Owner xmlns="http://ns.example.com/\" xmlns="http://ns.example.com/\"><status xmlns="DAV:" xmlns="DAV:">HTTP/1.1 409 Conflict<responsedescription xmlns="DAV:" xmlns="DAV:">Copyright Owner cannot be deleted or altered."
want "<multistatus xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:"><href xmlns="DAV:">http://example.com/foo<propstat xmlns="DAV:"><prop xmlns="DAV:"><Authors xmlns="http://ns.example.com/\" xmlns="http://ns.example.com/\"><status xmlns="DAV:">HTTP/1.1 424 Failed Dependency<propstat xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><Copyright-Owner xmlns="http://ns.example.com/\" xmlns="http://ns.example.com/\"><status xmlns="DAV:">HTTP/1.1 409 Conflict<responsedescription xmlns="DAV:">Copyright Owner cannot be deleted or altered."
xml_test.go:615: section 9.6.2 (lock-token-submitted): XML body
got "<multistatus xmlns="DAV:" xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:" xmlns="DAV:"><href xmlns="DAV:" xmlns="DAV:">http://example.com/foo<status xmlns="DAV:" xmlns="DAV:">HTTP/1.1 423 Locked<error xmlns="DAV:" xmlns="DAV:"><lock-token-submitted xmlns="DAV:" xmlns="DAV:">"
want "<multistatus xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:"><href xmlns="DAV:">http://example.com/foo<status xmlns="DAV:">HTTP/1.1 423 Locked<error xmlns="DAV:"><lock-token-submitted xmlns="DAV:" xmlns="DAV:">"
xml_test.go:615: section 9.1.3: XML body
got "<multistatus xmlns="DAV:" xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:" xmlns="DAV:"><href xmlns="DAV:" xmlns="DAV:">http://example.com/foo<propstat xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><bigbox xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><BoxType xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\">Box type A<author xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><Name xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\">J.J. Johnson<status xmlns="DAV:" xmlns="DAV:">HTTP/1.1 200 OK<propstat xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><DingALing xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><Random xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><status xmlns="DAV:" xmlns="DAV:">HTTP/1.1 403 Forbidden<responsedescription xmlns="DAV:" xmlns="DAV:">The user does not have access to the DingALing property.<responsedescription xmlns="DAV:" xmlns="DAV:">There has been an access violation error."
want "<multistatus xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:"><href xmlns="DAV:">http://example.com/foo<propstat xmlns="DAV:"><prop xmlns="DAV:"><bigbox xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><BoxType xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\">Box type A<author xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><Name xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\">J.J. Johnson<status xmlns="DAV:">HTTP/1.1 200 OK<propstat xmlns="DAV:"><prop xmlns="DAV:"><DingALing xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><Random xmlns="http://ns.example.com/boxschema/\" xmlns="http://ns.example.com/boxschema/\"><status xmlns="DAV:">HTTP/1.1 403 Forbidden<responsedescription xmlns="DAV:">The user does not have access to the DingALing property.<responsedescription xmlns="DAV:">There has been an access violation error."
--- FAIL: TestReadProppatch (0.00s)
xml_test.go:793: proppatch: section 9.2: proppatch
got [{false [{{http://ns.example.com/z/ Authors} [32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 65 117 116 104 111 114 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 110 115 46 101 120 97 109 112 108 101 46 99 111 109 47 122 47 34 62 74 105 109 32 87 104 105 116 101 104 101 97 100 60 47 65 117 116 104 111 114 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 65 117 116 104 111 114 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 110 115 46 101 120 97 109 112 108 101 46 99 111 109 47 122 47 34 62 82 111 121 32 70 105 101 108 100 105 110 103 60 47 65 117 116 104 111 114 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32]}]} {true [{{http://ns.example.com/z/ Copyright-Owner} []}]}]
want [{false [{{http://ns.example.com/z/ Authors} [32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 122 58 65 117 116 104 111 114 32 120 109 108 110 115 58 122 61 34 104 116 116 112 58 47 47 110 115 46 101 120 97 109 112 108 101 46 99 111 109 47 122 47 34 62 74 105 109 32 87 104 105 116 101 104 101 97 100 60 47 122 58 65 117 116 104 111 114 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 122 58 65 117 116 104 111 114 32 120 109 108 110 115 58 122 61 34 104 116 116 112 58 47 47 110 115 46 101 120 97 109 112 108 101 46 99 111 109 47 122 47 34 62 82 111 121 32 70 105 101 108 100 105 110 103 60 47 122 58 65 117 116 104 111 114 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32]}]} {true [{{http://ns.example.com/z/ Copyright-Owner} []}]}]
xml_test.go:793: proppatch: section 4.3.1 (mixed content): proppatch
got [{false [{{http://example.com/ns author} en [32 32 32 32 32 32 32 32 32 32 32 32 60 110 97 109 101 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 62 74 97 110 101 32 68 111 101 60 47 110 97 109 101 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 117 114 105 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 116 121 112 101 61 34 101 109 97 105 108 34 32 97 100 100 101 100 61 34 50 48 48 53 45 49 49 45 50 54 34 62 109 97 105 108 116 111 58 106 97 110 101 46 100 111 101 64 101 120 97 109 112 108 101 46 99 111 109 60 47 117 114 105 62 32 32 32 32 32 32 32 32 32 32 32 32 60 117 114 105 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 116 121 112 101 61 34 119 101 98 34 32 97 100 100 101 100 61 34 50 48 48 53 45 49 49 45 50 55 34 62 104 116 116 112 58 47 47 119 119 119 46 101 120 97 109 112 108 101 46 99 111 109 60 47 117 114 105 62 32 32 32 32 32 32 32 32 32 32 32 32 60 110 111 116 101 115 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 120 109 108 110 115 58 95 120 109 108 110 115 61 34 120 109 108 110 115 34 32 95 120 109 108 110 115 58 104 61 34 104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 49 57 57 57 47 120 104 116 109 108 34 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 74 97 110 101 32 104 97 115 32 98 101 101 110 32 119 111 114 107 105 110 103 32 119 97 121 32 60 101 109 32 120 109 108 110 115 61 34 104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 49 57 57 57 47 120 104 116 109 108 34 62 116 111 111 60 47 101 109 62 32 108 111 110 103 32 111 110 32 116 104 101 32 32 32 32 32 32 32 32 32 32 32 32 32 32 108 111 110 103 45 97 119 97 105 116 101 100 32 114 101 118 105 115 105 111 110 32 111 102 32 38 108 116 59 82 70 67 50 53 49 56 38 103 116 59 46 32 32 32 32 32 32 32 32 32 32 32 32 60 47 110 111 116 101 115 62 32 32 32 32 32 32 32 32 32]}]}]
want [{false [{{http://example.com/ns author} en [32 32 32 32 32 32 32 32 32 32 32 32 60 110 115 58 110 97 109 101 32 120 109 108 110 115 58 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 62 74 97 110 101 32 68 111 101 60 47 110 115 58 110 97 109 101 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 60 110 115 58 117 114 105 32 120 109 108 110 115 58 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 116 121 112 101 61 34 101 109 97 105 108 34 32 97 100 100 101 100 61 34 50 48 48 53 45 49 49 45 50 54 34 62 109 97 105 108 116 111 58 106 97 110 101 46 100 111 101 64 101 120 97 109 112 108 101 46 99 111 109 60 47 110 115 58 117 114 105 62 32 32 32 32 32 32 32 32 32 32 32 32 60 110 115 58 117 114 105 32 120 109 108 110 115 58 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 116 121 112 101 61 34 119 101 98 34 32 97 100 100 101 100 61 34 50 48 48 53 45 49 49 45 50 55 34 62 104 116 116 112 58 47 47 119 119 119 46 101 120 97 109 112 108 101 46 99 111 109 60 47 110 115 58 117 114 105 62 32 32 32 32 32 32 32 32 32 32 32 32 60 110 115 58 110 111 116 101 115 32 120 109 108 110 115 58 110 115 61 34 104 116 116 112 58 47 47 101 120 97 109 112 108 101 46 99 111 109 47 110 115 34 32 120 109 108 110 115 58 104 61 34 104 116 116 112 58 47 47 119 119 119 46 119 51 46 111 114 103 47 49 57 57 57 47 120 104 116 109 108 34 62 32 32 32 32 32 32 32 32 32 32 32 32 32 32 74 97 110 101 32 104 97 115 32 98 101 101 110 32 119 111 114 107 105 110 103 32 119 97 121 32 60 104 58 101 109 62 116 111 111 60 47 104 58 101 109 62 32 108 111 110 103 32 111 110 32 116 104 101 32 32 32 32 32 32 32 32 32 32 32 32 32 32 108 111 110 103 45 97 119 97 105 116 101 100 32 114 101 118 105 115 105 111 110 32 111 102 32 38 108 116 59 82 70 67 50 53 49 56 38 103 116 59 46 32 32 32 32 32 32 32 32 32 32 32 32 60 47 110 115 58 110 111 116 101 115 62 32 32 32 32 32 32 32 32 32]}]}]
FAIL
exit status 1
FAIL golang.org/x/net/webdav 0.312s

@nigeltao
Copy link
Contributor

Huh, it's not obvious what the string difference is in the first failure message. If you change the last non-trivial line of xml_test.go from

t.Errorf("%s: XML body\ngot %q\nwant %q", tc.desc, gotXML, wantXML)

to

t.Errorf("%s: XML body\ngot % x\nwant % x", tc.desc, gotXML, wantXML)

(and note the space between the % and x), then what does the first error message in TestMultistatusWriter become?

@tgulacsi
Copy link
Contributor Author

First of all, sorry for some of the noise, I've used (cd litmus-0.13 && ./http http://localhost:9999) instead of (cd litmus-0.13 && make URL=http://localhost:9999 check) - I didn't noticed it does different things.

With the latest changes, the litmus test is:

-> running `basic':

  1. init.................. pass
  2. begin................. pass
  3. options............... pass
  4. put_get............... pass
  5. put_get_utf8_segment.. pass
  6. put_no_parent......... pass
  7. mkcol_over_plain...... pass
  8. delete................ pass
  9. delete_null........... pass
  10. delete_fragment....... pass
    1. mkcol................. pass
    2. mkcol_again........... pass
    3. delete_coll........... pass
    4. mkcol_no_parent....... pass
    5. mkcol_with_body....... pass
    6. finish................ pass
      <- summary for basic': of 16 tests run: 16 passed, 0 failed. 100.0% -> runningcopymove':
  11. init.................. pass
  12. begin................. pass
  13. copy_init............. pass
  14. copy_simple........... pass
  15. copy_overwrite........ pass
  16. copy_nodestcoll....... pass
  17. copy_cleanup.......... pass
  18. copy_coll............. pass
  19. copy_shallow.......... pass
  20. move.................. pass
    1. move_coll............. pass
    2. move_cleanup.......... pass
    3. finish................ pass
      <- summary for copymove': of 13 tests run: 13 passed, 0 failed. 100.0% -> runningprops':
  21. init.................. pass
  22. begin................. pass
  23. propfind_invalid...... pass
  24. propfind_invalid2..... FAIL (PROPFIND with invalid namespace declaration in body (see FAQ) got 207 response not 400)
  25. propfind_d0........... FAIL (No responses returned)
  26. propinit.............. pass
  27. propset............... FAIL (PROPPATCH on `/litmus/prop': 207 status code 207)
  28. propget............... SKIPPED
  29. propextended.......... FAIL (PROPFIND on `/litmus/prop': 207 status code 207)
  30. propmove.............. SKIPPED
    1. propget............... SKIPPED
    2. propdeletes........... SKIPPED
    3. propget............... SKIPPED
    4. propreplace........... SKIPPED
    5. propget............... SKIPPED
    6. propnullns............ SKIPPED
    7. propget............... SKIPPED
    8. prophighunicode....... SKIPPED
    9. propget............... SKIPPED
    10. propremoveset......... SKIPPED
    11. propget............... SKIPPED
    12. propsetremove......... SKIPPED
    13. propget............... SKIPPED
    14. propvalnspace......... SKIPPED
    15. propwformed........... FAIL (PROPFIND on `/litmus/prop': 207 status code 207)
    16. propinit.............. pass
    17. propmanyns............ FAIL (PROPPATCH on `/litmus/prop': 207 status code 207)
    18. propget............... FAIL (PROPFIND on `/litmus/prop': XML parse error at line 1: duplicate attribute)
    19. propcleanup........... pass
    20. finish................ pass
      -> 16 tests were skipped.
      <- summary for `props': of 14 tests run: 7 passed, 7 failed. 50.0%

But gvfs (under Debian the gvfsd-bin package, version 1.22.2) still unhappy:

gthomas@waterhouse:~/src/golang.org/x/net/webdav$ git log --oneline|head
4977ec3 webdav: use path.Join instead of filepath.Join in walkFS

gthomas@waterhouse:~/src/golang.org/x/net/webdav$ go run litmus_test_server.go
Serving :9999
OPTIONS /
PROPFIND /

gthomas@waterhouse:~$ gvfs-mount -i dav://localhost:9999/
Error mounting location: Not a WebDAV enabled share

@tgulacsi
Copy link
Contributor Author

--- FAIL: TestMultistatusWriter (0.01s)
xml_test.go:615: section 9.2.2 (failed dependency): XML body
got 3c 6d 75 6c 74 69 73 74 61 74 75 73 20 78 6d 6c 6e 73 3d 22 44 41 56
3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 20 78 6d 6c 6e 73 3d 22 44 41
56 3a 22 3e 3c 72 65 73 70 6f 6e 73 65 20 78 6d 6c 6e 73 3d 22 44 41 56 3a
22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 68 72 65 66 20 78 6d 6c 6e
73 3d 22 44 41 56 3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 68 74 74
70 3a 2f 2f 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 66 6f 6f 3c 2f 68 72 65 66
3e 3c 70 72 6f 70 73 74 61 74 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 20 78
6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 70 72 6f 70 20 78 6d 6c 6e 73 3d 22
44 41 56 3a 22 3e 3c 41 75 74 68 6f 72 73 20 78 6d 6c 6e 73 3d 22 68 74 74
70 3a 2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 22 20 78 6d 6c 6e
73 3d 22 68 74 74 70 3a 2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f
22 3e 3c 2f 41 75 74 68 6f 72 73 3e 3c 2f 70 72 6f 70 3e 3c 73 74 61 74 75
73 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56
3a 22 3e 48 54 54 50 2f 31 2e 31 20 34 32 34 20 46 61 69 6c 65 64 20 44 65
70 65 6e 64 65 6e 63 79 3c 2f 73 74 61 74 75 73 3e 3c 2f 70 72 6f 70 73 74
61 74 3e 3c 70 72 6f 70 73 74 61 74 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22
20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 70 72 6f 70 20 78 6d 6c 6e 73
3d 22 44 41 56 3a 22 3e 3c 43 6f 70 79 72 69 67 68 74 2d 4f 77 6e 65 72 20
78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e
63 6f 6d 2f 22 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 6e 73 2e 65 78
61 6d 70 6c 65 2e 63 6f 6d 2f 22 3e 3c 2f 43 6f 70 79 72 69 67 68 74 2d 4f
77 6e 65 72 3e 3c 2f 70 72 6f 70 3e 3c 73 74 61 74 75 73 20 78 6d 6c 6e 73
3d 22 44 41 56 3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 48 54 54 50
2f 31 2e 31 20 34 30 39 20 43 6f 6e 66 6c 69 63 74 3c 2f 73 74 61 74 75 73
3e 3c 2f 70 72 6f 70 73 74 61 74 3e 3c 72 65 73 70 6f 6e 73 65 64 65 73 63
72 69 70 74 69 6f 6e 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 20 78 6d 6c 6e
73 3d 22 44 41 56 3a 22 3e 43 6f 70 79 72 69 67 68 74 20 4f 77 6e 65 72 20
63 61 6e 6e 6f 74 20 62 65 20 64 65 6c 65 74 65 64 20 6f 72 20 61 6c 74 65
72 65 64 2e 3c 2f 72 65 73 70 6f 6e 73 65 64 65 73 63 72 69 70 74 69 6f 6e
3e 3c 2f 72 65 73 70 6f 6e 73 65 3e 3c 2f 6d 75 6c 74 69 73 74 61 74 75 73
3e
want 3c 6d 75 6c 74 69 73 74 61 74 75 73 20 78 6d 6c 6e 73 3d 22 44 41 56
3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 72 65 73 70 6f 6e 73 65
20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 68 72 65 66 20 78 6d 6c 6e 73
3d 22 44 41 56 3a 22 3e 68 74 74 70 3a 2f 2f 65 78 61 6d 70 6c 65 2e 63 6f
6d 2f 66 6f 6f 3c 2f 68 72 65 66 3e 3c 70 72 6f 70 73 74 61 74 20 78 6d 6c
6e 73 3d 22 44 41 56 3a 22 3e 3c 70 72 6f 70 20 78 6d 6c 6e 73 3d 22 44 41
56 3a 22 3e 3c 41 75 74 68 6f 72 73 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a
2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 22 20 78 6d 6c 6e 73 3d
22 68 74 74 70 3a 2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 22 3e
3c 2f 41 75 74 68 6f 72 73 3e 3c 2f 70 72 6f 70 3e 3c 73 74 61 74 75 73 20
78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 48 54 54 50 2f 31 2e 31 20 34 32 34
20 46 61 69 6c 65 64 20 44 65 70 65 6e 64 65 6e 63 79 3c 2f 73 74 61 74 75
73 3e 3c 2f 70 72 6f 70 73 74 61 74 3e 3c 70 72 6f 70 73 74 61 74 20 78 6d
6c 6e 73 3d 22 44 41 56 3a 22 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c
70 72 6f 70 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 3c 43 6f 70 79 72 69
67 68 74 2d 4f 77 6e 65 72 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 6e
73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 22 20 78 6d 6c 6e 73 3d 22 68 74
74 70 3a 2f 2f 6e 73 2e 65 78 61 6d 70 6c 65 2e 63 6f 6d 2f 22 3e 3c 2f 43
6f 70 79 72 69 67 68 74 2d 4f 77 6e 65 72 3e 3c 2f 70 72 6f 70 3e 3c 73 74
61 74 75 73 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 48 54 54 50 2f 31 2e
31 20 34 30 39 20 43 6f 6e 66 6c 69 63 74 3c 2f 73 74 61 74 75 73 3e 3c 2f
70 72 6f 70 73 74 61 74 3e 3c 72 65 73 70 6f 6e 73 65 64 65 73 63 72 69 70
74 69 6f 6e 20 78 6d 6c 6e 73 3d 22 44 41 56 3a 22 3e 43 6f 70 79 72 69 67
68 74 20 4f 77 6e 65 72 20 63 61 6e 6e 6f 74 20 62 65 20 64 65 6c 65 74 65
64 20 6f 72 20 61 6c 74 65 72 65 64 2e 3c 2f 72 65 73 70 6f 6e 73 65 64 65
73 63 72 69 70 74 69 6f 6e 3e 3c 2f 72 65 73 70 6f 6e 73 65 3e 3c 2f 6d 75
6c 74 69 73 74 61 74 75 73 3e

2015-04-22 6:42 GMT+02:00 Nigel Tao notifications@github.com:

Huh, it's not obvious what the string difference is in the first failure
message. If you change the last non-trivial line of xml_test.go from

t.Errorf("%s: XML body\ngot %q\nwant %q", tc.desc, gotXML, wantXML)

to

t.Errorf("%s: XML body\ngot % x\nwant % x", tc.desc, gotXML, wantXML)

(and note the space between the % and x), then what does the first error
message in TestMultistatusWriter become?


Reply to this email directly or view it on GitHub
#10506 (comment).

@mattn
Copy link
Member

mattn commented Apr 22, 2015

got

<multistatus xmlns="DAV:" xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:" xmlns
="DAV:"><href xmlns="DAV:" xmlns="DAV:">http://example.com/foo</href><propstat x
mlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><Authors xmlns="http://ns.example.co
m/" xmlns="http://ns.example.com/"></Authors></prop><status xmlns="DAV:" xmlns="
DAV:">HTTP/1.1 424 Failed Dependency</status></propstat><propstat xmlns="DAV:" x
mlns="DAV:"><prop xmlns="DAV:"><Copyright-Owner xmlns="http://ns.example.com/" x
mlns="http://ns.example.com/"></Copyright-Owner></prop><status xmlns="DAV:" xmln
s="DAV:">HTTP/1.1 409 Conflict</status></propstat><responsedescription xmlns="DA
V:" xmlns="DAV:">Copyright Owner cannot be deleted or altered.</responsedescript
ion></response></multistatus>

want

<multistatus xmlns="DAV:" xmlns="DAV:"><response xmlns="DAV:"><href xmlns="DAV:"
>http://example.com/foo</href><propstat xmlns="DAV:"><prop xmlns="DAV:"><Authors
 xmlns="http://ns.example.com/" xmlns="http://ns.example.com/"></Authors></prop>
<status xmlns="DAV:">HTTP/1.1 424 Failed Dependency</status></propstat><propstat
 xmlns="DAV:" xmlns="DAV:"><prop xmlns="DAV:"><Copyright-Owner xmlns="http://ns.
example.com/" xmlns="http://ns.example.com/"></Copyright-Owner></prop><status xm
lns="DAV:">HTTP/1.1 409 Conflict</status></propstat><responsedescription xmlns="
DAV:">Copyright Owner cannot be deleted or altered.</responsedescription></respo
nse></multistatus>

@nigeltao
Copy link
Contributor

CC @rsto.

@rsto
Copy link
Contributor

rsto commented Apr 22, 2015

It looks like there are two, possibly unrelated, issues here.

@mattn The XML normalisation that we employ for our "golden XML" tests seems broken in your environment. Are you testing this on current master? The multiple namespace definitions in your XML dump hint at a problem in the XML package that recently has been fixed by Roger Peppe. Could you please retry with a recent Go version that, as a minimum, includes the following CLs:

https://go-review.googlesource.com/6927
https://go-review.googlesource.com/5910
https://go-review.googlesource.com/2660

As an additional data point, It works for me with go version devel +ecd630d. The most recent master should include all the XML goodness.

@tgulacsi I see that you are on go devel, but are you sure your version includes the afore mentioned XML fixes? Also, could you please paste the full OPTIONS/PROPFIND HTTP transfer here? Gvfs might choke because the XML marshalling is broken in your environment, or it might because of a bug in the property system implementation. Without the HTTP trace I can't really tell.

FYI f you run litmus like

$ TESTS="props" ./bin/litmus http://localhost:9999/

it will only run the props suite. On my machine, this outputs

-> 16 tests were skipped.
<- summary for `props': of 14 tests run: 10 passed, 4 failed. 71.4%
See debug.log for network/debug traces.

@mattn
Copy link
Member

mattn commented Apr 22, 2015

@rsto i didn't repro. I just converted hex code to xml string. :)

@nigeltao
Copy link
Contributor

@tgulacsi yes, can you confirm that your Go stdlib is on head? I see from your "git log" that your golang.org/x/net sub-repo checkout is on devel, but what's your stdlib version? As @rsto said, there were some encoding/xml fixes between Go 1.4.x and head.

@tgulacsi
Copy link
Contributor Author

Nope, I'm on 1.4.2. I'll try with head soon,

2015-04-22 9:47 GMT+02:00 Nigel Tao notifications@github.com:

@tgulacsi https://github.com/tgulacsi yes, can you confirm that your Go
stdlib is on head? I see from your "git log" that your golang.org/x/net
sub-repo checkout is on devel, but what's your stdlib version? As @rsto
https://github.com/rsto said, there were some encoding/xml fixes
between Go 1.4.x and head.


Reply to this email directly or view it on GitHub
#10506 (comment).

@tgulacsi
Copy link
Contributor Author

Ok, so golang.org/x/net/webdav works perfectly with go head:

tgulacsi@tgulacsi-Aspire-V3-371:/src/golang.org/x/net/webdav$ git log --oneline|head
4977ec3 webdav: use path.Join instead of filepath.Join in walkFS
169f422 webdav: Add XML and HTTP handler support for PROPPATCH.
84ba27d webdav: add support for (custom) ETags and Content-Type.
6460565 x/net/html/charset: Change NewReaderByName to NewReaderLabel.
7dbad50 webdav: define property system and implement PROPFIND.
2ad7428 ipv6: add support for linux/arm64
efd6492 ipv4: add support for linux/arm64
0b492c5 net: add codereview.cfg
97d8e4e ipv6: fix build on go1.4 and below
ff099b4 ipv4: fix build on go1.4 and below
tgulacsi@tgulacsi-Aspire-V3-371:
/src/golang.org/x/net/webdav$ go version
go version devel +87054c4 Wed Apr 22 02:50:48 2015 +0000 linux/amd64
tgulacsi@tgulacsi-Aspire-V3-371:/src/golang.org/x/net/webdav$ go test
PASS
ok golang.org/x/net/webdav 0.051s
tgulacsi@tgulacsi-Aspire-V3-371:
/src/golang.org/x/net/webdav$

And works with gvfs flawlessly!

So, thanks for the great work, and sorry for the noise!

@mikioh mikioh changed the title net/webdav: windows & gvfs does not accept as a webdav server x/net/webdav: windows & gvfs does not accept as a webdav server Jul 30, 2015
@mikioh mikioh modified the milestone: Unreleased Jul 30, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants