upstream module / need to check pipe field
David CARLIER
devnexen at gmail.com
Mon Dec 21 15:07:10 UTC 2015
Hi,
I was wondering if it might be better to check if pipe field before
attempting to clear the temp file ? Anyway it is checked as well line
4015 and below ... in this case u->pipe checks is sufficient
u->pipe->temp_file is checked inside ngx_http_file_cache_free
function.
Hope it helps.
Regards.
-------------- next part --------------
diff -r 78b4e10b4367 conf/nginx.conf
--- a/conf/nginx.conf Thu Dec 17 16:39:15 2015 +0300
+++ b/conf/nginx.conf Mon Dec 21 14:59:58 2015 +0000
@@ -33,7 +33,7 @@
#gzip on;
server {
- listen 80;
+ listen 8380;
server_name localhost;
#charset koi8-r;
diff -r 78b4e10b4367 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Thu Dec 17 16:39:15 2015 +0300
+++ b/src/http/ngx_http_upstream.c Mon Dec 21 14:59:58 2015 +0000
@@ -4048,7 +4048,9 @@
}
}
- ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
+ if (u->pipe) {
+ ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
+ }
}
#endif
More information about the nginx-devel
mailing list