-
Notifications
You must be signed in to change notification settings - Fork 212
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
LocationMatch with Apache2 #200
Comments
I think this is actually an expected behavior, since the path matches with LocationMatch and it's stripped as a SCRIPT_NAME now, and the remaining bit (which is "/") goes to the PATH_INFO. Is that right? That said, I understand the need for the original (buggy) behavior where you can partially match the path while keeping the PATH_INFO intact, as if the app is hosted at /. Is there any easy way to work around, probably using mod_rewrite? |
Thank you for opening this issue. Behind Apache I'm running Dancer, and when I try this: This Dancer sub prints out "/".
But, If I change the Location match from Dancer prints out "/andebol/videos/" (which is what I expected it to do), but I get an error on error-log saying:
|
I don't understand the issue here - the LocationMatch "/(testing)/(andebol/videos/)" regexp clearly doesn't match with the request path "/andebol/videos/" or does it? |
Oh, i know what is going on - your match has "/" in the left side of | but not on the right side, confusing Plack::Handler::Apache2.
and that will nuke the warnings. BUT then, you'll see the original problem, where these "/andebol/videos" is stripped away from your request path, since Plack assumes that's the "base" path of your application. |
See: http://cpansearch.perl.org/src/FLORA/Catalyst-Engine-Apache-1.16/lib/Catalyst/Engine/Apache.pm
|
via email:
I encountered a problem when using Plack::Handler::Apache2 in two machines with equal apache configuration but different Plack::Handler::Apache2 versions.
In both machines there's a LocationMatch like this:
When running in machine 1 (older version of Plack::Handler::Apache2), that has this code in the fixup_path sub:
Everything goes well when I point my browser to http://myserver.com/andebol/videos/
When trying the same LocationMatch with the newest version of Plack::Handler::Apache2, with my browser pointed to http://yserver.com/andebol/videos/ , in my application, the request_uri is just "/"
When I change the LocationMatch to this:
<LocationMatch "/(testing)|(andebol/videos/)">
The request_uri on my application is correct, /andebol/videos/, but I got this error in the apache error log:
Your request path is '/andebol/videos/' and it doesn't match your Location(Match) '/(testing)|(andebol/videos/)'. This should be due to the configuration error. See perldoc Plack::Handler::Apache2 for details.
I looked at this line ~#106:
so that no substitution is made, and path_info keeps unchanged.
I ask if this is a bug with Plack::Handler::Apache2 or if I'm using it incorrectly.
The text was updated successfully, but these errors were encountered: