-
Notifications
You must be signed in to change notification settings - Fork 824
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
more support for request streaming #1601
Comments
Is anyone working or interested in this feature request? How can we help to find interested parties to implement? |
I'm interested in http1 part, but not clearly understand how to implement this feature. |
@kazuho any pointers as to where to begin? |
#1357 would be a good start, since that implemented request streaming for http2 and the proxy handler. The key part is that it makes handlers (mruby, fastcgi, proxy, ...) declare whether they support streaming via
|
I see, thanks @deweerdt. And how would this translate on the Mruby side? (ie. how would you trigger the callback or notification to get new chunks from the data stream) |
For mruby this would translate in to setting up the write chunk callback so that the frontend protocol (http2 only currently) can write body chunks as they become available. Here's where proxy does it: https://github.com/h2o/h2o/blob/master/lib/core/proxy.c#L632 |
Sorry guys.. actually I've had an implementation of mruby request streaming that's nearly completed, but haven't pushed for a long time. I filed a work-in-progress PR as #1980. @tomas if you're interested in implementing it, it'd be appreciated if you work based on that branch, and feel free to ask me anything. If instead you just want to use it, please wait just a little longer. |
Great news @i110! I can help with the testing, if it helps. I'm working on a streaming multipart parser and would love to try it with your branch. From what I see on your PR, it should work as it is, right? (At least for receiving and not sending data) |
I see some work for http 1 request streaming has landed in #2007 -- Can somebody clarify whether it is now expected to work on HTTP 1.1? I modified the When I force CURL to use HTTP 1.1, the https://gist.github.com/kishorenc/9aa7073fd31e10b5bcc4ceec9682cd0e#file-h2o_streaming-cpp-L61-L77 A quick clarification would be much appreciated. |
@kazuho @deweerdt Sorry to bump this thread again. I tried building against master and still face the same issue -- request streaming is not working on HTTP 1.1 but works for HTTP 2 -- can you please confirm the status of request streaming support for HTTP 1.1? Thank you. |
@kishorenc does call req->proceed_req manually help? |
That worked @chenbd -- the trick was to call Very grateful for your help here. Thank you. |
@chenbd or others, I've a follow up question here: The desired behavior is for the next chunk of request body to be sent to the callback only when Why there is a difference in behavior between HTTP 1.1 and HTTP 2? Is the HTTP 2 behavior a bug? |
Found the issue: |
With the merger of #1357 it has become possible to stream request body to the application without buffering entire content in H2O. However, the feature has so far been only implemented by the http2 protocol handler and the proxy handler.
We need to implement the feature in the following modules as well.
relates to: #1585
The text was updated successfully, but these errors were encountered: