Adding a missing header - Squid 2.7STABLE5

From: Lucas Brasilino <lucas.brasilino_at_gmail.com>
Date: Wed, 3 Dec 2008 00:26:23 -0200

Hi!

Since when there's a POST request without 'Content-Length' header
rises an error, I was
playing around (just for fun) to add this header to request before the
request headers gets processed. I've tried to add
a code like:

if (method == METHOD_POST) {
  if (!httpHeaderHas(req_hdr, HDR_CONTENT_LENGTH) {
       httpHeaderPutSize(req_hdr, HDR_CONTENT_LENGTH, content_length);
  }
}

But I'm not sure in which point to insert this code. I've tried at
clientInterpretRequestHeaders(), with
no success. Seems that the write point is in parseHttpRequest(), but
in this point clientHttpRequest
structure is not ready.....

Any tip ? ;-)

regards
Lucas Brasilino
Received on Wed Dec 03 2008 - 02:26:26 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 03 2008 - 12:00:03 MST