commit 96d1396df1c2a0ca07260985fa25e301bf50e7d5
parent 29eb5b1537b20b0422a5b19c60b2778e1155ece8
Author: Joris Vink <joris@coders.se>
Date: Sun, 20 Feb 2022 21:19:44 +0100
Change logic for http_version a bit.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/accesslog.c b/src/accesslog.c
@@ -67,8 +67,8 @@ kore_accesslog(struct http_request *req)
size_t avail;
time_t curtime;
int len, attempts;
- const char *ptr, *method, *http_version, *cn, *referer;
char addr[INET6_ADDRSTRLEN], *cn_value;
+ const char *ptr, *method, *http_version, *cn, *referer;
switch (req->method) {
case HTTP_METHOD_GET:
@@ -96,8 +96,7 @@ kore_accesslog(struct http_request *req)
if (req->flags & HTTP_VERSION_1_0)
http_version = "HTTP/1.0";
-
- if (req->flags & HTTP_VERSION_1_1)
+ else
http_version = "HTTP/1.1";
if (req->referer != NULL)