And one more question. I've noticed that I'll have to
copy-paste ngx_http_header_val_s definition too (because it is defined in
.c file) and this is a risk to have different structures when something is
changed in nginx and my module still have the previous version.

Another idea is to mock r->main and put it back after. Something like this
in my header filter:

    main = r->main;
    r->main = r;
    rc = ngx_http_next_header_filter(r);
    r->main = main;

This works for my current simple tests. Is this a completely bad idea?

Thanks.

On Mon, Mar 16, 2015 at 4:16 PM, Maxim Dounin <mdou...@mdounin.ru> wrote:

> Hello!
>
> On Mon, Mar 16, 2015 at 04:11:04PM +0300, Marat Dakota wrote:
>
> > But I might copy-paste the code from ngx_http_headers_filter() to my
> header
> > filter, right? Or something will blow up eventually?
>
> Yes (with appropriate changes).  Nothing will blow up if done
> properly.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to