diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-09-02 14:37:02 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-09-02 14:37:02 +0200 |
commit | 520dcd80a45ce237e9a46ee28697e1b8af3fcd7e (patch) | |
tree | 57c437f16edb8e43551735db7feabd5b9838184f /modules/proxy | |
parent | mod_proxy_uwsgi: Fix PATH_INFO setting for generic worker. (diff) | |
download | apache2-520dcd80a45ce237e9a46ee28697e1b8af3fcd7e.tar.xz apache2-520dcd80a45ce237e9a46ee28697e1b8af3fcd7e.zip |
mod_proxy: Faster unix socket path parsing in the "proxy:" URL.
The actual r->filename format is "[proxy:]unix:path|url" for UDS, no need to
strstr(,"unix:") since it's at the start of the string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892814 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r-- | modules/proxy/proxy_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 86acaba211..c78e1e2b03 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2274,8 +2274,8 @@ static void fix_uds_filename(request_rec *r, char **url) if (!r || !r->filename) return; if (!strncmp(r->filename, "proxy:", 6) && - (ptr2 = ap_strcasestr(r->filename, "unix:")) && - (ptr = ap_strchr(ptr2, '|'))) { + !ap_cstr_casecmpn(r->filename + 6, "unix:", 5) && + (ptr2 = r->filename + 6 + 5, ptr = ap_strchr(ptr2, '|'))) { apr_uri_t urisock; apr_status_t rv; *ptr = '\0'; |