[squid-dev] [PREVIEW] Fixed reporting of NULL header characters
Alex Rousskov
rousskov at measurement-factory.com
Fri Aug 5 05:28:51 UTC 2016
Hello,
Our Level-1 "WARNING: HTTP header contains NULL characters" messages
were broken as was the level-7 reporting of the headers being parsed.
Level-2 reporting of "HTTP Server RESPONSE" headers (and probably raw
data in other contexts) was and still is broken. These lying-debugging
problems could waste quite a bit of time during triage.
Please see the patch preamble for details. I believe similar problems
affect both v3.5 and trunk although I have been working only with trunk
during triage. Sample debugging logs are quoted below.
I am posting this patch as a PREVIEW to warn folks about these bugs and
to ask for volunteers to complete the two remaining TODOs detailed in
the preamble. Would anybody be willing to be responsible for this work?
Thank you,
Alex.
------ unpatched v3.5 output ------
> 2016/08/04 23:16:48.738| 55,7| HttpHeader.cc(597) parse: parsing hdr: (0x23ea928)
> Before-Null: foo
>
> 2016/08/04 23:16:48.738| WARNING: HTTP header contains NULL characters {Before-Null: foo
> }
> NULL
> {Before-Null: foo
>
> 2016/08/04 23:16:48.738| 55,7| HttpHeader.cc(480) clean: cleaning hdr: 0x23ea928 owner: 3
------ patched trunk output -------
> 2016/08/04 23:13:40.879| 55,7| HttpHeader.cc(329) parse: 0x175f668 got buf[171]={
> Before-Null: foo
> .After-Null: bar
> Server: DaftServer/1.0
> Connection: close
> Date: Fri, 05 Aug 2016 05:13:40 GMT
> X-Daft-Response-ID: midcc64dd2c
> Content-Length: 12
>
> }
> 2016/08/04 23:13:40.879| WARNING: HTTP header contains a NULL character; before[18]={
> Before-Null: foo
> } and after[152]={
> After-Null: bar
> Server: DaftServer/1.0
> Connection: close
> Date: Fri, 05 Aug 2016 05:13:40 GMT
> X-Daft-Response-ID: midcc64dd2c
> Content-Length: 12
>
> }
> 2016/08/04 23:13:40.879| 55,7| HttpHeader.cc(184) clean: cleaning hdr: 0x175f668 owner: 3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: null-char-in-header-t1.patch
Type: text/x-diff
Size: 9423 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20160804/ee7699cc/attachment.patch>
More information about the squid-dev
mailing list