Skip to content

Commit

Permalink
hyper: Fixxed tests 580 and 581 for the hyper backend
Browse files Browse the repository at this point in the history
Hyper will have be able to preserve header order once this PR merges:
hyperium/hyper#2798
This commit adds a few lines setting the connection options
for this feature.

Related to issue curl#8617
  • Loading branch information
liamwarfield committed Apr 14, 2022
1 parent b7c0bd6 commit b758d08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/c-hyper.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
hyper_clientconn_options_http2(options, 1);
h2 = TRUE;
}
hyper_clientconn_options_set_preserve_header_case(options, 1);
hyper_clientconn_options_set_preserve_header_order(options, 1);

hyper_clientconn_options_exec(options, h->exec);

Expand Down
3 changes: 3 additions & 0 deletions lib/http_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ static CURLcode CONNECT(struct Curl_easy *data,
}

options = hyper_clientconn_options_new();
hyper_clientconn_options_set_preserve_header_case(options, 1);
hyper_clientconn_options_set_preserve_header_order(options, 1);

if(!options) {
failf(data, "Couldn't create hyper client options");
result = CURLE_OUT_OF_MEMORY;
Expand Down
2 changes: 0 additions & 2 deletions tests/data/DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
357
565
579
580
581
587
670
671
Expand Down

0 comments on commit b758d08

Please sign in to comment.