Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client] Be sure to send the preface if receiving data first. #44

Closed
wants to merge 2 commits into from

Conversation

alloy
Copy link
Contributor

@alloy alloy commented Dec 29, 2015

I’m very new to HTTP/2 and this library, so I’m mostly looking for guidance as to why this is needed and where to make the changes in the codebase. Once that”s all clear to me I’ll clean this up and add appropriate tests.

I’m using this lib to connect to Apple’s new Push Notification service. Without this change it would complain about missing a client preface and instead receiving other data (which were settings):

HTTP/2 client preface string missing or corrupt. Hex dump for received bytes: 000000040100000000

What would happen is that the server would send data before I would send any, which would change the @state to connected and thus the preface would never get send from Client#send.

@alloy
Copy link
Contributor Author

alloy commented Jan 8, 2016

Any feedback for me to wrap up this PR?

@igrigorik
Copy link
Owner

What would happen is that the server would send data before I would send any, which would change the @State to connected and thus the preface would never get send from Client#send.

As in, you open a TCP connection and the server immediately sends a preface? If so, that's really weird.. I'm not familiar with Apple's implementation, but if that's true then it would imply that they treat their end as the client, even though they don't initiate the connection?

@igrigorik
Copy link
Owner

Any additional insights or progress on this one?

@alloy
Copy link
Contributor Author

alloy commented Jan 29, 2016

Sorry, missed your earlier response. Based on that error message it sends, I think Apple just uses an existing Java server. I’ll do some re-checking of what goes on and provide better logs.

@igrigorik
Copy link
Owner

@alloy any luck with this one?

@ioquatix
Copy link
Collaborator

ioquatix commented Apr 6, 2018

Oh, I think this was the same problem I ran into.

@ioquatix
Copy link
Collaborator

I am going to close this PR, as we will address this in #122 - thanks so much for your contributions @alloy

@ioquatix ioquatix closed this Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants