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

Refactor form parsing to be sans-io #1788

Closed
davidism opened this issue Apr 12, 2020 · 1 comment · Fixed by #2017
Closed

Refactor form parsing to be sans-io #1788

davidism opened this issue Apr 12, 2020 · 1 comment · Fixed by #2017
Assignees
Labels
Milestone

Comments

@davidism
Copy link
Member

Currently, the parser assumes that it's reading from an open stream. However, in ASGI the data is fed as events, there is no input stream available. "Sans-IO" means writing the parser as a self-contained state machine that can be fed data incrementally with function calls rather than by passing a file. Some higher layer would do the IO and pass it to the parser, and the parser would be able to operate no matter how that works.

@edk0 created a proof-of-concept in #1330, but that code is not documented and pretty complicated. I'd prefer we treat that as a first pass towards a well tested, maintainable implementation.

@davidism
Copy link
Member Author

davidism commented Jan 21, 2021

@pgjones assigning this to you after our chat. It's not part of the 2.0.0 milestone, no rush. Here's the start of my comments I was referring to about extra multipart headers: #1848 (comment)

@davidism davidism added this to the 2.0.0 milestone Jan 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants