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

Author Message
gnel
[View user's profile]

Joined: 2014-10-14
Posts: 5
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:

Code:
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:

Code:
<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!
webdav error.log (12.55 KB) [Download]

Description: Log File for Invalid argument to date encode [0-0-12] error.

Advertisements
gnel
[View user's profile]

Joined: 2014-10-14
Posts: 5
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

Description: (none)

gnel
[View user's profile]

Joined: 2014-10-14
Posts: 5
I've taken a look to the Neon sources, and my understanding is that neon supports this date format, as per line 50 of:

http://winscp.cvs.sourceforge.net/viewvc/winscp/winscp3/libs/neon/src/ne_dates.c?view=markup

So maybe the problem is elsewhere?..
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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://tools.ietf.org/html/rfc4918#section-15.7
https://tools.ietf.org/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?
gnel
[View user's profile]

Joined: 2014-10-14
Posts: 5
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!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
gnel wrote:
I use the following PHP FCGI script to Extend NGINX WebDAV

Where did you get the script from?
_________________
Martin Prikryl
gnel
[View user's profile]

Joined: 2014-10-14
Posts: 5
prikryl wrote:
gnel wrote:
I use the following PHP FCGI script to Extend NGINX WebDAV

Where did you get the script from?


Its origin is http://www.agoragames.com/blog/2009/03/20/webdav-nginx-play-nice/

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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License