Stop reading the request body in the fibers web server #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rather out there suggestion of a breaking change to the (fibers web server). I want to be able to handle large file uploads (several GB) and don't want that several GB of data to sit in memory while the request is being processed.
Instead, the handler must read the request body if there is one to read.
The intention here is to make it possible to process the request body in different ways. For example, use a chunked input port if it's chunked, or maybe just write it to disk without first reading it all in to memory. This flexibility will make it feasible to use the fibers web server to handle requests where the body is of an unknown size, or large enough that you wouldn't want it in memory.
The biggest downside of this change is that it breaks the handler interface as it's just passed a single argument, rather than two, I'm not sure how to mitigate that though.