This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since the beginning of HTTPolice, I have been trying to keep header parsing and HTTP/1.x framing parsing together. Originally it was the exact same mechanism. Later, when I switched to Earley parsing, it proved too expensive for framing and I bolted on some regexes derived from the same grammar combinators. Later came strange things like `simple_parse`. Eventually it became clear to me that headers and framing are two very different use cases and they should be separated, which I did in this commit. The only thing they share now is the `ParseError`, and the associated need for framing to have 'hollow' grammar symbols purely for rendering these `ParseError`. This makes the code simpler and clearer, but more importantly, it solves the problem that we used to read entire TCP streams eagerly into memory before even starting to parse them (because our regex engine cannot read from a file on demand).
- Loading branch information
Showing
27 changed files
with
475 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.