Welcome! Log In Create A New Profile

Advanced

[nginx] Request body: moved request body writing to save filter.

Maxim Dounin
March 23, 2015 02:12PM
details: http://hg.nginx.org/nginx/rev/9e231d4cecca
branches:
changeset: 6048:9e231d4cecca
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Mar 23 21:09:19 2015 +0300
description:
Request body: moved request body writing to save filter.

diffstat:

src/http/ngx_http_request_body.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)

diffs (38 lines):

diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -277,20 +277,6 @@ ngx_http_do_read_client_request_body(ngx
return rc;
}

- /* write to file */
-
- if (ngx_http_write_request_body(r) != NGX_OK) {
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
- }
-
- /* update chains */
-
- rc = ngx_http_request_body_filter(r, NULL);
-
- if (rc != NGX_OK) {
- return rc;
- }
-
if (rb->busy != NULL) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
@@ -1100,5 +1086,13 @@ ngx_http_request_body_save_filter(ngx_ht
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}

+ if (rb->rest > 0
+ && rb->buf && rb->buf->last == rb->buf->end)
+ {
+ if (ngx_http_write_request_body(r) != NGX_OK) {
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+ }
+
return NGX_OK;
}

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

[nginx] Request body: moved request body writing to save filter.

Maxim Dounin 500 March 23, 2015 02:12PM



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

Online Users

Guests: 162
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