If somebody wants cross reference for other versions, here you can find for almost all versions on nginx http://osxr.org/ngx/sourceby artemg - Nginx Mailing List - English
I am capturing some data in if, and then redirecting on what was captured. The problem is, that captured data is escaped if url contains "%" char, and may be others, and do not escaped if it does not. I have simple config: Having simple config location / { set $out "http://example.com/?a=b&c=d%"; if ( $out ~ "(.*)" ){ setby artemg - Nginx Mailing List - English
What is the reason ngx_http_fastcgi_module doesn't support subrequest_in_memory flag? What is the best way to do the same this for fastcgi? Set body filter and then empty buffers in incoming chains?by artemg - Nginx Mailing List - English
I have made this patch, but not sure if it is correct. diff -u nginx-1.0.6/src/http/ngx_http_upstream.c nginx-1.0.6_/src/http/ngx_http_upstream.c --- nginx-1.0.6/src/http/ngx_http_upstream.c 2011-08-29 05:56:09.000000000 -0700 +++ nginx-1.0.6_/src/http/ngx_http_upstream.c 2011-11-11 02:17:36.000000000 -0800 @@ -1048,6 +1048,8 @@ ev->eof = 1; c->error = 1; + u->by artemg - Nginx Mailing List - English
As I understand, abort_request() callback of upstream (ngx_http_upstream_s) is never called now. Please correct me, if I am wrong. The place to insert this function call is in ngx_http_upstream_check_broken_connection(), right?by artemg - Nginx Mailing List - English
I have module, that matches data going via nginx. I am buffering data, so there is situation that there is no data to provide to upstream filters. What is the right way to do in such case? Now I am calling next_body_filter(r, NULL); Is that ok?by artemg - Nginx Mailing List - English
Thanks for the answer, yes, I forgot NGX_HTTP_VAR_CHANGEABLE flag.by artemg - Nginx Mailing List - English
I want to control behaviour of my module at runtime(body filtering phase), depending on different data (reg exp in headers, value of different variables...), so I decided to add variable in my module, and then set value in nginx config with "set" operation in rewrite module. I am adding variable via ngx_http_add_variable() in pre-config, set set_handler, and when I am doing "set $by artemg - Nginx Mailing List - English
By the way passing zero size last_buf is ok, as I understand? What do you mean by "non-special bufs" ?by artemg - Nginx Mailing List - English
agentzh, thanks for the answer, seems the problem is really with zero size bufs. I changed code to insert spaces, if buffer is empty and everything start to work with gzip disabled (before that nothing worked with gzip off), and I think there will be no crashes in gzip now if enabled. Now I will create my own chains to pass to downstream filters. I didn't try valgrind because usually it consumeby artemg - Nginx Mailing List - English
Thanks for the answer, but its difficult to understand how can that happen. I even compare output of modified (by my module) response and unmodified - they are the same, with the only difference that data in chains is filled in another way. I.e. input data lengths are 100-200-100 bytes (.last - .pos) and after my content rewriting module they can be 0-0-400, or even 0-0-0 chain, and data can be adby artemg - Nginx Mailing List - English
I have nginx with my custom module, that rewrite content on some conditions. Without it everything works fine, but after enabling it, nginx start to crash approx. every 2 hours ( > 100 req./sec) coredump shows that it crahses in gzip module: Core was generated by `nginx: worker process '. Program terminated with signal 11, Segmentation fault. #0 0x000000343ea0286d in crcby artemg - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |