[squid-dev] [PATCH] url_rewrite_timeout directive

Tsantilas Christos chtsanti at users.sourceforge.net
Sat Nov 15 18:38:05 UTC 2014


Hi all,

This patch adds the url_rewrite_timeout directive.

When configured, Squid keeps track of active requests and treats timed 
out requests to redirector as failed requests.

url_rewrite_timeout format:
   url_rewrite_timeout timeout time-units 
on_timeout=<fail|bypass|retry|use_configured_response> 
[response=<quoted-string>]

The url_rewrite_timeout directive can accept the on_timeout argument to 
allow user configure the action when the helper request times out.
The available actions are:
      - fail: squid return a ERR_GATEWAY_FAILURE error page
      - bypass: the url is not rewritten.
      - retry: retry the request to helper
      - use_configured_response: use a response which can be configured 
using the the response= option

Example usage:
     url_rewrite_timeout 30 seconds \
         on_timeout=use_configured_response \
         response="OK url=http://example.com/support"


Technical details
=====================

This patch:
  - adds mechanism inside helpers.cc code to handle timeouts:
     - return a pre-configured response on timeout
     - or retries on timeouts.
     - or timedout (Helper::TimedOut code) response to the  caller. The 
caller can select to ignore the timedout request, or produce an error.

  - modify the client_side_request.cc to return ERR_GATEWAY_FAILURE 
error page. Also the error detail ERR_DETAIL_REDIRECTOR_TIMEDOUT is set 
to identify the type of error.


This is a Measurement Factory project
-------------- next part --------------
A non-text attachment was scrubbed...
Name: url_rewrite_timeout-all-t2.patch
Type: text/x-patch
Size: 81043 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20141115/5ccc1095/attachment-0001.bin>


More information about the squid-dev mailing list