diff options
author | Andrei Belov <defan@nginx.com> | 2019-02-07 18:16:31 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2019-02-07 18:16:31 +0300 |
commit | bf76c2fd552464a920505f59e75be2f44a724b8a (patch) | |
tree | 46d1dcaeb228e5d20785adda878e8edd44d1af5f /src | |
parent | 8f7e256f7f382ce8587df188e252542400130b6f (diff) | |
parent | fc2af29bd3ae229c8830d0e73661b4ad490a07e0 (diff) | |
download | unit-bf76c2fd552464a920505f59e75be2f44a724b8a.tar.gz unit-bf76c2fd552464a920505f59e75be2f44a724b8a.tar.bz2 |
Merged with the default branch.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_error.c | 2 | ||||
-rw-r--r-- | src/nxt_http_request.c | 12 | ||||
-rw-r--r-- | src/nxt_main.h | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/nxt_http_error.c b/src/nxt_http_error.c index 65f8ba38..99d27903 100644 --- a/src/nxt_http_error.c +++ b/src/nxt_http_error.c @@ -37,7 +37,7 @@ nxt_http_request_error(nxt_task_t *task, nxt_http_request_t *r, r->status = status; r->resp.fields = nxt_list_create(r->mem_pool, 8, sizeof(nxt_http_field_t)); - if (nxt_slow_path(r == NULL)) { + if (nxt_slow_path(r->resp.fields == NULL)) { goto fail; } diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index b80998cb..c8adb499 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -79,14 +79,20 @@ nxt_int_t nxt_http_request_content_length(void *ctx, nxt_http_field_t *field, uintptr_t data) { + nxt_off_t n; nxt_http_request_t *r; r = ctx; - r->content_length = field; - r->content_length_n = nxt_off_t_parse(field->value, field->value_length); - return NXT_OK; + n = nxt_off_t_parse(field->value, field->value_length); + + if (nxt_fast_path(n >= 0)) { + r->content_length_n = n; + return NXT_OK; + } + + return NXT_ERROR; } diff --git a/src/nxt_main.h b/src/nxt_main.h index 71ee6599..760384ea 100644 --- a/src/nxt_main.h +++ b/src/nxt_main.h @@ -11,8 +11,8 @@ #include <nxt_auto_config.h> -#define NXT_VERSION "1.7" -#define NXT_VERNUM 10700 +#define NXT_VERSION "1.7.1" +#define NXT_VERNUM 10701 #define NXT_SERVER "Unit/" NXT_VERSION |