On 18/03/11 16:48, Yucong Sun (åéé) wrote:
Hi there,
Is there a way that squid can be configured to retry a fetch for a
configurable time, if last response is not valid response?
No. There is no reason to expect a different response from that source.
"Squid is an HTTP proxy." as the familiar line goes. That means that
Squid only acts on a clients behalf.
By invalid response I mean:
1) response is totally empty.
If by "totally" you mean the server just closes the connection...
Squid will retry from alternative sources whenever possible. If all
else fails a "Zero Sized Reply" (HTTP status 502) will be sent to the
client agent for it to work with.
Again any retry is entirely up to the client.
or 2) is not a http response
Squid will report the attempted data-smuggling attack to the client (as
one of the 5xx "Server Error" HTTP status codes) and log details of the
event for the server administrator. Then terminate the connection,
dumping all in-transit data related to it.
NP: Squid-3.1 supports both HTTP and ICY protocol replies. Others MUST
be wrapped appropriately in valid HTTP.
or 3) http status code is 5xx
Squid will retry from alternative sources whenever possible and if all
else fails may send a stale cached copy of the requested object back
with "Warning:" headers indicating the staleness and other problems.
Any further retry is entirely up to the client.
The retry_on_error directive can be turned on to make Squid retry harder
on a couple of edge cases (403 Forbidden, 501 Not Implemented, 503
Service Unavailable and 500 Internal Server Error).
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.11
Beta testers wanted for 3.2.0.5