Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Newlines in HTTP

The HTTP 1.1 standard says that newlines are CRLF. However wget, lynx, and firefox, all accepts a response in UNIX format.

Is it acceptable for a HTTP parser to simply skip all carriage returns in the header?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

From RFC 9112, section 2.2:

Although the line terminator for the start-line and fields is the
sequence CRLF, a recipient MAY recognize a single LF as a line
terminator and ignore any preceding CR.

If you were to build a recipient (client or server), it would be RFC compliant to parse requests that only send an LF as line terminator.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading