Mailing List Archive

svn commit: r1893516 - in /httpd/httpd/trunk: changes-entries/rewrite_uds.txt modules/mappers/mod_rewrite.c
Author: ylavic
Date: Wed Sep 22 18:16:38 2021
New Revision: 1893516

URL: http://svn.apache.org/viewvc?rev=1893516&view=rev
Log:
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 <janne.peltonen sange.fi>
Reviewed by: ylavic


Added:
httpd/httpd/trunk/changes-entries/rewrite_uds.txt
Modified:
httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Added: httpd/httpd/trunk/changes-entries/rewrite_uds.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/changes-entries/rewrite_uds.txt?rev=1893516&view=auto
==============================================================================
--- httpd/httpd/trunk/changes-entries/rewrite_uds.txt (added)
+++ httpd/httpd/trunk/changes-entries/rewrite_uds.txt Wed Sep 22 18:16:38 2021
@@ -0,0 +1,2 @@
+ *) mod_rewrite: Fix UDS ("unix:") scheme for [P] rules. PR 57691 + 65590.
+ [Janne Peltonen <janne.peltonen sange.fi>]
\ No newline at end of file

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1893516&r1=1893515&r2=1893516&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Wed Sep 22 18:16:38 2021
@@ -653,6 +653,13 @@ static unsigned is_absolute_uri(char *ur
return 6;
}
break;
+
+ case 'u':
+ case 'U':
+ if (!ap_cstr_casecmpn(uri, "nix:", 4)) { /* unix: */
+ *sqs = 1;
+ return 5;
+ }
}

return 0;