[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Date bug in header
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Date bug in header |
Date: |
Mon, 5 May 2008 09:18:52 -0600 |
User-agent: |
KMail/1.9.9 |
Thanks for pointing this out. Fixed in SVN 6777.
Christian
On Monday 05 May 2008 08:08:30 am John Popplewell wrote:
> Hi,
>
> I was evaluating this very interesting looking library (running
> fileserver_example) and just happened to look at the headers sent back
> using wget -S and noticed that the year was wrong:
>
> Connecting to digimate[192.168.0.240]:8888... connected.
> HTTP request sent, awaiting response...
> 1 HTTP/1.1 200 OK
> 2 Content-Length: 18621
> 3 Date: Mon, 05 May 0108 13:53:32 GMT
> ^^^^
>
> It seems that gmtime_r() returns the number of years since 1900 in the
> now.tm_year field so I changed the relevant line in
> src/daemon/connection.c get_date_string() to fix this:
>
> ...
> mons[now.tm_mon % 12],
> 1900+now.tm_year, now.tm_hour, now.tm_min,
> now.tm_sec);
> }
> ...
>
> Now I get this, which looks better:
>
> Connecting to digimate[192.168.0.240]:8888... connected.
> HTTP request sent, awaiting response...
> 1 HTTP/1.1 200 OK
> 2 Content-Length: 18621
> 3 Date: Mon, 05 May 2008 14:01:40 GMT
> ^^^^
>
> I checked-out the current SVN version before bothering you,
>
> best regards,
> John.
>
> _______________________________________________
> libmicrohttpd mailing list
> address@hidden
> http://crisp.cs.du.edu/cgi-bin/mailman/listinfo/libmicrohttpd