|
|
@@ -2524,7 +2524,7 @@ const TrailerPrefix = "Trailer:"
|
|
|
// trailers. That worked for a while, until we found the first major
|
|
|
// user of Trailers in the wild: gRPC (using them only over http2),
|
|
|
// and gRPC libraries permit setting trailers mid-stream without
|
|
|
-// predeclarnig them. So: change of plans. We still permit the old
|
|
|
+// predeclaring them. So: change of plans. We still permit the old
|
|
|
// way, but we also permit this hack: if a Header() key begins with
|
|
|
// "Trailer:", the suffix of that key is a Trailer. Because ':' is an
|
|
|
// invalid token byte anyway, there is no ambiguity. (And it's already
|
|
|
@@ -2824,7 +2824,7 @@ func (sc *serverConn) startPush(msg *startPushRequest) {
|
|
|
// PUSH_PROMISE frames MUST only be sent on a peer-initiated stream that
|
|
|
// is in either the "open" or "half-closed (remote)" state.
|
|
|
if msg.parent.state != stateOpen && msg.parent.state != stateHalfClosedRemote {
|
|
|
- // responseWriter.Push checks that the stream is peer-initiaed.
|
|
|
+ // responseWriter.Push checks that the stream is peer-initiated.
|
|
|
msg.done <- errStreamClosed
|
|
|
return
|
|
|
}
|