Invalid argument to date encode [0-0-12] WebDav error

Advertisement

gnel
Joined:
Posts:
5

Invalid argument to date encode [0-0-12] WebDav error

Hi, I downloaded last winscp version WinSCP/5.6.1 because I heard it got WebDav support, I'm on Windows XP, I use webdav to upload to my websites, unfortunately WinScp upon connection errors out with:

Invalid argument to date encode [0-0-12]

My webdav server is Nginx with webdav module. I'm attaching the log of the error, the error is at the last line on the log. It happens right after connecting, when parsing the dir list of the root folder.

My presumption is that errors out when trying to parse the dates, which as shown on the log has the format:

<creationdate>2014-10-14T16:34:07+00:00</creationdate><getlastmodified>2014-10-14T16:34:07+00:00</getlastmodified>

I should note Cyberduck works fine in this regard and it's what I'm currently using, but I'd prefer to use WinScp which has a portable version that I'd like to use.


In a following message I'd post in a private attachment details for a test site at my server that you can use to test this bug.

Regards and thanks for WinScp!
Description: Log File for Invalid argument to date encode [0-0-12] error.

Reply with quote

Advertisement

gnel
Joined:
Posts:
5

Test site to help debug the bug

Hi, I've created a test account on my server so you can reproduce the bug first hand, the details are on the private attachment file.

Thanks!
  • Details for test site.txt (348 Bytes, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Invalid argument to date encode [0-0-12] WebDav error

The WebDAV specification (RFC 4918) mandates that getlastmodified property uses format specified by RFC 2616, what is "Sun, 06 Nov 1994 08:49:37 GMT"
https://datatracker.ietf.org/doc/html/rfc4918#section-15.7
https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1

Your WebDAV server violates that requirement.

Also nginx does not support PROPFIND method on its own.
I'm aware of nginx-dav-ext-module that adds support for PROPFIND. But that uses (and always did) a correct format.
https://github.com/arut/nginx-dav-ext-module

So how do you exactly implement the WebDAV on nginx?

Reply with quote

gnel
Joined:
Posts:
5

Solved, you were right

Thank you very much!, you nailed the problem!, and as per your question, I use the following PHP FCGI script to Extend NGINX WebDAV:

https://gist.github.com/anonymous/3d7c80d6da84840964e3

So after your diagnose, I just changed the date format and now it's working fine!

Anyway you could think about supporting the non-standard date format, as I report you there were a lot of webdav clients working fine with it (cyberduck, anyclient, bitconnect, cuteftp).

Thanks!!

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Solved, you were right

gnel wrote:

I use the following PHP FCGI script to Extend NGINX WebDAV
Where did you get the script from?

Reply with quote

gnel
Joined:
Posts:
5

Re: Solved, you were right

martin wrote:

gnel wrote:

I use the following PHP FCGI script to Extend NGINX WebDAV
Where did you get the script from?

Its origin is <invalid hyperlink removed by admin>

but I grabbed it from elsewhere on the internet when googling "nginx webdav support", I stumbled on it and I like it since most of my web projects are PHP too, so it was easy for me to install and add some fixes too.

Reply with quote

Advertisement

You can post new topics in this forum