Skip to content

Commit

Permalink
bugfix: Actually encode extensions in header (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongcarl committed Jul 12, 2023
1 parent 5a87580 commit a38b194
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion h3/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ where
method,
uri,
headers,
extensions,
..
} = parts;
let headers = Header::request(method, uri, headers, Default::default())?;
let headers = Header::request(method, uri, headers, extensions)?;

//= https://www.rfc-editor.org/rfc/rfc9114#section-4.1
//= type=implication
Expand Down
3 changes: 2 additions & 1 deletion h3/src/tests/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,10 @@ fn request_encode<B: BufMut>(buf: &mut B, req: http::Request<()>) {
method,
uri,
headers,
extensions,
..
} = parts;
let headers = Header::request(method, uri, headers, Default::default()).unwrap();
let headers = Header::request(method, uri, headers, extensions).unwrap();
let mut block = BytesMut::new();
qpack::encode_stateless(&mut block, headers).unwrap();
Frame::headers(block).encode_with_payload(buf);
Expand Down

0 comments on commit a38b194

Please sign in to comment.