nxt_http_request.c (918:c1b7de3fb28c) nxt_http_request.c (942:424c1fdef545)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_router.h>
8#include <nxt_http.h>

--- 69 unchanged lines hidden (view full) ---

78nxt_int_t
79nxt_http_request_content_length(void *ctx, nxt_http_field_t *field,
80 uintptr_t data)
81{
82 nxt_off_t n;
83 nxt_http_request_t *r;
84
85 r = ctx;
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_router.h>
8#include <nxt_http.h>

--- 69 unchanged lines hidden (view full) ---

78nxt_int_t
79nxt_http_request_content_length(void *ctx, nxt_http_field_t *field,
80 uintptr_t data)
81{
82 nxt_off_t n;
83 nxt_http_request_t *r;
84
85 r = ctx;
86 r->content_length = field;
87
86
88 n = nxt_off_t_parse(field->value, field->value_length);
87 if (nxt_fast_path(r->content_length == NULL)) {
88 r->content_length = field;
89
89
90 if (nxt_fast_path(n >= 0)) {
91 r->content_length_n = n;
92 return NXT_OK;
90 n = nxt_off_t_parse(field->value, field->value_length);
91
92 if (nxt_fast_path(n >= 0)) {
93 r->content_length_n = n;
94 return NXT_OK;
95 }
93 }
94
95 return NXT_ERROR;
96}
97
98
99nxt_http_request_t *
100nxt_http_request_create(nxt_task_t *task)

--- 400 unchanged lines hidden ---
96 }
97
98 return NXT_ERROR;
99}
100
101
102nxt_http_request_t *
103nxt_http_request_create(nxt_task_t *task)

--- 400 unchanged lines hidden ---