Are modules built with --with-compat compatible across minor versions of NGINX?

2019-11-26 Thread ptcell
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->ver

Re: ngx_http_catch_body_filter doesn't appear to work

2019-10-18 Thread ptcell
Please disregard or delete this post. The problem was with my setup. It works fine. Thanks. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285923,285941#msg-285941 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/li

ngx_http_catch_body_filter doesn't appear to work

2019-10-17 Thread ptcell
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

Any way to reset r->request_body to avoid conflicts between modules?

2019-09-22 Thread ptcell
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 downstr

Re: Example body filter hangs when modified a little bit - request is not terminating.

2018-01-10 Thread ptcell
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:

Example body filter hangs when modified a little bit - request is not terminating.

2018-01-10 Thread ptcell
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 str

Re: Is there a wait to get at a module's main conf inside the loc conf's init?

2017-08-16 Thread ptcell
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/ >

Re: Is there a wait to get at a module's main conf inside the loc conf's init?

2017-08-10 Thread ptcell
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[index].main_conf, but I don't se

Is there a wait to get at a module's main conf inside the loc conf's init?

2017-08-09 Thread ptcell
>From the debugger I can see that it's probably some offset into cf->ctx[index].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_modul

ngx_http_sub_module causes requests to hang on a simple match.

2017-06-30 Thread ptcell
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).