httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8760] - if-modified-since field in request not handled correctly
Date Fri, 03 May 2002 07:00:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8760>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8760

if-modified-since field in request not handled correctly





------- Additional Comments From jwoolley@apache.org  2002-05-03 07:00 -------
This seems to be a problem with the modification time resolution being too high 
on Win32.  The HTTP spec only gives us seconds, which we convert to APR's 
internal time representation, apr_time_t (which is microseconds since the 
epoch).  We compare that to the mtime, also converted to an apr_time_t.  On 
UNIX, that's not a problem, because the mtime has only second resolution, so 
the comparison works.  But on Win32, the resolution can be higher than that, so 
the file modification time can be that second plus some number of microseconds, 
which is of course higher than the time specified in the HTTP header (which had 
0 microseconds).  Solution?  Always do the comparisons in seconds, not in 
apr_time_t's (microseconds).

Something similar is most likely happening with If-Unmodified-Since, by the 
way.  Attached is a patch... please try it out and see if it fixes your problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message