is there any way to get to the client request headers in a Ruby CGI
script. In particular I’m looking for the If-Modified-Since header,
which I was expecting (under Apache) to turn up in
ENV[‘HTTP_IF_MODIFIED_SINCE’]. However, apparently this isn’t the case
(at least in my configuration). Is there something I can do to get at
this header?
is there any way to get to the client request headers in a Ruby CGI
script. In particular I’m looking for the If-Modified-Since header,
which I was expecting (under Apache) to turn up in
ENV[‘HTTP_IF_MODIFIED_SINCE’]. However, apparently this isn’t the case
(at least in my configuration). Is there something I can do to get at
this header?
use NPH(non-parsed-header) CGI.
rename ‘your-script.cgi’ => ‘nph-your-script.cgi’
and CGI#out({‘nph’=>true})
ENV['HTTP_IF_MODIFIED_SINCE']. However, apparently this isn't the case
(at least in my configuration). Is there something I can do to get at
this header?
It turns out to have been a protocol error on my part. The aggregator I
was using only sends an if-modified-since header if the previous RSS
feed from me contained a last-modified header, and I only generated a
last-modified header if I saw an if-modified-since. I now always
generate a last-modified header, and everything works fine.
Cheers
Dave
···
On Wednesday, Mar 19, 2003, at 04:38 US/Central, ts wrote:
ENV[‘HTTP_IF_MODIFIED_SINCE’]. However, apparently this isn’t the
case
(at least in my configuration). Is there something I can do to get
at
this header?