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

Features #1

Open
vinipsmaker opened this issue Aug 30, 2014 · 2 comments
Open

Features #1

vinipsmaker opened this issue Aug 30, 2014 · 2 comments

Comments

@vinipsmaker
Copy link

The parser should consume a few headers, then it won't need to revisit them and it'll be able to continue parsing:

  • content-length
  • chunking-related headers

The parser shouldn't need to keep any byte buffered once the byte is parsed.

It should be possible to reset the parser at anytime.

The parser should be configurable (via traits?), then we could define things like:

  • Max URL size.
  • Max header field name size.
  • Max header field value size.
  • Max number of headers.
@felipealmeida
Copy link
Owner

Hello @vinipsmaker

The idea here on the parsers is that it is written as unified grammars. The parsing algorithm would consist of inputing this grammar and the range of iterators of the data and save the structured information in a heterogeneous sequence (e.g, a fusion sequence).

Also, with the same grammar we would have the code to generate the MIME headers (and etc) using the same grammar while receiving the heterogeneous sequence and a output iterator where the formatted data is written.

Do you have needs bigger than just header parsing I imagine right? What would be those (e.g., http chunking) ?

@vinipsmaker
Copy link
Author

Do you have needs bigger than just header parsing I imagine right? What would be those (e.g., http chunking) ?
A little more, yes. Finding the beginning and the end of the body (with HTTP pipelining support).

And definitively a MUST is to support resuming partially received messages. It's a networked environment, after all.

The parsing algorithm would consist of inputing this grammar and the range of iterators of the data and save the structured information in a heterogeneous sequence (e.g, a fusion sequence).

Can you expand on that? How much control will the user maintain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants