mirror of https://git.kore.io/kore.git
do not set CONN_CLOSE_EMPTY for 1.0 until we reply.
This commit is contained in:
parent
cf2e158773
commit
61b385ae11
|
@ -1394,7 +1394,6 @@ http_request_new(struct connection *c, const char *host,
|
|||
}
|
||||
|
||||
flags = HTTP_VERSION_1_0;
|
||||
c->flags |= CONN_CLOSE_EMPTY;
|
||||
} else {
|
||||
flags = HTTP_VERSION_1_1;
|
||||
}
|
||||
|
@ -1853,10 +1852,12 @@ http_response_normal(struct http_request *req, struct connection *c,
|
|||
version, status, http_status_text(status));
|
||||
kore_buf_append(header_buf, http_version, http_version_len);
|
||||
|
||||
if (c->flags & CONN_CLOSE_EMPTY)
|
||||
if ((c->flags & CONN_CLOSE_EMPTY) ||
|
||||
(req->flags & HTTP_VERSION_1_0)) {
|
||||
connection_close = 1;
|
||||
else
|
||||
} else {
|
||||
connection_close = 0;
|
||||
}
|
||||
|
||||
if (connection_close == 0 && req != NULL) {
|
||||
if (http_request_header(req, "connection", &conn)) {
|
||||
|
|
Loading…
Reference in New Issue