|author||marius a. eriksen <firstname.lastname@example.org>||Mon Feb 11 22:33:38 2019 +0000|
|committer||Brad Fitzpatrick <email@example.com>||Mon Apr 15 21:45:37 2019 +0000|
http2: don't hang a stream if trailers values are not provided Pre-declared trailers are written after a server's request handler returns, in which case the trailer header frame is also responsible for closing the stream. However, if the server handler does not define a trailer header value before returning, the headers are empty and no header frame is written. In this case, the stream would simply hang. This change fixes this by closing the stream if there are no header values but endStream is true. Some other options to consider: 1. Reset the stream with an error; the user didn't define a trailer value as they said they would. From my brief reading of the http/2 RFC, this isn't actually required. 2. Send an explicitly empty header value. Change-Id: I07e01250df60ac33fa6d34beb81ec2fa7e43c146 GitHub-Last-Rev: dfc532d7857822d507b218e4cc2511bf0b6dfcbd GitHub-Pull-Request: golang/net#31 Reviewed-on: https://go-review.googlesource.com/c/net/+/161958 Run-TryBot: Brad Fitzpatrick <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.org>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run
go get -u golang.org/x/net. You can also manually git clone the repository to
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.