Hacker News new | ask | show | jobs
by homero 2307 days ago
Headers are just text mixed with body and hard to figure out where they stop
2 comments

Headers stop when you have 2 line endings consecutively[1], I don't see why it's hard.

[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4....

Easy. They stop after \r\n\r\n.

There is no other RFC compliant way to end headers.