If I build a dynamic module against, say nginx 1.12.2 with `--with-compat`, will it work with, say nginx 1.12.1 (assuming --with-compat all around) I assume not, because I found this in ngx_module.c, separate from the signature check. nginx_version has the minor version in it. if (module->version != nginx_version) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,by ptcell - Nginx Mailing List - English
Please disregard or delete this post. The problem was with my setup. It works fine. Thanks.by ptcell - Nginx Mailing List - English
I'm trying to use the ngx_http_catch_body_filter example to capture request bodies from post (etc.) requests. I started with the example here in the hg repo: https://www.nginx.com/resources/wiki/extending/examples/body_filter/ I changed the config to make it a dynamic nginx module. I can see the `ngx_http_catch_body_init()` method getting called in the logs (I put an error log in thatby ptcell - Nginx Mailing List - English
I have a preaccess filter in my module that loads in the request_body with `ngx_http_read_client_request_body` (it basically scans the buffer for security violations, no modifications). I don't discard the buffer and this module works fine when proxying POST requests or multiform data to a downstream reverse proxy. If I try using a lua module that attempts to read the request body, too (like `by ptcell - Nginx Mailing List - English
here is with the body filter disabled (works normally): HTTP/1.1 200 OK Server: nginx/1.12.0 Date: Thu, 11 Jan 2018 04:16:07 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive here is with the body filter enabled (connection does not terminate): HTTP/1.1 200 OK Server: nginx/1.12.0 Date: Thu, 11 Jan 2018 04:19:59 GMT Content-Type: text/html Transfer-Encby ptcell - Nginx Mailing List - English
I tried out this nginx example ngx_http_foo_body_filter body filter (here http://nginx.org/en/docs/dev/development_guide.html#http_body_buffers_reuse ) and got that to work just fine. It inserts a "foo" string before each incoming buffer. I tried modifying a little bit so that it puts the foo string AFTER each incoming buffer chain in the list. The pages render correctly, but the rby ptcell - Nginx Mailing List - English
Maxim Dounin Wrote: ------------------------------------------------------- > > Try ngx_http_conf_get_module_main_conf(). > > (Doing so in the create_loc_conf callback is probably pointless > though, as main conf contents can be changed later.) > > -- > Maxim Dounin > http://nginx.org/ > _______________________________________________ > nginx maiby ptcell - Nginx Mailing List - English
Maxim Dounin Wrote: ------------------------------------------------------- > Hello! > > On Wed, Aug 09, 2017 at 09:33:59PM -0400, ptcell wrote: > > > From the debugger I can see that it's probably some offset into > > cf->ctx.main_conf, but I don't see anyway of knowing what > that index > > is inside the loc create callback. > > > > Iby ptcell - Nginx Mailing List - English
From the debugger I can see that it's probably some offset into cf->ctx.main_conf, but I don't see anyway of knowing what that index is inside the loc create callback. Is there any other way of getting this? Getting it at loc merge time would be acceptable too. void *ngx_http_my_module_create_conf(ngx_conf_t *cf) { } Thank you.by ptcell - Nginx Mailing List - English
I've built with the sub filter enabled and I'm finding it hangs requests if there is a match. It is a very simple substitution/replace. I've resorted to following the request in GDB and the sub module completes and calls the next body filter (which in my case appears to be the charset module). I have no other odd modules enabled other than using threads with a thread pool size of two (shouldby ptcell - Nginx Mailing List - English