Commit Graph

8 Commits

Author SHA1 Message Date
Nate McMaster 49b328d4c2 Handle absolute, asterisk, and authority-form request targets
Improves compliance with RFC 7230 on the expected handling of requests
that have URI or asterisk in the request target.

This means rejecting asterisk requests that are not OPTIONS and rejecting
authority-form requests taht are not CONNECT.

This also means the server will handle the path and query on targets
with absolute URIs as request-targets.
2017-03-09 16:54:12 -08:00
Cesar Blum Silveira bb973decb8 Unify header rejection messages.
- Log bad headers with escaped non-vchar characters
2017-03-08 15:27:44 -08:00
Cesar Blum Silveira 5743d740b4 Convert HTTP parsing FrameTests to IHttpParser tests (#1416).
- Also fix an issue in KestrelHttpParser where "Header: \r\n" is
  parsed with a value of " " instead of "".
2017-03-07 15:51:11 -08:00
Ben Adams e2f8c226ef Simplify TakeSingleHeader and Vectorize (#1457)
* Sanitize unsafe code
* Vectorize
* Extract Contains and add more tests
2017-03-07 13:30:57 -08:00
David Fowler 02a4342908 Made changes to TakeSingleHeader (#1453)
* Made changes to TakeSingleHeader
- Remove state machine and just parse in place
- Inline OnHeader into TakeSingleHeader
- Use IndexOfVectorized instead of custom indexof
- Normalize header whitespace error
- Combine IndexOf and IndexOfAny into a single IndexOfNameEnd call
2017-03-07 08:58:55 -08:00
Cesar Blum Silveira 11c7eb5665 Verify all request rejections are logged (#1295). 2017-03-06 12:05:38 -08:00
David Fowler 1d685e195e Parser cleanup and remove line continuation header error (#1431)
- Cleaned up some parsing logic (removed locals etc)
- Removing line continuation errors cleaned up code duplication
a little bit
2017-03-03 10:04:44 -08:00
Cesar Blum Silveira 568aaff9c4 Improve HTTP parsing tests (#1393).
- Add several more test cases
- Share data between functional and unit tests
2017-02-28 14:23:27 -08:00