tests: web-server: Keep curl 7.85 from opening extra HTTP connections
authorHilko Bengen <bengen@debian.org>
Mon, 3 Oct 2022 20:53:59 +0000 (22:53 +0200)
committerHilko Bengen <bengen@debian.org>
Mon, 3 Oct 2022 21:08:08 +0000 (22:08 +0100)
Gbp-Pq: Name 0011-tests-web-server-Keep-curl-7.85-from-opening-extra-H.patch

tests/web-server.c

index 5a9484c0e93ceda9f529e423dfe86878673facd0..1d15d176ff13f2c07619e4f185d9a8944efe1232 100644 (file)
@@ -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";