perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerard such <gerards...@gmail.com>
Subject Re: HTTP headers question
Date Sun, 13 Nov 2005 20:34:03 GMT
Apparently it works :D
However, it's very strange the headers that "my" server sends! Now
there is a Last-Modified header that points to July?!?!?
Also the ETAG tag is still there ...

Anyway, it seems that effectively the two noisy tags are removed, and
that the OK status is sent (if not i will disturb again the list :).

In addition, just browsing for the web pages (of my modules), I've
discovered an extra header! one "301 Moved Permanently" ... After it,
it's like an extra request is performed and then an OK is responded.
Perhaps the computer is trying to communicate with me?

I attach the two negotiations, the last with the 301 status, followed
by the spontaneous extra request.

-----------------------------------------
http://localhost/camandules.info/

GET /camandules.info/ HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12)
Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: blogum=blogum#1959913555115135510915259521;
blogum_counter_pages=main#; blogum_counter_sesion=1
If-Modified-Since: Tue, 05 Jul 2005 06:25:08 GMT
If-None-Match: "1bcbb8-ca-25467900"



HTTP/1.x 200 OK
Date: Sun, 13 Nov 2005 20:38:35 GMT
Server: mod-xslt/1.3.8 Apache/2.0.55 (Unix)
mod_apreq2-20050712/2.1.3-dev mod_perl/2.0.1 Perl/v5.8.7
Pragma: no-cache
Cache-Control: max-age=0, no-cache, must-revalidate
Expires: -1
Last-Modified: Tue, 05 Jul 2005 06:25:08 GMT
Etag: "1bcbb8-ca-25467900"
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 7366
Keep-Alive: timeout=15, max=97
Connection: Keep-Alive
-----------------------------------------



-----------------------------------------
http://localhost/camandules.info


GET /camandules.info HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12)
Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: blogum=blogum#1959913555115135510915259521;
blogum_counter_pages=article_new#main#; blogum_counter_sesion=1


HTTP/1.x 301 Moved Permanently
Date: Sun, 13 Nov 2005 20:44:09 GMT
Server: mod-xslt/1.3.8 Apache/2.0.55 (Unix)
mod_apreq2-20050712/2.1.3-dev mod_perl/2.0.1 Perl/v5.8.7
Pragma: no-cache
Cache-Control: max-age=0, no-cache, must-revalidate
Expires: -1
Location: http://localhost/camandules.info/
Content-Length: 386
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------

http://localhost/camandules.info/


GET /camandules.info/ HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12)
Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: blogum=blogum#1959913555115135510915259521;
blogum_counter_pages=article_new#main#; blogum_counter_sesion=1
If-Modified-Since: Tue, 05 Jul 2005 06:25:08 GMT
If-None-Match: "1bcbb8-ca-25467900"


HTTP/1.x 200 OK
Date: Sun, 13 Nov 2005 20:44:10 GMT
Server: mod-xslt/1.3.8 Apache/2.0.55 (Unix)
mod_apreq2-20050712/2.1.3-dev mod_perl/2.0.1 Perl/v5.8.7
Pragma: no-cache
Cache-Control: max-age=0, no-cache, must-revalidate
Expires: -1
Last-Modified: Tue, 05 Jul 2005 06:25:08 GMT
Etag: "1bcbb8-ca-25467900"
Accept-Ranges: bytes
Content-Type: text/html; charset=ISO-8859-1
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 7366
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
-----------------------------------------


2005/11/13, Geoffrey Young <geoff@modperlcookbook.org>:
>
> > PerlHeaderParserHandler Blogum::BlogumHeaders::nocache
>
> >         $r->err_headers_out->add('Pragma' => "no-cache");
> >         $r->err_headers_out->add('Cache-control' => "max-age=0");
> >         $r->err_headers_out->add('Cache-control' => "no-cache");
> >         $r->err_headers_out->add('Cache-control' => "must-revalidate");
> >         $r->err_headers_out->add('Expires' => "-1");
> >         return Apache2::Const::DECLINED;
>
> in this case, it might be easier to remove the cache headers from the
> request on the way in.  so, try something like
>
>   $r->headers_in->unset('If-Modified-Since');
>   $r->headers_in->unset('If-None-Match');
>
> so that the server isn't aware of any caching on the client (as opposed to
> asking the client to behave in such and such a way).
>
> HTH
>
> --Geoff
>


--
(signatura)
Eps, el meu bloc personal
http://www.camandules.info

Mime
View raw message