[squid-dev] Implementing draft-ietf-httpbis-header-structure

Amos Jeffries squid3 at treenet.co.nz
Tue Apr 25 20:54:51 UTC 2017


The class HttpHeader currently provides a mixed bunch of methods to 
retrieve headers as a blob of ASCII in a String. This is causing a lot 
of code almost-duplication, String copying, validation difficulties, 
etc. Our Parser-NG project seeks to reduce this and make it a lot more 
efficient by scoping the parse action inside Parser that can be audited 
for accuracy isolated from the complications of header semantic handling.

Several of the IETF HTTPbis WG members have a parallel project underway 
to refactor the HTTP headers into some form of consistent syntax. The 
latest results of that background work is 
<https://tools.ietf.org/html/draft-ietf-httpbis-header-structure>. PHK 
submitted this draft, but it builds on a lot of work from Julien and others.


The implementation of this would be refactoring HttpHeader so most 
headers can be parsed and syntax validated in one place (inside 
HttpHeader) and callers receive a structured tree conforming as much as 
possible to the common header structure instead of a String blob. The 
callers then (at worst) only need to know what key or parameter it is 
looking for and how to scan the tree for that instead of parsing the 
whole String.


Anyone interested in joining the WG discussion of the draft and/or 
working on the Squid refactoring with me?

Amos



More information about the squid-dev mailing list