Hardy cgi fails to supply HTTP_IF_MODIFIED_SINCE

Bug #361139 reported by teledyn
2
Affects Status Importance Assigned to Milestone
ruby1.8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ruby1.8

Using firefox to access a CGI that implements conditional-GET, using the very same ruby script on all three machines, I access the page to obtain the LAST-MODIFIED and ETAG; firefox will then automatically provide these as IF-MODIFIED-SINCE and IF-NONE-MATCH respectively.

the following two lines are put into the cgi program (no mod-ruby, just cgi)

<li>IF-MODIFIED-SINCE: #{ENV['HTTP_IF_MODIFIED_SINCE'] || 'n/a'}
<li>IF-NONE-MATCH: #{ENV['HTTP_IF_NONE_MATCH'] || 'n/a'}

when run in Debian 4 or Debian 5 with
Debian 4: ruby 1.8.6 (2008-03-03 patchlevel 114) [i486-linux]
Debian 5: ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]

the above prints:

# IF-MODIFIED-SINCE: Tue Apr 14 10:08:50 -0400 2009
# IF-NONE-MATCH: 1239718130

but when run in Ubuntu Server 8.10 with
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]IF
(which is pretty ancient, no?)

# IF-MODIFIED-SINCE: Thu, 01 Jan 1970 00:00:00 GMT
# IF-NONE-MATCH: 1239719740

ie, the IF-NONE-MATCH is reported correctly, but the IF-MODIFIED-SINCE header is being read as zero.
firefox reports that page as "Modified: Tue 14 Apr 2009 10:50:27 AM EDT" suggesting the Last-Modified header returned by the previous CGI call is correct, and since the same browser works with the other Ruby versions, firefox is very likely returning that value correctly as If-Modified-Since, it just isn't showing up in the HTTP_IF_MODIFIED_SINCE key's value.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

fixed in recent rubies

Changed in ruby1.8 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.