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

HTTP2 client buffers data written and flushed by the server #35129

Closed
igolaizola opened this issue Oct 24, 2019 · 1 comment
Closed

HTTP2 client buffers data written and flushed by the server #35129

igolaizola opened this issue Oct 24, 2019 · 1 comment

Comments

@igolaizola
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.13.3 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"

What did you do?

I have created an HTTP2 client that connects to an HTTP2 server.

On the server side I do the following:

  • write []byte{0xAA, 0xBB}
  • call flush()
  • write []byte{0xCC, 0xDD}
  • call flush()

On the client side I read the incoming data.

Here is the testing code:
https://play.golang.org/p/OtrJ7wW62Ud

What did you expect to see?

On the client side I expect to do the first call to Read() to obtain []byte{0xAA, 0xBB} and on a second call to Read() obtain []byte{0xCC, 0xDD}

What did you see instead?

Instead on the first call to Read() I obtain []byte{0xAA, 0xBB, 0xCC, 0xDD}

@bradfitz
Copy link
Contributor

Neither HTTP/2 nor io.Reader has semantic record boundaries. It's just a byte stream.

Closing, as I don't see any action required here on our side.

@golang golang locked and limited conversation to collaborators Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants