Hello all!

    I'm having the following conversation with one of the webmasters
at kernel.org.

    Could anyone look over the conversation and tell if I'm (or the
GitWeb at kernel.org is) wrong?

    In short:
~~~~~~~~
>>    **Important notice**: I use a caching proxy (Polipo), but it's not
>> its fault.
>>
>>    I have the following problem when accessing Git repositories with
>> the web interface at git.kernel.org: my browser enters an infinite
>> refresh loop, that leaves me no choice than to either disconnect from
>> network, restart caching server, or restart browser.
~~~~~~~~

    Thanks,
    Ciprian.


---------- Forwarded message ----------
From: Ciprian Dorin, Craciun <[email protected]>
Date: Sun, Jan 17, 2010 at 11:06 AM
Subject: Re: Fwd: Accessing git.kernel.org by browser results in
infinite refresh loop
To: "J.H." <[email protected]>
Cc: [email protected]


> This is actually your caching proxy:
>
> **Important notice**: I use a caching proxy (Polipo), but it's not
> its fault.
>
> It's cached the generating page and isn't realizing that the page
> underneath it has changed.


   Please bare with me a minute and let's analyze what happens. :)

   Ok. I know that the infinite loop is seen only in collaboration
with a proxy. But the proxy only does it's (correct) job.


   See below the header the web server is transmitting first (gotten
from curl, **without any proxy**) (I assume that you've read my entire
email, but I'll repeat the piece again):

>> * About to connect() to git.kernel.org port 80 (#0)
>> *   Trying 199.6.1.166... connected
>> * Connected to git.kernel.org (199.6.1.166) port 80 (#0)
>>> GET 
>>> /?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=84d330ec80dc467baf6cb393d9c1ee006d1c024a
>>>  HTTP/1.1
>>> User-Agent: curl/7.19.7 (i686-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8l 
>>> zlib/1.2.3.3
>>> Host: git.kernel.org
>>> Accept: */*
>>>
>> < HTTP/1.1 200 OK
>> < Date: Sun, 10 Jan 2010 09:21:53 GMT
>> < Server: Apache/2.2.14 (Fedora)
>> < Expires: never

   <<Expires: never>> as in "this page shall never expire!". So from
my understanding on how HTTP caching works, the proxy is right at
throwing me the same page every time...

   Now going back to your words:

> It's cached the generating page and isn't realizing that the page
> underneath it has changed.

   How would the proxy actually know if something has changed if
you've told it in the first place that the page shall **never**
change.

   So the culprit of the issue is the <<Expires: never>> header. I
think removing it shall work just fine.


>> < Transfer-Encoding: chunked
>> < Content-Type: text/html; charset=utf-8
>> <
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www/w3.porg/TR/html4/strict.dtd";>
>> <!-- git web interface version 1.6.4.GIT, (C) 2005-2006, Kay Sievers
>> <[email protected]>, Christian Gierke -->
>> <!-- git core binaries version 1.6.6 -->
>> <head>
>> <meta http-equiv="content-type" content="; charset=utf-8"/>
>> <meta name="generator" content="gitweb/1.6.4.GIT git/1.6.6"/>
>> <meta name="robots" content="index, nofollow"/>
>> <meta http-equiv="refresh" content="0"/>

   As in "just refresh immediately, maybe the server has finished
generating the page".


>> <title></title>
>> </head>
>> <body>
>> Generating...</body>
>> </html>
>> * Connection #0 to host git.kernel.org left intact
>> * Closing connection #0


   Now could you spare a minute and kindly explain to me why is the
proxy wrong?

   Thanks for your patience,
   Ciprian.


On Sun, Jan 17, 2010 at 10:51 AM, J.H. <[email protected]> wrote:
> This is actually your caching proxy:
>
> **Important notice**: I use a caching proxy (Polipo), but it's not
> its fault.
>
> It's cached the generating page and isn't realizing that the page
> underneath it has changed.
>
> - John 'Warthog9' Hawley
>
> On 01/16/2010 11:24 PM, Ciprian Dorin, Craciun wrote:
>>     Hello!
>>
>>     (The problem described below is relatd with the GitWeb interface
>> hosted at kernel.org.)
>>
>>     I've sent a while ago the following email to the Git mailing list,
>> and as I've got no response I try also this email address.
>>
>>     Thanks.
>>
>>
>> ---------- Forwarded message ----------
>> From: Ciprian Dorin, Craciun <[email protected]>
>> Date: Sun, Jan 10, 2010 at 11:33 AM
>> Subject: Accessing git.kernel.org by browser results in infinite refresh loop
>> To: [email protected]
>>
>>
>>    Hy all!
>>
>>    **Important notice**: I use a caching proxy (Polipo), but it's not
>> its fault.
>>
>>    I have the following problem when accessing Git repositories with
>> the web interface at git.kernel.org: my browser enters an infinite
>> refresh loop, that leaves me no choice than to either disconnect from
>> network, restart caching server, or restart browser.
>>
>>    So when I access a commit (for the first time), I get the
>> following answer (request is done without proxy and with curl)
>> (important lines marked with ####):
>>
>> ~~~~~~~~
>> * About to connect() to git.kernel.org port 80 (#0)
>> *   Trying 199.6.1.166... connected
>> * Connected to git.kernel.org (199.6.1.166) port 80 (#0)
>>> GET 
>>> /?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=84d330ec80dc467baf6cb393d9c1ee006d1c024a
>>>  HTTP/1.1
>>> User-Agent: curl/7.19.7 (i686-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8l 
>>> zlib/1.2.3.3
>>> Host: git.kernel.org
>>> Accept: */*
>>>
>> < HTTP/1.1 200 OK
>> < Date: Sun, 10 Jan 2010 09:21:53 GMT
>> < Server: Apache/2.2.14 (Fedora)
>> #### < Expires: never
>> < Transfer-Encoding: chunked
>> < Content-Type: text/html; charset=utf-8
>> <
>> #### here ends the headers and starts the body
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www/w3.porg/TR/html4/strict.dtd";>
>> <!-- git web interface version 1.6.4.GIT, (C) 2005-2006, Kay Sievers
>> <[email protected]>, Christian Gierke -->
>> <!-- git core binaries version 1.6.6 -->
>> <head>
>> <meta http-equiv="content-type" content="; charset=utf-8"/>
>> <meta name="generator" content="gitweb/1.6.4.GIT git/1.6.6"/>
>> <meta name="robots" content="index, nofollow"/>
>> #### <meta http-equiv="refresh" content="0"/>
>> <title></title>
>> </head>
>> <body>
>> Generating...</body>
>> </html>
>> * Connection #0 to host git.kernel.org left intact
>> * Closing connection #0
>> ~~~~~~~~
>>
>>    As you clearly see, the browser is said to refresh instantly
>> (that's why it becomes unresponsive), and the caching server is told
>> that this response **never** expires (that's why it doesn't move
>> on)...
>>
>>    After a second try, it gets things right:
>>
>> ~~~~~~~~
>> * About to connect() to git.kernel.org port 80 (#0)
>> *   Trying 149.20.20.136... connected
>> * Connected to git.kernel.org (149.20.20.136) port 80 (#0)
>>> GET 
>>> /?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=84d330ec80dc467baf6cb393d9c1ee006d1c024a
>>>  HTTP/1.1
>>> User-Agent: curl/7.19.7 (i686-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8l 
>>> zlib/1.2.3.3
>>> Host: git.kernel.org
>>> Accept: */*
>>>
>> < HTTP/1.1 200 OK
>> < Date: Sun, 10 Jan 2010 09:31:05 GMT
>> < Server: Apache/2.2.14 (Fedora)
>> #### < Expires: Mon, 11 Jan 2010 09:31:01 GMT
>> < Transfer-Encoding: chunked
>> < Content-Type: text/html; charset=utf-8
>> ...
>> ~~~~~~~~
>>
>>    Thanks,
>>    CIprian.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to