Search squid archive

Re: Youtube, storeurl and 302 redirection

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

 



Yes, but i saw that the secuence of parameters changes : sometimes "id" is before "range" and sometimes after.

-----Mensaje original----- From: Hasanen AL-Bana
Sent: Monday, April 09, 2012 2:33 PM
To: Paolo Malfatti
Subject: Re:  Youtube, storeurl and 302 redirection

ahh...so if we include the range parameter in the storeurl , we might
get something working.

On Mon, Apr 9, 2012 at 7:10 PM, Paolo Malfatti <paolo@xxxxxxxx> wrote:
I know, but when the flash player asks a segment, it puts a range parameter
in the GET request. The script captures and saves these fragments in the
cache  individually.

From: Hasanen AL-Bana
Sent: Monday, April 09, 2012 1:19 AM
To: Paolo Malfatti
Cc: squid-users@xxxxxxxxxxxxxxx

Subject: Re:  Youtube, storeurl and 302 redirection

you will face a major problem , recently youtube decided to split videos
into 1.7MB segments,making it harder for people to download the streamed
videos, most of the newly uploaded videos are coming
into segments now, causing squid to cache only one segment and it thinks
that the video has been fully downloaded, this will either give you error in
flash player or you might get few seconds of the video
only.



On Mon, Apr 9, 2012 at 4:34 AM, Paolo Malfatti <paolo@xxxxxxxx> 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" responses

What do you think about?
Thanks

Paolo Malfatti
CIDIS Camiri
Index: 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) {









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

  Powered by Linux