Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output filter invoked twice when using mod_rewrite and mod_xsendfile #5

Open
sosherof opened this issue Dec 1, 2021 · 0 comments
Open

Comments

@sosherof
Copy link

sosherof commented Dec 1, 2021

When using mod_rewrite to run a PHP script that inserts an X-Sendfile header to be use by the mod_xsendfile module, mod_rewrite is invoked a second time for a subrequest during file path validation. That's fine but the second invocation causes the hook (handle_bw) to add the bandwidth output filter twice. I haven't verified if that actually causes duplicate data on the wire but it causes BW to think there's twice as many connections, causing it to apply limits unnecessarily.

I've got a branch I'll submit soon with a fix, along with the PR. Hopefully that can be incorporated into the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant