From: Yann Ylavic Date: Wed, 22 Sep 2021 18:16:38 +0000 (+0000) Subject: mod_rewrite: Fix UDS ("unix:") scheme for [P] rules. PR 57691 + 65590. X-Git-Tag: 2.5.0-alpha2-ci-test-only~793 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d76cbb9100bf34250ffba0bded08e075380be88;p=thirdparty%2Fapache%2Fhttpd.git mod_rewrite: Fix UDS ("unix:") scheme for [P] rules. PR 57691 + 65590. Handle the unix: scheme as an obsolute URI or a rule like: RewriteRule ^/(.*) unix:/path/to/uds.sock|fcgi://localhost/$1 [P] sets r->filename for /index.html as: proxy:http://www.example.com/unix:/path/to/uds.sock|http://localhost/index.html instead of the expected: proxy:unix:/path/to/uds.sock|http://localhost/index.html Submitted by: Janne Peltonen Reviewed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893516 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/rewrite_uds.txt b/changes-entries/rewrite_uds.txt new file mode 100644 index 00000000000..4b752a8b46c --- /dev/null +++ b/changes-entries/rewrite_uds.txt @@ -0,0 +1,2 @@ + *) mod_rewrite: Fix UDS ("unix:") scheme for [P] rules. PR 57691 + 65590. + [Janne Peltonen ] \ No newline at end of file diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 06d8a154370..dc21a8eb83b 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -653,6 +653,13 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs) return 6; } break; + + case 'u': + case 'U': + if (!ap_cstr_casecmpn(uri, "nix:", 4)) { /* unix: */ + *sqs = 1; + return 5; + } } return 0;