[MINOR] http redirect: don't explicitly state keep-alive on 1.1
Do not set the "connection: keep-alive" header when the request is in
HTTP 1.1, it's implicit.
diff --git a/src/proto_http.c b/src/proto_http.c
index f2f312e..92c5869 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -2867,8 +2867,12 @@
((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_SCL ||
(txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL)) {
/* keep-alive possible */
- memcpy(rdr.str + rdr.len, "\r\nConnection: keep-alive\r\n\r\n", 28);
- rdr.len += 28;
+ if (!(txn->flags & TX_REQ_VER_11)) {
+ memcpy(rdr.str + rdr.len, "\r\nConnection: keep-alive", 24);
+ rdr.len += 24;
+ }
+ memcpy(rdr.str + rdr.len, "\r\n\r\n", 4);
+ rdr.len += 4;
buffer_write(req->prod->ob, rdr.str, rdr.len);
/* "eat" the request */
buffer_ignore(req, msg->sov - msg->som);