Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203427

HttpClient HTTP/1.1 could be more lenient and accept LF as well as CRLF as header separator.

XMLWordPrintable

      It seems the lagacy HttpURLConnection will accept LF as well as CRLF as header separator. For the sake of interoperability we might want to consider the same with the new HttpClient.

      RFC 7230 says:

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

      This doesn't seem to extend to the CRLF terminator used to separate body chunks though.

            dfuchs Daniel Fuchs
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: