Closed demon-tdr closed 3 years ago
Ah I think I accidentially removed it. I'll quickly add it again
I wasn't sure if either text/xml
or application/xml
is the one to use, but I'd go with application/xml
after reading this: https://tools.ietf.org/html/rfc3023#section-3
@demon-tdr please test https://github.com/jld3103/dart-nextcloud/pull/34.
Thank you for your quick response.
I tried your test script against my Nextcloud server and got some errors.
$ dart test test/webdav_test.dart
00:04 +0 -1: WebDav (setUpAll) [E]
NoSuchMethodError: The method '[]=' was called on null.
Receiver: null
Tried calling: []=("content-type", "application/xml")
dart:core Object.noSuchMethod
package:nextcloud/src/webdav/client.dart 75:12 WebDavClient._send
package:nextcloud/src/webdav/client.dart 93:28 WebDavClient.status
test/webdav_test.dart 16:29 main.<fn>.<fn>
00:04 +2 -1: Some tests failed.
This error does not happen in the master branch (it fails because of the content-type) I'm sorry I can't help any more, this is my first contact with Dart
No problem! I already fixed that. Too bad I didn't test the code :grimacing:
Your last commit fixed all the error messages! I ran a shorter version of your webdav_test file:
$ dart test test/webdav2_test.dart
00:08 +2: All tests passed!
These same tests failed before your patch
Thank you very much
Published as v2.1.3
Hi, I have mod-security enabled in my Nextcloud installation. It is blocking WebDAV requests because the content-type is wrong (it should be text/xml):