Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r5026 - trunk/src/http

Anonymous User
February 01, 2013 09:40AM
Author: mdounin
Date: 2013-02-01 14:38:18 +0000 (Fri, 01 Feb 2013)
New Revision: 5026
URL: http://trac.nginx.org/nginx/changeset/5026/nginx

Log:
Request body: fixed client_body_in_file_only.

After introduction of chunked request body reading support in 1.3.9 (r4931),
the rb->bufs wasn't set if request body was fully preread while calling the
ngx_http_read_client_request_body() function.

Reported by Yichun Zhang (agentzh).


Modified:
trunk/src/http/ngx_http_request_body.c

Modified: trunk/src/http/ngx_http_request_body.c
===================================================================
--- trunk/src/http/ngx_http_request_body.c 2013-02-01 14:37:43 UTC (rev 5025)
+++ trunk/src/http/ngx_http_request_body.c 2013-02-01 14:38:18 UTC (rev 5026)
@@ -35,7 +35,8 @@
size_t preread;
ssize_t size;
ngx_int_t rc;
- ngx_chain_t out;
+ ngx_buf_t *b;
+ ngx_chain_t out, *cl;
ngx_http_request_body_t *rb;
ngx_http_core_loc_conf_t *clcf;

@@ -128,6 +129,21 @@
rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
goto done;
}
+
+ cl = ngx_chain_get_free_buf(r->pool, &rb->free);
+ if (cl == NULL) {
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
+ b = cl->buf;
+
+ ngx_memzero(b, sizeof(ngx_buf_t));
+
+ b->in_file = 1;
+ b->file_last = rb->temp_file->file.offset;
+ b->file = &rb->temp_file->file;
+
+ rb->bufs = cl;
}

post_handler(r);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r5026 - trunk/src/http

Anonymous User 1375 February 01, 2013 09:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready