summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-03-13 12:57:44 +0100
committerJo-Philipp Wich <jo@mein.io>2020-05-06 19:33:38 +0200
commit975dce23257e713e5e52eb87b194513eb81110a5 (patch)
tree674f1cac8c40f5905dc5c568383f482bcffdf010
parentd062f85c74fce5e599a42ed07be73e65f35e0f81 (diff)
downloaduhttpd2-975dce23257e713e5e52eb87b194513eb81110a5.tar.gz
client: allow keep-alive for POST requests
Allow POST requests via persistent connections to improve performance especially when using HTTPS on older devices. After this change, average page load times in LuCI improve significantly once the TLS connections are initiated. When testing an ar71xx 19.07.2 build on an ethernet connected TL-WR1043nd using luci-ssl-openssl and the ustream-openssl backend, the average page load time for the main status page decreased to 1.3s compared to 4.7s before, the interface and wireless configuration pages loaded in 1.2s seconds each compared to the 4.2s and 4.9s respectively before. Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 5e9c23c6f40ff26209ef22cfeeda4904a5918f3d)
-rw-r--r--client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/client.c b/client.c
index 92f7609..2a2393f 100644
--- a/client.c
+++ b/client.c
@@ -194,8 +194,7 @@ static int client_parse_request(struct client *cl, char *data)
req->method = h_method;
req->version = h_version;
- if (req->version < UH_HTTP_VER_1_1 || req->method == UH_HTTP_MSG_POST ||
- !conf.http_keepalive)
+ if (req->version < UH_HTTP_VER_1_1 || !conf.http_keepalive)
req->connection_close = true;
return CLIENT_STATE_HEADER;