Hi all,
   This patch try to implement  the first option from those described at 
the squid-dev thread with subject "Request URI logging for malformed 
requests":
   http://www.squid-cache.org/mail-archive/squid-dev/201101/0004.html
The goal of this patch is to apply uri_whitespace before logging 
malformed requests.
Currently the logged URI set using the setLogUri method (in 
client_side.cc and client_side_reply.cc files). Also the setLogUri 
called at least two times for every normal request. Moreover the 
setLogUri always check if the URI contains characters which must escaped 
which in the case of normal requests it is not needed because 
urlCanonicalClean always used before pass the URI to setLogUri.
This patch:
  - add a parameter to the setLogUri to say if the URI must cleaned and 
the uri_whitespace filtering must applied.
  - Remove the setLogUri call from the parseHttpRequest.
  - Call in all cases (HTTP request error or not) the setLogUri in 
clientProcessRequest
   - In the case the URL is not a valid HTTP request applies the 
uri_whitespace filtering.
   - In the case the URI is valid the uri_whitespace filtering is not 
required because it is already applied by the urpParse function.
Regards,
     Christos
This archive was generated by hypermail 2.2.0 : Tue Feb 01 2011 - 12:00:07 MST