Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Push promise handler #34

Closed
wants to merge 5 commits into from
Closed

Push promise handler #34

wants to merge 5 commits into from

Conversation

brk0v
Copy link

@brk0v brk0v commented Mar 15, 2015

Improving DanielMorsing's (#23) push branch:

  • add concurrency counter and counter logic for push promise streams (curOpenPushStreams and etc);
  • add state transition to stateHalfClosedRemote on push stream when sending headers (writeHeaders());
  • add logic to closeStream();
  • minor refactoring.

DanielMorsing and others added 4 commits December 10, 2014 17:07
As predicted, I ended up unifying the Headers and Push Promise packing.

This is in preparation for reusing the writeResHeaders functionality
of sending continuation frames if the headers are too big.
The API uses loopback to the top handler in order to make sure that
the resources being pushed are related to the resource being fetched.

If the header parameter is nil, we copy the headers from the initiating
request. This is mostly a shortcut for the common case where we don't
want to specify any new request headers.
…client concurrent streams to 100 and make some code refactoring from DanielMorsing.
@brk0v brk0v mentioned this pull request Mar 15, 2015
* add default priority and dependency for push stream;
* add check in processData function for push stream.
panic("Push called after Handler finished")
}
if h == nil {
h = rws.req.Header

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I understand this correctly... If the response handler that handles the initial request that comes from the client does a "Set-Cookie", the follow-up (pushed) request won't see the cookie, because the headers are simply copied from the initial request that comes from the client.

Should the cloned header include the cookie that was just set?

@bradfitz
Copy link
Owner

This repo just moved into the official Go repo.

See https://github.com/bradfitz/http2/blob/master/README for the move details.

File new bugs at: https://github.com/golang/go/issues/new?title=x/net/http2:+

Closing this PR as we're now using Gerrit for code review. Please file a bug or send the review to Gerrit if this is still relevant. Sorry for how long this languished here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants