sozu
sozu copied to clipboard
refactoring the HTTP header parser
trafficstars
In gitlab by @Geal on Dec 5, 2016, 18:13
The approach using an enum worked quite well to separate the various steps in parsing headers, but now it needs to have states combining length, host, connection, upgrade protocol. Until the end of the headers is reached, the various values we need to gather should be in a structure with optional fields. This will reduce the number of states, and we can still check if something has been already parsed or not.
The new state machine would keep the various end states.
@Geal This refactoring is still needed?
Do you have some more details to provide?
in progress on the dev branch