mod_rewrite, APR_HOOK_MIDDLE, and HTTP response headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am using apache 2.2.22 and an in-house apache module, which contains a hook that sets an HTTP response header.  That hook is registered with APR_HOOK_MIDDLE:

mod_ourmodule.c: ap_hook_thing(thing, NULL, NULL, APR_HOOK_MIDDLE);

This normally works, but if the request is rewritten internally by mod_rewrite, the response will not contain the header that our module has set.

Is this behavior expected?  If so, how should the hook be written so that it can add response headers on requests that are internally redirected?  For example, in .htaccess:

RewriteRule ^test$ test.php

I should mention that I have tried changing the order of the LoadModule statements for our module and mod_rewrite, and got the same behavior.  That is, in the example above, requests to /test.php contain our module's response header, while requests to /test do not.

Thanks,

Jonathan Cooper

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux