From: Hilko Bengen Date: Mon, 3 Oct 2022 20:53:59 +0000 (+0200) Subject: tests: web-server: Keep curl 7.85 from opening extra HTTP connections X-Git-Tag: archive/raspbian/1.38.2-2+rpi1~2^2^2^2^2^2^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=968d3f525ef8a02f42e0f5772735f25192e010b0;p=nbdkit.git tests: web-server: Keep curl 7.85 from opening extra HTTP connections Gbp-Pq: Name 0011-tests-web-server-Keep-curl-7.85-from-opening-extra-H.patch --- diff --git a/tests/web-server.c b/tests/web-server.c index 5a9484c..1d15d17 100644 --- a/tests/web-server.c +++ b/tests/web-server.c @@ -302,7 +302,7 @@ handle_file_request (int s, enum method method) const char response1_partial[] = "HTTP/1.1 206 Partial Content\r\n"; const char response2[] = "Accept-rANGES: bytes\r\n" /* See RHBZ#1837337 */ - "Connection: keep-alive\r\n" + "Connection: close\r\n" "Content-Type: application/octet-stream\r\n"; char response3[64]; const char response4[] = "\r\n"; @@ -360,7 +360,9 @@ handle_mirror_redirect_request (int s) static char rr = '1'; /* round robin '1', '2', '3' */ /* Note we send 302 (temporary redirect), same as Fedora's mirrorservice. */ const char found[] = "HTTP/1.1 302 Found\r\nContent-Length: 0\r\n"; - char location[] = "Location: /mirrorX\r\n"; + char location[] = + "Location: /mirrorX\r\n" + "Connection: close\r\n"; const char eol[] = "\r\n"; location[17] = rr; @@ -383,7 +385,7 @@ handle_mirror_data_request (int s, enum method method, char byte) const char response1_partial[] = "HTTP/1.1 206 Partial Content\r\n"; const char response2[] = "Accept-rANGES: bytes\r\n" /* See RHBZ#1837337 */ - "Connection: keep-alive\r\n" + "Connection: close\r\n" "Content-Type: application/octet-stream\r\n"; char response3[64]; const char response4[] = "\r\n";