[squid-dev] Digest related question.
Eliezer Croitoru
eliezer at ngtech.co.il
Mon Mar 16 02:03:28 UTC 2015
Hey Jack,
Thanks for the links and the help.
I have started working on a pesudo for a way to test\implement some of
the ideas but it is still very far from reality.
The basic code is at:
http://www1.ngtech.co.il/paste/1292/
Which means that if I do trust the source domain I will try to analyze a
head request first before any decision.
(there should be a way to override the request redirection or any other
thing we would want to do with it)
An option would be to add the url into a DB with one to many and many to
one relationship.
And since the pesudo code should be the first step before StoreID helper
run-time, StoreID in place can apply an internal address per a digest of
choice or even multiple choices.
My main concern until now is that if squid would have the cached object
in a digest url form such as:
http://digest.squid.internal/MD5/xyz123"
Squid would in many cases try to verify against the origin server that
the cached object has the same ETAG and MODIFICATION time.
I am unsure yet on how to "resolve" this issue in an elegant way which
would not violate the RFCs.
Another subject is the Link headers which I am still considering how to
use compared to Digest which is simple enough.
Any ideas on a direction how to solve any of the above issues(even if I
have not seen them until now) are welcomed at
squid-dev at lists.squid-cache.org.
Eliezer
On 15/03/2015 04:02, Jack Bates wrote:
> Some of the sites listed here send Digest headers:
> http://www.metalinker.org/samples.html#externalsites
>
> e.g.
> $ curl -v download.documentfoundation.org/libreoffice/stable/4.4.1/rpm/x86/LibreOffice_4.4.1_Linux_x86_rpm.tar.gz > /dev/null
>
> < HTTP/1.1 302 Found
> < Link:<http://tdf.mirror.rafal.ca/libreoffice/stable/4.4.1/rpm/x86/LibreOffice_4.4.1_Linux_x86_rpm.tar.gz>; rel=duplicate; pri=1; geo=ca
> < Link:<http://mirror.nexcess.net/tdf/libreoffice/stable/4.4.1/rpm/x86/LibreOffice_4.4.1_Linux_x86_rpm.tar.gz>; rel=duplicate; pri=2; geo=us
> < Digest: SHA-256=Ggb4nPDpd2T92wVi8k7+w+KND6GjGv6q1biDAWE8snY=
> < Location:http://tdf.mirror.rafal.ca/libreoffice/stable/4.4.1/rpm/x86/LibreOffice_4.4.1_Linux_x86_rpm.tar.gz
>
> Here is an actual example of rewriting the response
> so a client gets a file that's already cached:
> https://groups.google.com/d/msg/metalink-discussion/ww5fFdLfaZo/cSo4Viss85kJ
More information about the squid-dev
mailing list