You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@httpd.apache.org by GitBox <gi...@apache.org> on 2021/02/25 10:54:02 UTC

[GitHub] [httpd] ylavic commented on a change in pull request #173: ab: add http 1 1

ylavic commented on a change in pull request #173:
URL: https://github.com/apache/httpd/pull/173#discussion_r582736353



##########
File path: support/ab.c
##########
@@ -1870,30 +1871,29 @@ static void test(void)
     }
 
     /* setup request */
+    const char *const http_version = http_spec == HTTP_1_1 ? "HTTP/1.1" : "HTTP/1.0";
+    const char *const request_uri = isproxy ? fullurl : path;
+    const char *const connection = keepalive ? "Connection: Keep-Alive\r\n" 
+                                             : http_spec == HTTP_1_1 ? "Connection: Close\r\n" : "";

Review comment:
       This possibly could be:
   ```
       const char *const connection =
           http_spec == HTTP_1_0 && keepalive ? "Connection: Keep-Alive\r\n"
         : http_spec == HTTP_1_1 && !keepalive ? "Connection: Close\r\n"
         : "";
   ```
   The rationale being that Keep-Alive is implicitely disabled for HTTP/1.0 and enabled for HTTP/1.1.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@httpd.apache.org
For additional commands, e-mail: notifications-help@httpd.apache.org