Skip to content

Commit

Permalink
Brad's review
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed May 17, 2022
1 parent 75417b5 commit 3e76d05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/net/http/clientserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ func TestEarlyHintsRequest_h2(t *testing.T) { testEarlyHintsRequest(t, h2Mode) }
func testEarlyHintsRequest(t *testing.T, h2 bool) {
defer afterTest(t)
if h2 {
t.Skip("Waiting for H2 support to be merged")
t.Skip("Waiting for H2 support to be merged: https://go-review.googlesource.com/c/net/+/291029")
}

var wg sync.WaitGroup
Expand Down
4 changes: 2 additions & 2 deletions src/net/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ type ResponseWriter interface {
// If WriteHeader is not called explicitly, the first call to Write
// will trigger an implicit WriteHeader(http.StatusOK).
// Thus explicit calls to WriteHeader are mainly used to
// send error codes or informational responses.
// send error codes or 1xx informational responses.
//
// The provided code must be a valid HTTP 1xx-5xx status code.
// Any number of 1xx headers may be written, followed by at most
Expand Down Expand Up @@ -1150,7 +1150,7 @@ func (w *response) WriteHeader(code int) {
checkWriteHeaderCode(code)

// Handle informational headers
if code >= 100 && code < 200 {
if code >= 100 && code <= 199 {
// Prevent a potential race with an automatically-sent 100 Continue triggered by Request.Body.Read()
if code == 100 && w.canWriteContinue.isSet() {
w.writeContinueMu.Lock()
Expand Down

0 comments on commit 3e76d05

Please sign in to comment.