From b758d088521b5b4818b611815e3fef3a8c64b9c1 Mon Sep 17 00:00:00 2001 From: Liam Warfield Date: Wed, 13 Apr 2022 22:36:21 -0600 Subject: [PATCH] hyper: Fixxed tests 580 and 581 for the hyper backend Hyper will have be able to preserve header order once this PR merges: https://github.com/hyperium/hyper/pull/2798 This commit adds a few lines setting the connection options for this feature. Related to issue #8617 --- lib/c-hyper.c | 2 ++ lib/http_proxy.c | 3 +++ tests/data/DISABLED | 2 -- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/c-hyper.c b/lib/c-hyper.c index b795a47fed2ae1..d4ccb459df9f03 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -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); diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 97f85011b06932..f1a3f1fa659808 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -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; diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 7d4110461ca147..efdfeefc824db2 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -45,8 +45,6 @@ 357 565 579 -580 -581 587 670 671