Redth / HttpTwo

A basic C# HTTP/2 client library
Apache License 2.0
120 stars 51 forks source link

END_STREAM is never set #16

Open MeisterLone opened 6 years ago

MeisterLone commented 6 years ago

Hi. First off, congrats.. this is still the only native .net implementation out there!

Ive been working on this for a while- lets say we want to connect to cloudflare.

http.GetStringAsync("https://www.cloudflare.com/").Wait();

It seems it actually gets all of the data, but for some reason the server never sets END_STREAM == 1, so it wil just stall while waiting for it. All of the data is sent by the server. Weird!

The last frame with 792 length should have END_STREAM set right? It doesnt seem like it has, after manually stepping through the code.

04:08:26.518 PM: -> [Frame: SETTINGS, Id=0, Ack=False, HeaderTableSize=, EnablePush=, MaxConcurrentStreams=, InitialWindowSize=, MaxFrameSize=, MaxHeaderListSize=] 04:08:29.441 PM: <- [Frame: SETTINGS, Id=0, Ack=False, HeaderTableSize=, EnablePush=, MaxConcurrentStreams=, InitialWindowSize=, MaxFrameSize=, MaxHeaderListSize=] 04:08:30.035 PM: <- [Frame: WINDOW_UPDATE, Id=0, WindowSizeIncrement=2147418112] 04:08:30.037 PM: -> [Frame: SETTINGS, Id=0, Ack=True, HeaderTableSize=, EnablePush=, MaxConcurrentStreams=, InitialWindowSize=, MaxFrameSize=, MaxHeaderListSize=] 04:08:30.039 PM: -> [Frame: HEADERS, Id=1, EndStream=True, EndHeaders=True, Priority=False, Weight=0, Padded=False, PadLength=0, HeaderBlockFragmentLength=19] 04:08:30.452 PM: <- [Frame: SETTINGS, Id=0, Ack=True, HeaderTableSize=, EnablePush=, MaxConcurrentStreams=, InitialWindowSize=, MaxFrameSize=, MaxHeaderListSize=] 04:08:31.206 PM: <- [Frame: HEADERS, Id=1, EndStream=False, EndHeaders=True, Priority=False, Weight=0, Padded=False, PadLength=0, HeaderBlockFragmentLength=461] 04:08:31.612 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:32.415 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:33.262 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:34.005 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=7399] 04:08:34.886 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:35.702 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:36.550 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:37.716 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=8192] 04:08:38.512 PM: <- [Frame: DATA, Id=1, EndStream=False, Padded=False, PadLength=0, PayloadLength=792]