On Fri, Mar 31, 2017 at 5:52 PM, Linus Torvalds wrote: > > The continuation logic is oddly complex, and I can't follow the logic. > But it is completely broken in how it thinks empty lines are somehow > "continuations". The attached patch seems to work for me. Comments? The logic is fairly simple: if we encounter an empty line, and we have pending in-body headers, we flush the pending headers, and mark us as no longer in header mode. The code used to just ignore empty lines when in header mode, which is garbage, exactly because it would happily continue accumulating more headers. There may be other cases this misses, but this at least seems to fix the case I encountered. Linus