Restrictions to modifying request->headers_in.headers in NGX_HTTP_PREACCESS_PHASE?

2018-03-28 Thread Ryan Burn
Hi, I have a module that registers a handler to run in NGX_HTTP_PREACCESS_PHASE. The handler adds headers to request->headers_in.headers. This works as I would expect most of the time. But I am seeing cases of some crashes when calling ngx_list_push(&request->headers_in.headers)); Are ther

Re: Restrictions to modifying request->headers_in.headers in NGX_HTTP_PREACCESS_PHASE?

2018-03-28 Thread Ryan Burn
> > You are not allowed to modify r->headers_in, at any time. > If I want to ensure that certain headers are added if the request is proxied upstream, is there any way to do that? ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.or

Re: Restrictions to modifying request->headers_in.headers in NGX_HTTP_PREACCESS_PHASE?

2018-03-29 Thread Ryan Burn
On Thu, Mar 29, 2018 at 9:40 AM, Maxim Dounin wrote: > Hello! > > On Wed, Mar 28, 2018 at 04:15:44PM -0400, Ryan Burn wrote: > >> > You are not allowed to modify r->headers_in, at any time. >> >> If I want to ensure that certain headers are added if the requ

Re: Restrictions to modifying request->headers_in.headers in NGX_HTTP_PREACCESS_PHASE?

2018-03-30 Thread Ryan Burn
about them? On Thu, Mar 29, 2018 at 2:34 PM, Robert Paprocki wrote: > Hello, > > On Thu, Mar 29, 2018 at 11:06 AM, Ryan Burn wrote: >> >> >> This module injects multiple headers and the number, keys, etc aren't >> meant to be exposed to the user. >&

Any way to get timestamps for upstream-downstream events?

2019-06-07 Thread Ryan Burn
Hello everyone, I work on a module that provides distributed tracing for NGINX (https://github.com/opentracing-contrib/nginx-opentracing). If possible, I would like to include in the tracing data timestamps for the following events: * When the last byte from a downstream request was read * When t

Any way for a module to set directives when it's loaded?

2020-06-15 Thread Ryan Burn
Suppose I'm writing an nginx module foo. Is there any way to have foo set default directives when it gets loaded? For example, if I wanted foo to add headers to every request could I have load_module modules/ngx_http_foo_module.so; implicitly add proxy_set_header foo-header bar-value; ... to t