[squid-users] Speed ​​limit from file size

Amos Jeffries squid3 at treenet.co.nz
Mon Jun 25 02:30:52 UTC 2018


On 25/06/18 05:32, Michael Pro wrote:
> Yes! I realized it!
> In store_id_program, I use the third-party utility "curl -sI
> http://url.to/real.file.zip"
> to define Content-Length and return to squid using the "note" mechanism
> in the desired ACL for response_delay_pool_access. Similarly,
> using the "note" mechanism, I force the files, depending on the extension
> and content in the cache, to use a specific tcp_outgoing_address
> or the specific FIB.
> 
> Could not you do this with the help of squid itself?

Infinite loop : To determine *how* to contact a server for that URL,
first contact a server for that URL.

The only reason your test "works" at all is that curl request is *not*
going through Squid. If you were to optimize it to send its traffic to
Squid you should see the loop immediately.

Also, there is no guarantee that a curl request to a server using curl
U-A and Accept-* headers and transfer compression capabilities - has any
relation to the actual response that same server will generate to a
request containing the clients U-A, Accept-* header, Cookies, and
transfer compression capabilities.

NP: I've seen a LOT of servers which produce 404 pages or short web
redirection pages  when robots or CLI like curl connect to them - but
the real download content when Browsers connect.

Amos


More information about the squid-users mailing list