Improved HTTP version representation.

This commit is contained in:
Valentin Bartenev
2018-01-15 20:50:14 +03:00
parent 3fb140d6d2
commit a073616fc3
3 changed files with 18 additions and 15 deletions

View File

@@ -254,7 +254,7 @@ nxt_h1p_header_parse(nxt_task_t *task, void *obj, void *data)
* enabled in HTTP/1.1. The mode can be overridden later by
* the "Connection" field processed in nxt_h1p_connection().
*/
h1p->keepalive = (h1p->parser.version.str[7] != '0');
h1p->keepalive = (h1p->parser.version.s.minor != '0');
r->fields = h1p->parser.fields;
@@ -658,7 +658,7 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
/* Trailing CRLF at the end of header. */
size += sizeof("\r\n") - 1;
http11 = (h1p->parser.version.str[7] != '0');
http11 = (h1p->parser.version.s.minor != '0');
if (r->resp.content_length == NULL || r->resp.content_length->skip) {
if (http11) {