News for hackers. Stuff that matters.
Re:Lwan: Experimental, scalable, high performance HTTP server by nly on Sunday October 12, 2014 @07:18PM (#8446893)
... and what happens if your header happens to run off the end of your buffer amongst the spaces that follow 'Hello'? Cookies can be huge, I can construct a header like 'Cookie: x[8000 spaces]y'
Re:Lwan: Experimental, scalable, high performance HTTP server by Retric on Sunday October 12, 2014 @10:30PM (#8447273)
This get's into the specifics so you almost need to know the code your dealing with to make a relevant suggestion.

However, the easy option is to default to the slow code path on edge cases which considering it's probably a rare enough it's not important to make fast as long it's bug free. IMO, optimizations are always a balancing act between minimizing the computer's effort and minimizing the coders effort while trying to maintain long term readability. But, you can always keep track of more than one buffer so the option is there.