forked from quic-go/quic-go
send priority in H2 request headers
is required by Google’s QUIC implementation
This commit is contained in:
@@ -42,6 +42,7 @@ func (w *requestWriter) WriteRequest(req *http.Request, dataStreamID protocol.St
|
||||
StreamID: uint32(dataStreamID),
|
||||
EndHeaders: true,
|
||||
BlockFragment: w.hbuf.Bytes(),
|
||||
Priority: http2.PriorityParam{Weight: 0xff},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ var _ = Describe("Request", func() {
|
||||
rw.WriteRequest(req, 1337)
|
||||
headerFrame, headerFields := decode(headerStream.Bytes())
|
||||
Expect(headerFrame.StreamID).To(Equal(uint32(1337)))
|
||||
Expect(headerFrame.HasPriority()).To(BeTrue())
|
||||
Expect(headerFields).To(HaveKeyWithValue(":authority", "quic.clemente.io"))
|
||||
Expect(headerFields).To(HaveKeyWithValue(":method", "GET"))
|
||||
Expect(headerFields).To(HaveKeyWithValue(":path", "/index.html?foo=bar"))
|
||||
|
||||
Reference in New Issue
Block a user