spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Don't close server push streams on associated stream's close. #135

Closed nya3jp closed 10 years ago

nya3jp commented 10 years ago

Hi Fedor,

I found current code does not allow server pushes after their associated stream is closed, while it is allowed in spec. http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1#TOC-3.3.1-Server-implementation

Could you take a look please?

Thanks! Shuhei / nya

nya3jp commented 10 years ago

I mean this part in the spec:

The pushed streams do not need to be closed (FIN set) before the originating stream is closed, they only need to be created before the originating stream closes.

So new push can't be initiated after the associated stream is closed, but ongoing pushes are allowed to continue.

Munter commented 10 years ago

I've stumbled into this problem as well. It meant that I had to create some async callbacks for each push request to finish before I end the original request stream. +1 for fixing this.

indutny commented 10 years ago

Nice catch, thank you! May I ask you to remove access of .pushes property in the rest of the lib too?

nya3jp commented 10 years ago

Removed .pushes field. PTAL?

indutny commented 10 years ago

Thanks, landed and released in 1.20.0