Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

March 09, 2011 02:22PM
Something like that. So we can do:
rc = ngx_http_subrequest(r, &subreq_loc , &args,
&sr, psr, NGX_HTTP_REQUEST_KEEP_TEMP_FILE);


# cat ngx_keep_tempfile_flag.patch
diff -Nuarp nginx-0.9.5/src/http/ngx_http_core_module.c nginx-0.9.5_new/src/http/ngx_http_core_module.c
--- nginx-0.9.5/src/http/ngx_http_core_module.c 2011-01-20 07:31:24.000000000 -0800
+++ nginx-0.9.5_new/src/http/ngx_http_core_module.c 2011-03-09 07:22:45.000000000 -0800
@@ -2230,6 +2230,7 @@ ngx_http_subrequest(ngx_http_request_t *

sr->subrequest_in_memory = (flags & NGX_HTTP_SUBREQUEST_IN_MEMORY) != 0;
sr->waited = (flags & NGX_HTTP_SUBREQUEST_WAITED) != 0;
+ sr->keep_temp_file = (flags & NGX_HTTP_REQUEST_KEEP_TEMP_FILE) != 0;

sr->unparsed_uri = r->unparsed_uri;
sr->method_name = ngx_http_core_get_method;
diff -Nuarp nginx-0.9.5/src/http/ngx_http_request.h nginx-0.9.5_new/src/http/ngx_http_request.h
--- nginx-0.9.5/src/http/ngx_http_request.h 2011-01-20 02:37:58.000000000 -0800
+++ nginx-0.9.5_new/src/http/ngx_http_request.h 2011-03-09 07:21:25.000000000 -0800
@@ -61,6 +61,8 @@
#define NGX_HTTP_SUBREQUEST_IN_MEMORY 2
#define NGX_HTTP_SUBREQUEST_WAITED 4
#define NGX_HTTP_LOG_UNSAFE 8
+#define NGX_HTTP_REQUEST_KEEP_TEMP_FILE 16
+


#define NGX_HTTP_OK 200
@@ -461,6 +463,7 @@ struct ngx_http_request_s {

unsigned subrequest_in_memory:1;
unsigned waited:1;
+ unsigned keep_temp_file:1;

#if (NGX_HTTP_CACHE)
unsigned
Subject Author Posted

[PATCH] ngx_upstream do not cleanup file buffers in subrequest

magz March 08, 2011 03:24PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

Maxim Dounin March 09, 2011 06:20AM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

magz March 09, 2011 01:46PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

magz March 09, 2011 02:22PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

magz March 09, 2011 02:28PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

Maxim Dounin March 09, 2011 02:04PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

magz March 09, 2011 09:55PM

Re: [PATCH] ngx_upstream do not cleanup file buffers in subrequest

Maxim Dounin March 09, 2011 07:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready