Hello! This PR built above @isoos's PR #6
There was an error if you try to use this patch when your webdav server responses just for one non-root directory and not for the entire server.
For example, if your webserver have static pages(without auth) at / or other directories and handle authenticated webdav requests under /webdav directory only. There is situation when fix in commit 3aac22ca087336f05cb447b437b360ea4899e1c4 doesn't works:
1) webdav_client asks the webserver to OPTIONS / and webserver answers with 200 without any webdav information, because server-side webdav module doesn't know anything above /webdav directory
3) webdav_client subscribing to file stream and trying to PUT file without authorization, but here webdav server answers 401 authentication required
4) webdav_client retrying, but fail with DIOErrors or something like "stream already listened".
Hello! This PR built above @isoos's PR #6 There was an error if you try to use this patch when your webdav server responses just for one non-root directory and not for the entire server. For example, if your webserver have static pages(without auth) at / or other directories and handle authenticated webdav requests under /webdav directory only. There is situation when fix in commit 3aac22ca087336f05cb447b437b360ea4899e1c4 doesn't works: 1) webdav_client asks the webserver to OPTIONS / and webserver answers with 200 without any webdav information, because server-side webdav module doesn't know anything above /webdav directory 3) webdav_client subscribing to file stream and trying to PUT file without authorization, but here webdav server answers 401 authentication required 4) webdav_client retrying, but fail with DIOErrors or something like "stream already listened".
I hope this PR will fix this error.