Gossamer Forum
Home : General : Perl Programming :

Last-Modified Header

Quote Reply
Last-Modified Header
Hi,

Still working on a cgi perl script using LWP::UserAgent

with a lot of help received fron moderator Paul.

But now something completely different:

I want to retrive the "Last-Modified Header" but my own (brand new) server does not send this header with the files.



Does anyone know how and/or where to tweak the server (unix apache) so that it starts sending this info with a file-request

I had a look in the Apache config file, but do not find the tweak in there



Regards,

Sanuk
Quote Reply
Re: [sanuk] Last-Modified Header In reply to
You put the Last-Modified header as a meta-tag in your pages don't you?
Quote Reply
Re: [Paul] Last-Modified Header In reply to
Hi Paul,

You are talking about the:

<meta http-equiv="Last-Modified" content="Some_Date">

Tag that is put inbetween <head></head>

But it is not this.

It's the server that generates Last-Modify headers for every File/Page it serves.

Doing a test with LWP::UserAgent

and asking for: $xlastdate = $res->header('Last-Modified');

about 90% of servers returns a Last Modify date of the file.

When checking the source of these pages the:

<meta http-equiv="Last-Modified" content="Some_Date"> Tag is not in the header of the page.

It was the server that generated the response header

My server does not generate this header currently.

Regards,

Sanuk
Quote Reply
Re: [Paul] Last-Modified Header In reply to
Hi,

I am now so far that I know this Last-Modify header is generated by:

Mod_Headers and then just add the header you want to .htaccess

So I have Un-commented Mod_Headers in the config-file, so as to load it.

But now I am blocked again

The manual at Apache for Mod_Headers is not very clear and very confusing at what to add to .htaccess to have the server generate the Last-Modify header.

It mostly talks about cache headers and forgets to give the example for Last-Modify header.

Regards,

Sanuk