Search squid archive

[squid-users] Re: content mixed up.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  I have finally fixed the problem with trial and error, testes I have
done suggest my fix works , but I'm not certain if I'm fixing my
problem the right way. I would really appreciate if anyone would spare
a few minute to review what I have found and let me know if I there's
better way I can address the problem.

  What turns out to be the cuase of the problem is the new redirector
script I am using.

  I have build this redirector to enable us to serve both static and
dynamic content via the same web interface but by different daemon
(for https if you wonder why I'm doing that), this redirector script
will distribute different url to different httpd depending on its uri.
 in the case of static html file, they are routed to localhost port
8080.  So my redirector return this

http://127.0.0.1:8080/<somefile.htm>

  It turn out this url casued the problem I'm seeing,  it would
appears as like squid is caching content using this post-redirector
url instead of the incomming, pre-redirector url as the 'key' (forgive
me if this is not the correct term) to the object.

  So I come up with a little hack to the redirector script to append
?host=<webinterface> to all request to static content, and the problem
disappears.

  To be honest I am not very happy with my guess of this cache key
theory caus that doesn't explain why the problem happen onw way not
the other (I can see green from the blue interface but never blue from
the green interface), but that's the closest description I can think
of.

Many thanks.

Tor.


On 5/27/05, Victor Tsang <htsang@xxxxxxxxx> wrote:
> Please forgive me if this question has been asked/reported before, I
> couldn't find anything on the list or faq that suggest a solution.
> 
> I have just been asked by the our designer of a strange problem he
> observed.  While he was working on some new template on 2 of our
> testing site, he notices that after he shift-reload a certain static
> html on one of the site (let's call it site A), if he is to open the
> same url in the second site (Site B), which of course has some
> different content, he would landed getting content of the same URL in
> site A.
> 
> To demonstrate the problem, I have prepared the following url.
> 
> Site A - http://mymail.kafai-green-v1.sme.outblaze.com/test.htm
> Site B - http://mymail.kafai-blue-v1.sme.outblaze.com/test.htm
> 
> Step 1) Open 2 browser instant (or 2 tab) bring each url up.
>  Note : Site A should give you the word 'green' while site B give you
> the word 'blue'
> Step 2) shift-reload site A, then go to site B and reload (without shift).
> 
> From what I see here I landed with the word 'green' show up on Site B.
> 
> (Note, if you can not replicate the problem with a browser, try these
> telnet command)
> 
> Step 1 -
> telnet mymail.kafai-green-v1.sme.outblaze.com 80
> GET /test.htm HTTP/1.0
> Host: mail.kafai-green-v1.sme.outblaze.com
> Pragma: no-cache
> 
> telnet mymail.kafai-blue-v1.sme.outblaze.com 80
> GET /test.htm HTTP/1.0
> Host: mail.kafai-blue-v1.sme.outblaze.com
> Pragma: no-cache
> 
> (you should see the word green as html body for the first site and
> blue for the second site)
> 
> Step 2 -
> telnet mymail.kafai-green-v1.sme.outblaze.com 80
> GET /test.htm HTTP/1.0
> Host: mail.kafai-green-v1.sme.outblaze.com
> Pragma: no-cache
> 
> telnet mymail.kafai-blue-v1.sme.outblaze.com 80
> GET /test.htm HTTP/1.0
> Host: mail.kafai-blue-v1.sme.outblaze.com
> 
> You should see 'green' after completing these 2 command.
> 
> btw, the problem wouldn't work the other way around, I mean, if you
> load site B (Blue one) before Site A (green one) the problem wouldn't
> shows up.
> I'm running squid as http accelator in front of a apache installed in
> localhost, the 2 hosts are different vhost with different document
> root.  I have upgraded squid to stable 10 yesterday and am still
> seeing this issue.  Disabling squid would solve the problem.
> 
> 
> Any help would be much appreciated.
> 
> Tor.
>


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux