rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: hykang on September 13, 2013, 05:01:39 AM

Title: HTML line ending with LF
Post by: hykang on September 13, 2013, 05:01:39 AM
Hi, I've just testing the HTTP request packets with line ending "LF"(\n) instead of "CR LF"(\r\n). However, I found that the HFS does not response to client host. Does the HFS can response to this line ending?
Note: In RFC 2616, there is a section to state the tolerance provision about line ending. In Stackoverflow, there is a thread about line ending on HTTP request: http://stackoverflow.com/questions/5757290/http-header-line-break-style
Title: Re: HTML line ending with LF
Post by: Oxyandy on September 13, 2013, 08:50:31 AM
No, it doesn't respond

You can split a request to a new line with OA (LF)
But, request should finish with 0D 0A 0D 0A (CR,LF,CR,LF)
or minimum (CR,CR) works
(LF,LF) wont

Quote
> HEAD /SOME PATH THAT DOESN'T EXIST HTTP/1.1
> bla,bla
> Another line ending with LF
>
> The line above blank (LF,LF):
> last line, ok ?:
13/09/2013 4:43:46 PM 192.168.1.1:24643 Not served: 404 - Not found

You said "HFS can response to this line ending?"
The answer is YES, you can "begin a new line" in the request with LF.
But the "whole request" can not be terminated with LF or LF,LF (as above)
Title: Re: HTML line ending with LF
Post by: rejetto on September 16, 2013, 10:48:47 PM
indeed, CR CR works too, LF LF doesn't.

i don't remember anymore why i did so, but i guess the ENTER key is sending a CR, so to support telnet sessions