rejetto forum

HTML line ending with LF

hykang · 3 · 3687

0 Members and 1 Guest are viewing this topic.

Offline hykang

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
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


Offline Oxyandy

  • Occasional poster
  • *
    • Posts: 27
    • View Profile
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)
« Last Edit: September 14, 2013, 03:30:01 AM by Oxyandy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile
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