Bug 57968 - SetHandler converts proxy:unix:/path/TO/app to lower case
Summary: SetHandler converts proxy:unix:/path/TO/app to lower case
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_fcgi (show other bugs)
Version: 2.4.12
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2015-05-28 15:55 UTC by Rainer Canavan
Modified: 2015-06-25 06:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Canavan 2015-05-28 15:55:48 UTC
The documentation for mod_proxy_fcgi includes an example that uses SetHandler to connect to a unix domain socket specified as proxy:unix:/path/to[...]. Those don't work for my test setup, since the path to the socket is converted to lower case. There's no hint in the documentation, either for mod_proxy_fcgi or SetHandler, that this conversion takes place (by ap_set_string_slot_lower via AP_INIT_TAKE1 in server/core.c, if I'm not mistaken).

In my httpd.conf, I have specified

SetHandler  "proxy:unix:/home/canavan/FIT/trunk/run/php-fpm.sock|fcgi://localhost/"

and with sufficiently high log level, one can see that the lowercase path is used instead:

[Thu May 28 17:33:35.560520 2015] [proxy:error] [pid 2636:tid 140176269518592] [client 127.0.0.1:53219] sockpath /home/canavan/fit/trunk/run/php-fpm.sock
[...]
[Thu May 28 17:33:35.560565 2015] [proxy:debug] [pid 2636:tid 140176269518592] proxy_util.c(2220): [client 127.0.0.1:53219] AH02545: fcgi: has determined UDS as /home/canavan/fit/trunk/run/php-fpm.sock
[Thu May 28 17:33:35.560663 2015] [proxy:debug] [pid 2636:tid 140176269518592] proxy_util.c(2388): [client 127.0.0.1:53219] AH00947: connected //home/canavan/FIT/14/testhost/staticwww/index.php to httpd-UDS:0
[Thu May 28 17:33:35.560698 2015] [proxy:error] [pid 2636:tid 140176269518592] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /home/canavan/fit/trunk/run/php-fpm.sock (*) failed
Comment 1 Eric Covener 2015-05-29 14:25:55 UTC
Thanks Rainer, I've fixed this in trunk http://svn.apache.org/r1682482 and proposed it for backport to 2.4.x.
Comment 2 Christophe JAILLET 2015-06-25 06:08:04 UTC
This is part of the (unreleased) 2.4.13
backport in r1682888