Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd ENABLE_PUSH flag in the Upgrade HTTP2-Settings header #310
Conversation
Push flag required for the case the initial upgrade request triggered server push.
|
Thanks for this! This patch is reasonable, but there are a bunch of tests failing that need to be updated to take account of this change. Do you mind doing that? |
|
I'll look into. |
|
So you've fixed some of the test failures, but you're now not actually testing that this data gets emitted. We do need to add a new test to cover this branch. |
| @@ -276,6 +277,9 @@ def _add_upgrade_headers(self, headers): | |||
| # Settings header. | |||
| http2_settings = SettingsFrame(0) | |||
| http2_settings.settings[SettingsFrame.INITIAL_WINDOW_SIZE] = 65535 | |||
| if self._enable_push is not None: | |||
| http2_settings.settings[ | |||
| SettingsFrame.ENABLE_PUSH] = int(self._enable_push) | |||
This comment has been minimized.
This comment has been minimized.
Lukasa
Feb 21, 2017
Member
Rather than break here, can you do this?
http2_settings.settings[SettingsFrame.ENABLE_PUSH] = (
int(self._enable_push)
)
This comment has been minimized.
This comment has been minimized.
|
So, as noted, this is not really tested in any sense right now. It would be good to see the appropriate testing changes made. |
|
One travis-ci job is failing unexpectedly with empty raw log. Can I ask help? |
|
I've restarted that build. =) |
|
I added http11 h2c upgrading test by inheriting TestServerPush which is for http20 h2, and test passed. |
|
So, I'm not sure about this approach. You've added For the purpose of testing it's probably enough to call |
|
I agree that |
|
I think those tests don't need to work for upgrade, but we should write a test that does work as expected (e.g. you get a HTTP/2 response and then look for pushes on that stream) |
hkwi commentedFeb 21, 2017
Push flag required for the case the initial upgrade request triggered server push.