mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
[MINOR] http response: update the TX_CLI_CONN_KA flag on rewrite
If we modify the "connection" header we send to the client, update the TX_CLI_CONN_KA flag.
This commit is contained in:
parent
b8c82c295b
commit
b50943e717
1 changed files with 9 additions and 0 deletions
|
|
@ -3323,6 +3323,15 @@ int http_process_res_common(struct session *t, struct buffer *rep, int an_bit, s
|
|||
}
|
||||
}
|
||||
|
||||
/* if there is no "Connection: keep-alive" header left and we're
|
||||
* in HTTP/1.0, then non-persistent connection is implied */
|
||||
if (!(t->flags & SN_CONN_CLOSED) && (msg->sl.st.v_l == 8) &&
|
||||
(rep->data[msg->som + 5] == '1') &&
|
||||
(rep->data[msg->som + 7] == '0')) {
|
||||
t->flags |= SN_CONN_CLOSED;
|
||||
txn->flags &= ~TX_CLI_CONN_KA; /* keep-alive closed on server side */
|
||||
}
|
||||
|
||||
/* add response headers from the rule sets in the same order */
|
||||
for (cur_idx = 0; cur_idx < rule_set->nb_rspadd; cur_idx++) {
|
||||
if (txn->status < 200)
|
||||
|
|
|
|||
Loading…
Reference in a new issue