AW: [squid-users] Password procted pages and cache

From: Matthias Wessendorf <mwessendorf@dont-contact.us>
Date: Tue, 3 May 2005 08:53:53 +0200

Henrik,

thanks for your quick response.

comments inline.

> > I am playing with Squid to enalbe it to cache password
> protected pages.
> >
> > Is this posible?
>
> Partly.
>
> You can have the web server set "Cache-Control: public"
> telling the cache
> that even thou there was login credentials in the request the
> returned
> response does not really require a password and may be cached.

What I did was I set http header "Cache-Control: public"
and also "Cache-Control: public, no-cache" (because of this tut:
http://www.mnot.net/cache_docs/)

But both have no effect. My Squid logfile tells me, that the PDF is not
saved on disk

<snip>
1115102675.242 RELEASE -1 FFFFFFFF FDB582494E1AE4B7E15603AE2CDD951A 200 1115102675 1113484586 3600 application/pdf 194135/194135 GET http://localhost:9090/velocity/hivemind.pdf
</snip>

But, after I removed the HTTP Basic authentifaction stuff it works and Squid saves a PDF on my disk

<snip>
1115048864.915 SWAPOUT 00 000000A5 75DDAA42F881E13BE18D9B42BFD2BC25 200 1115048864 1038673358 -1 application/pdf 7582/7582 GET http://localhost:9090/velocity/ENUtxt.pdf
</snip>

So, why do I need to *store* some documents like a PDF:

We're sending lot's of emails that contain a (protected) link to
a document like a PDF. But Squid should only *load* the PDF on the first
request and save it after that to its cache store.

For the next request Squid should ask (for the same PDF) only
IF-NONE-MATCH to the web server and if PDF is the same (what it really is)
web server sends "304" back. Now Squid should use its PDF file and send it
back to the other client with "200". since that client has that PDF not in its
local cache.

Are there any hints on that issue?

Thanks a lot.

Regards,
Matthias

> You can also tweak the Squid sources to assume this. IIRC
> there is a patch
> in bugzilla (or maybe it's on devel.squid-cache.org) for adding
> refresh_pattern options to control this.
>
> But be warned that this effectively removes the password
> protection from
> the pages.
>
> Regards
> Henrik
>
Received on Tue May 03 2005 - 00:54:03 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Jun 01 2005 - 12:00:02 MDT