Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax message parsing requirement on CRLF line endings #106

Closed
akka-ci opened this issue Sep 8, 2016 · 2 comments
Closed

Relax message parsing requirement on CRLF line endings #106

akka-ci opened this issue Sep 8, 2016 · 2 comments
Labels
3 - in progress Someone is working on this ticket t:client Issues related to the HTTP Client t:server Issues related to the HTTP server
Milestone

Comments

@akka-ci
Copy link

akka-ci commented Sep 8, 2016

Issue by sirthias
Tuesday Mar 31, 2015 at 14:46 GMT
Originally opened as akka/akka#17114


RFC 7230 Section 3.5 says:

In the interest of robustness, a server that is expecting to receive
and parse a request-line SHOULD ignore at least one empty line (CRLF)
received prior to the request-line.

and

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.

Both points are currently not implemented as such.

Note that any changes here should also be done to the BodyPartParser so that MIME parsing also benefits from the more lenient parsing approach.

@akka-ci akka-ci added this to the http-backlog milestone Sep 8, 2016
@akka-ci
Copy link
Author

akka-ci commented Sep 8, 2016

Comment by sirthias
Tuesday Mar 31, 2015 at 14:47 GMT


/cc @jrudolph @RichardBradley

@ktoso ktoso added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted and removed t:http labels Sep 8, 2016
@jrudolph jrudolph added t:client Issues related to the HTTP Client t:server Issues related to the HTTP server and removed t:client Issues related to the HTTP Client t:http:server labels Nov 2, 2016
grizio added a commit to grizio/akka-http that referenced this issue Nov 24, 2016
@ktoso ktoso added 3 - in progress Someone is working on this ticket and removed 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted labels Nov 30, 2016
@ktoso ktoso modified the milestones: 10.0.1, backlog Nov 30, 2016
@jrudolph jrudolph modified the milestones: 10.0.1, 10.0.2 Dec 22, 2016
@ktoso ktoso modified the milestones: 10.0.3, 10.0.4 Jan 26, 2017
grizio added a commit to grizio/akka-http that referenced this issue Jan 28, 2017
…s good as CRLF.

* Add tests verifying `\n` alongside `\r\n` in all modified parsers
* Duplicate specs to test either with `\r\n` and with `\n` (force to test in both cases for future developments)
jrudolph added a commit that referenced this issue Feb 16, 2017
As mentioned in #106, parsers should also accept LF end of line as good as CRLF.
@jrudolph
Copy link
Member

Was fixed #840 for HTTP messages and headers. I created #868 to track the remaining part.

grizio added a commit to grizio/akka-http that referenced this issue Oct 28, 2017
This commit terminates the changes needed to accept LF and CRLF end of lines.

The development was done and merged in PR akka#840 for everything except body parsers.
This commit do the same thing for body parsers.

This commit do the following:

* Add tests verifying `\n` alongside `\r\n` in all BodyPartParser
* Create a new Specification for `BodyPartParser`
    * Based on `MultipartUnmarshallers` and `RequestParserSpec`
    * For both CRLF and LF configuration

See akka#106, akka#868
grizio added a commit to grizio/akka-http that referenced this issue Feb 24, 2018
This commit terminates the changes needed to accept LF and CRLF end of lines.

The development was done and merged in PR akka#840 for everything except body parsers.
This commit do the same thing for body parsers.

This commit do the following:

* Add tests verifying `\n` alongside `\r\n` in all BodyPartParser
* Create a new Specification for `BodyPartParser`
    * Based on `MultipartUnmarshallers` and `RequestParserSpec`
    * For both CRLF and LF configuration

See akka#106, akka#868
grizio added a commit to grizio/akka-http that referenced this issue Feb 24, 2018
This commit does the following:

* Use `MultipartUnmarshallersSpec` instead of rewriting our own
* Explicit at design level the issue about eol configuration not already defined

See akka#106, akka#868
raboof pushed a commit that referenced this issue Apr 24, 2018
This commit terminates the changes needed to accept LF and CRLF end of lines.

The development was done and merged in PR #840 for everything except body parsers.
This commit do the same thing for body parsers.

This commit do the following:

* Add tests verifying `\n` alongside `\r\n` in all BodyPartParser
* Create a new Specification for `BodyPartParser`
    * Based on `MultipartUnmarshallers` and `RequestParserSpec`
    * For both CRLF and LF configuration
* Use `MultipartUnmarshallersSpec` instead of rewriting our own
* Explicit at design level the issue about eol configuration not already defined

See #106, #868
@raboof raboof modified the milestones: 10.0.4, 10.1.2 Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - in progress Someone is working on this ticket t:client Issues related to the HTTP Client t:server Issues related to the HTTP server
Projects
None yet
Development

No branches or pull requests

4 participants