On 8/04/2014 3:02 p.m., Sylvio Cesar wrote:
> Amos, how I use squidclient to download a file .flv for example??
>
squidclient -h shows the full set of parameters available and what they
do. As with any good command line tool.
Via proxy on localhost:
squidclient http://stackoverflow.com/
Via proxy at example.com (could be an IP if needed):
squidclient -h example.com http://stackoverflow.com/
Direct from the web server:
squidclient -p 80 -h stackoverflow.com /
NP: Depending on tool version you may or may not also need the "-j
stackoverflow.com" or " -H 'Host:stackoverflow.com\n' " parameters to
set the Host: header explicitly.
The -H takes a string of extra headers separated by \n to add to the
request.
Amos
> 2014-04-07 23:35 GMT-03:00 Amos Jeffries <squid3_at_treenet.co.nz>:
>>
>> "Vary:*" means the response changes depending on factors outside the
>> HTTP protocol for which shared proxies like Squid are 100% unable to
>> determine whether the cached response is appropriate to deliver.
>> Even if you did store it, the cache would still always MISS.
>>
>> FWIW: The server for stackoverflow is presenting several conflicting
>> cache controls. Personally I think that server should be emitting an
>> ETag header and Cache-Control:max-age=60 instead of the Vary and the
>> Cache-Control's it is using. But even so there is still nothing any
>> proxy can do about it except MISS.
>>
>> Also, be aware that curl by default sends cache control headers forcing
>> a MISS, so it is not the best tool to be testing proxies with. Prefer
>> wget, squidclient, or the HTTP validator at http://redbot.org/.
>>
>> Amos
>>
>> On 8/04/2014 2:00 p.m., Sylvio Cesar wrote:
>>> curl -x localhost:3128 --silent -o /dev/null --dump-header /dev/stdout
>>> http://stackoverflow.com
>>> HTTP/1.1 200 OK
>>> Cache-Control: public, max-age=18
>>> Content-Type: text/html; charset=utf-8
>>> Expires: Tue, 08 Apr 2014 02:00:38 GMT
>>> Last-Modified: Tue, 08 Apr 2014 01:59:38 GMT
>>> Vary: *
>>> X-Frame-Options: SAMEORIGIN
>>> Date: Tue, 08 Apr 2014 02:00:18 GMT
>>> Content-Length: 212147
>>> X-Cache: MISS from sylviosuse11
>>> X-Cache-Lookup: MISS from sylviosuse11:3128
>>> Via: 1.1 sylviosuse11 (squid/3.4.4)
>>> Connection: keep-alive
>>>
>>
>
>
>
Received on Tue Apr 08 2014 - 03:56:37 MDT
This archive was generated by hypermail 2.2.0 : Tue Apr 08 2014 - 12:00:05 MDT