maru / libmicrohttpd-http2

HTTP/2 support for libmicrohttpd
https://http2.s106.net/
Other
22 stars 6 forks source link

Handling of requests over multiplexed streams #69

Open SharmaShikha-84 opened 5 years ago

SharmaShikha-84 commented 5 years ago

Hello,

On receiving multiple requests over streams , the library processes stream one by one and expects the response back from the first stream before moving to process another one. Scenario : Request 1 (over Stream 3), Request 2(over Stream 5) & Request 2(over Stream 9.)

At this time if 1 stream is blocked/taking some time, all others are blocked/delayed as well.

maru commented 5 years ago

Hi @coolshikhs ! Thank you for reporting this bug. This functionality is not implemented yet, but I should do it very soon.

Normally, if you know that the response can take time, you should use MHD_suspend_connection and MHD_resume_connection in your application request handler function.

See this: https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002dflow.html https://github.com/maru/libmicrohttpd-http2/blob/master/src/examples/suspend_resume_epoll.c

SharmaShikha-84 commented 5 years ago

Hi Maru, Do you have an idea when can we expect this functionality?

Thanks, Shikha

maru commented 5 years ago

Hi Shikha, sorry for the delay, I haven't had the time to look into it.

If you have an idea, you are more than welcome to propose the code! Let me know!

Best regards, Maru

SharmaShikha-84 commented 5 years ago

Hi Maru, Just wanted to check if you have had time to work on this or planning it any time soon? I was trying it myself but running into some memory fragmentation issues. Do let me know if you have something in mind regarding the approach. Regards, Shikha