On Mon, Apr 6, 2020 at 7:54 PM Akhil Jaggarwal <akhil.jaggarwal@xxxxxxxxx> wrote: > > hi, > > I've an input filter of type AP_FTYPE_RESOURCE. > > I'm trying to add a custom header to request_rec->headers_in. Here's > how i do it when I see an EOS: > > apr_table_set(f->r->headers_in, "MY_CUSTOM_HDR", "CUSTOM_VAL"); > > But for some reason the header doesn't persist when i read the request > object back on the receiving side. What's reading it back specifically? The input filter won't be called until the "handler" is reading the body to consume it which will happen after almost everything else in the server. > Is this the correct way to add a custom header to request_rec in a filter? it is unusually late during request processing. You should use something like post_read_request or fixups both of which are much simpler as they are not even filters. > Does an input filter of type AP_FTYPE_RESOURCE allow to modify > request_rec->headers_in? Yes, but it is after most other processing that would be reading r->headers_in. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx