>>>>> "Kent," == Kent, Mr John <[EMAIL PROTECTED]> writes:

Kent,> Lincoln Stein describes how to set an expires tag but does anyone know how
Kent,> to set a Last-Modified tag in a document created using CGI.pm?

What part of 

       Many routines will do something useful with a named
       argument that it doesn't recognize.  For example, you can
       produce non-standard HTTP header fields by providing them
       as named arguments:

         print $q->header(-type  =>  'text/html',
                          -cost  =>  'Three smackers',
                          -annoyance_level => 'high',
                          -complaints_to   => 'bit bucket');

is the most mysterious to you?  (Copied right from CGI.pm's docs....)

If it's that you don't know how to create the right time string,
then either look at how expires does it, or just grab HTTP::Date
from LWP, which reads:

        $string = time2str($time);

and set $time = to the mod_time of your file in question, or even
right now if it's dynamically generated.

However, unless you're willing to respond to "if-modified-since" with
an appropriate 304 error if not, why are you bothering to even send
a "last-modified" from a CGI script?  The absence of such a field has
traditionally been treated as "last-modified: now".

So why bother?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to