On 09/04/2012 04:34, Paolo Malfatti wrote:
> Hi, i�m using storeurl.pl script to cache youtube videos files and I
> followed instructions in:
>
> http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube#ConfigExamples.2BAC8-DynamicContent.2BAC8-YouTube.2BAC8-Discussion.FixedThis
> patch don't worked for me, so I changed it a bit:1) I'd like to ignore
> redirects, only when request is a storeurl request.2) I dont like to
> force a MISS to "304 NOT MODIFIED" responsesWhat do you think
> about?ThanksPaolo MalfattiCIDIS CamiriIndex:
> src/client_side.c===================================================================---
> src/client_side.c (revision 134)+++ src/client_side.c (working copy)@@
> -2408,6 +2408,17 @@ is_modified = 0; } }+ /* bug fix for 302
> moved_temporarily loop bug when using storeurl*/+ if (r->store_url &&
> rep->sline.status >= 300 && rep->sline.status <400 && rep->sline.status
> != 304) {+ if (httpHeaderHas(&e->mem_obj->reply->header, HDR_LOCATION))
> {+ debug(33, 2) ("clientCacheHit: Redirect Loop
> Detected:%s\n",http->uri);+ http->log_type = LOG_TCP_MISS;+
> clientProcessMiss(http);+ return;+ }+ }+ /* bug fix end here*/ stale =
> refreshCheckHTTPStale(e, r); debug(33, 2) ("clientCacheHit:
> refreshCheckHTTPStale returned %d\n",stale); if (stale == 0) {
>
on what version of squid are you trying to do it?
it works poorly and only on squid 2.X
you can try this:
http://code.google.com/p/youtube-cache/
with nginx or php.
works like a charm.
Regards,
Eliezer
-- Eliezer Croitoru https://www1.ngtech.co.il IT consulting for Nonprofit organizations eliezer <at> ngtech.co.ilReceived on Mon Apr 09 2012 - 10:07:10 MDT
This archive was generated by hypermail 2.2.0 : Mon Apr 09 2012 - 12:00:03 MDT