nxt_controller.c (703:2d536dde84d2) nxt_controller.c (710:1215acd43810)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

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

764{
765 off_t length;
766 nxt_controller_request_t *r;
767
768 r = ctx;
769
770 length = nxt_off_t_parse(field->value, field->value_length);
771
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

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

764{
765 off_t length;
766 nxt_controller_request_t *r;
767
768 r = ctx;
769
770 length = nxt_off_t_parse(field->value, field->value_length);
771
772 if (nxt_fast_path(length > 0)) {
772 if (nxt_fast_path(length >= 0)) {
773
774 if (nxt_slow_path(length > NXT_SIZE_T_MAX)) {
775 nxt_log_error(NXT_LOG_ERR, &r->conn->log,
776 "Content-Length is too big");
777 return NXT_ERROR;
778 }
779
780 r->length = length;

--- 554 unchanged lines hidden ---
773
774 if (nxt_slow_path(length > NXT_SIZE_T_MAX)) {
775 nxt_log_error(NXT_LOG_ERR, &r->conn->log,
776 "Content-Length is too big");
777 return NXT_ERROR;
778 }
779
780 r->length = length;

--- 554 unchanged lines hidden ---