cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: error?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 16 Nov 2001 12:20:46 +0100 (MET)

On Fri, 16 Nov 2001, Klevtsov Vadim wrote:

> there is possible bug
>
> file: http.c
>
> #ifdef HAVE_STRFTIME
> /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
> strftime(buf, BUFSIZE-1, "%a, %d %b %Y %H:%M:%S %Z", thistime);
> #else
>
> must be
>
> #ifdef HAVE_STRFTIME
> /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
> strftime(buf, BUFSIZE-1, "%a, %d %b %Y %H:%M:%S GMT", thistime);
> #else

Yes, that is certainly a bug and a correct fix. Thanks!

> /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
> strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S %Z\r\n",
> tm);

Well, that is not as clear. That's a "get data using ftp but make it look
like a HTTP header", we can do pretty much how we want there. The time we get
using FTP is gotten with MDTM which 1) isn't a standard FTP command and 2)
doesn't return any really good time with a nice standard timezone.

Anyone with any suggestion on this second case?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-16