You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Eric Covener <co...@gmail.com> on 2014/11/24 03:57:38 UTC
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy:
mod_proxy.c mod_proxy.h proxy_util.c
On Fri, Jul 11, 2014 at 6:36 AM, <jk...@apache.org> wrote:
> static int ap_proxy_strcmp_ematch(const char *str, const char *expected)
> +{
> + apr_size_t x, y;
> +
> + for (x = 0, y = 0; expected[y]; ++y, ++x) {
> + if ((!str[x]) && (expected[y] != '
> || !apr_isdigit(expected[y + 1])))
> + return -1;
> + if (expected[y] == ' && apr_isdigit(expected[y + 1])) {
> + while (expected[y] == ' && apr_isdigit(expected[y + 1]))
> + y += 2;
> + if (!expected[y])
> + return 0;
> + while (str[x]) {
> + int ret;
> + if ((ret = ap_proxy_strcmp_ematch(&str[x++], &expected[y])) != 1)
> + return ret;
> + }
> + return -1;
> + }
> + else if (expected[y] == '\\') {
> + /* NUL is an invalid char! */
> + if (!expected[++y])
> + return -2;
> + }
> + if (str[x] != expected[y])
> + return 1;
> + }
> + return (str[x] != '\0');
> +}
This is breaking the common PHP-FPM recipes using unix domain sockets
in trunk e.g.
ProxyPassMatch ^/info.php$
"unix:/var/run/php5-fpm.sock|fcgi://localhost/home/covener/SRC/httpd-trunk/built/htdocs/"
The old test accepted the worker URL being a prefix of the worker:
(, but now that doesn't happen for ProxyPassMatch. This seems to be
due to the last return.
--
Eric Covener
covener@gmail.com
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c
mod_proxy.h proxy_util.c
Posted by Jan Kaluža <jk...@redhat.com>.
On 11/24/2014 03:59 AM, Eric Covener wrote:
> On Sun, Nov 23, 2014 at 9:57 PM, Eric Covener <co...@gmail.com> wrote:
>> On Fri, Jul 11, 2014 at 6:36 AM, <jk...@apache.org> wrote:
>>> static int ap_proxy_strcmp_ematch(const char *str, const char *expected)
>>> +{
>>> + apr_size_t x, y;
>>> +
>>> + for (x = 0, y = 0; expected[y]; ++y, ++x) {
>>> + if ((!str[x]) && (expected[y] != '
>>> || !apr_isdigit(expected[y + 1])))
>>> + return -1;
>>> + if (expected[y] == ' && apr_isdigit(expected[y + 1])) {
>>> + while (expected[y] == ' && apr_isdigit(expected[y + 1]))
>>> + y += 2;
>>> + if (!expected[y])
>>> + return 0;
>>> + while (str[x]) {
>>> + int ret;
>>> + if ((ret = ap_proxy_strcmp_ematch(&str[x++], &expected[y])) != 1)
>>> + return ret;
>>> + }
>>> + return -1;
>>> + }
>>> + else if (expected[y] == '\\') {
>>> + /* NUL is an invalid char! */
>>> + if (!expected[++y])
>>> + return -2;
>>> + }
>>> + if (str[x] != expected[y])
>>> + return 1;
>>> + }
>>> + return (str[x] != '\0');
>>> +}
>>
>
> Sorry, stray keystroke (tab?) made gmail send early.
>
> This is breaking the common PHP-FPM recipes using unix domain sockets
> in trunk e.g.
>
> ProxyPassMatch ^/info.php$
> "unix:/var/run/php5-fpm.sock|fcgi://localhost/home/covener/SRC/httpd-trunk/built/htdocs/"
>
> The old test accepted the worker URL being a prefix of the worker:
>
> strncmp(url_copy, worker->s->name, worker_name_length) == 0)
>
> but now that doesn't happen for ProxyPassMatch. This seems to be
> due to the last return expecting str[x] to have been totally consumed
> by the expected (worker) string.
>
>
Conflict discovered in file 'proxy/proxy_util.c'.
^ You were faster, thanks for fixing this issue :).
Regards,
Jan Kaluza
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c mod_proxy.h proxy_util.c
Posted by Jim Jagielski <ji...@jaguNET.com>.
+1
> On Nov 27, 2014, at 11:51 AM, Yann Ylavic <yl...@gmail.com> wrote:
>
> On Thu, Nov 27, 2014 at 12:36 PM, Jan Kaluža <jk...@redhat.com> wrote:
>> On 11/24/2014 01:37 PM, Eric Covener wrote:
>>>
>>> please check r1641381
>>
>>
>> Anyone against proposing r1609680 (commit from the subject) + r1641381 for
>> 2.4.x?
>
> +1
>
> Thanks,
> Yann.
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy:
mod_proxy.c mod_proxy.h proxy_util.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Nov 27, 2014 at 12:36 PM, Jan Kaluža <jk...@redhat.com> wrote:
> On 11/24/2014 01:37 PM, Eric Covener wrote:
>>
>> please check r1641381
>
>
> Anyone against proposing r1609680 (commit from the subject) + r1641381 for
> 2.4.x?
+1
Thanks,
Yann.
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c
mod_proxy.h proxy_util.c
Posted by Jan Kaluža <jk...@redhat.com>.
On 11/24/2014 01:37 PM, Eric Covener wrote:
> please check r1641381
Anyone against proposing r1609680 (commit from the subject) + r1641381
for 2.4.x?
Regards,
Jan Kaluza
> On Sun, Nov 23, 2014 at 9:59 PM, Eric Covener <co...@gmail.com> wrote:
>> On Sun, Nov 23, 2014 at 9:57 PM, Eric Covener <co...@gmail.com> wrote:
>>> On Fri, Jul 11, 2014 at 6:36 AM, <jk...@apache.org> wrote:
>>>> static int ap_proxy_strcmp_ematch(const char *str, const char *expected)
>>>> +{
>>>> + apr_size_t x, y;
>>>> +
>>>> + for (x = 0, y = 0; expected[y]; ++y, ++x) {
>>>> + if ((!str[x]) && (expected[y] != '
>>>> || !apr_isdigit(expected[y + 1])))
>>>> + return -1;
>>>> + if (expected[y] == ' && apr_isdigit(expected[y + 1])) {
>>>> + while (expected[y] == ' && apr_isdigit(expected[y + 1]))
>>>> + y += 2;
>>>> + if (!expected[y])
>>>> + return 0;
>>>> + while (str[x]) {
>>>> + int ret;
>>>> + if ((ret = ap_proxy_strcmp_ematch(&str[x++], &expected[y])) != 1)
>>>> + return ret;
>>>> + }
>>>> + return -1;
>>>> + }
>>>> + else if (expected[y] == '\\') {
>>>> + /* NUL is an invalid char! */
>>>> + if (!expected[++y])
>>>> + return -2;
>>>> + }
>>>> + if (str[x] != expected[y])
>>>> + return 1;
>>>> + }
>>>> + return (str[x] != '\0');
>>>> +}
>>>
>>
>> Sorry, stray keystroke (tab?) made gmail send early.
>>
>> This is breaking the common PHP-FPM recipes using unix domain sockets
>> in trunk e.g.
>>
>> ProxyPassMatch ^/info.php$
>> "unix:/var/run/php5-fpm.sock|fcgi://localhost/home/covener/SRC/httpd-trunk/built/htdocs/"
>>
>> The old test accepted the worker URL being a prefix of the worker:
>>
>> strncmp(url_copy, worker->s->name, worker_name_length) == 0)
>>
>> but now that doesn't happen for ProxyPassMatch. This seems to be
>> due to the last return expecting str[x] to have been totally consumed
>> by the expected (worker) string.
>>
>>
>> --
>> Eric Covener
>> covener@gmail.com
>
>
>
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy:
mod_proxy.c mod_proxy.h proxy_util.c
Posted by Eric Covener <co...@gmail.com>.
please check r1641381
On Sun, Nov 23, 2014 at 9:59 PM, Eric Covener <co...@gmail.com> wrote:
> On Sun, Nov 23, 2014 at 9:57 PM, Eric Covener <co...@gmail.com> wrote:
>> On Fri, Jul 11, 2014 at 6:36 AM, <jk...@apache.org> wrote:
>>> static int ap_proxy_strcmp_ematch(const char *str, const char *expected)
>>> +{
>>> + apr_size_t x, y;
>>> +
>>> + for (x = 0, y = 0; expected[y]; ++y, ++x) {
>>> + if ((!str[x]) && (expected[y] != '
>>> || !apr_isdigit(expected[y + 1])))
>>> + return -1;
>>> + if (expected[y] == ' && apr_isdigit(expected[y + 1])) {
>>> + while (expected[y] == ' && apr_isdigit(expected[y + 1]))
>>> + y += 2;
>>> + if (!expected[y])
>>> + return 0;
>>> + while (str[x]) {
>>> + int ret;
>>> + if ((ret = ap_proxy_strcmp_ematch(&str[x++], &expected[y])) != 1)
>>> + return ret;
>>> + }
>>> + return -1;
>>> + }
>>> + else if (expected[y] == '\\') {
>>> + /* NUL is an invalid char! */
>>> + if (!expected[++y])
>>> + return -2;
>>> + }
>>> + if (str[x] != expected[y])
>>> + return 1;
>>> + }
>>> + return (str[x] != '\0');
>>> +}
>>
>
> Sorry, stray keystroke (tab?) made gmail send early.
>
> This is breaking the common PHP-FPM recipes using unix domain sockets
> in trunk e.g.
>
> ProxyPassMatch ^/info.php$
> "unix:/var/run/php5-fpm.sock|fcgi://localhost/home/covener/SRC/httpd-trunk/built/htdocs/"
>
> The old test accepted the worker URL being a prefix of the worker:
>
> strncmp(url_copy, worker->s->name, worker_name_length) == 0)
>
> but now that doesn't happen for ProxyPassMatch. This seems to be
> due to the last return expecting str[x] to have been totally consumed
> by the expected (worker) string.
>
>
> --
> Eric Covener
> covener@gmail.com
--
Eric Covener
covener@gmail.com
Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy:
mod_proxy.c mod_proxy.h proxy_util.c
Posted by Eric Covener <co...@gmail.com>.
On Sun, Nov 23, 2014 at 9:57 PM, Eric Covener <co...@gmail.com> wrote:
> On Fri, Jul 11, 2014 at 6:36 AM, <jk...@apache.org> wrote:
>> static int ap_proxy_strcmp_ematch(const char *str, const char *expected)
>> +{
>> + apr_size_t x, y;
>> +
>> + for (x = 0, y = 0; expected[y]; ++y, ++x) {
>> + if ((!str[x]) && (expected[y] != '
>> || !apr_isdigit(expected[y + 1])))
>> + return -1;
>> + if (expected[y] == ' && apr_isdigit(expected[y + 1])) {
>> + while (expected[y] == ' && apr_isdigit(expected[y + 1]))
>> + y += 2;
>> + if (!expected[y])
>> + return 0;
>> + while (str[x]) {
>> + int ret;
>> + if ((ret = ap_proxy_strcmp_ematch(&str[x++], &expected[y])) != 1)
>> + return ret;
>> + }
>> + return -1;
>> + }
>> + else if (expected[y] == '\\') {
>> + /* NUL is an invalid char! */
>> + if (!expected[++y])
>> + return -2;
>> + }
>> + if (str[x] != expected[y])
>> + return 1;
>> + }
>> + return (str[x] != '\0');
>> +}
>
Sorry, stray keystroke (tab?) made gmail send early.
This is breaking the common PHP-FPM recipes using unix domain sockets
in trunk e.g.
ProxyPassMatch ^/info.php$
"unix:/var/run/php5-fpm.sock|fcgi://localhost/home/covener/SRC/httpd-trunk/built/htdocs/"
The old test accepted the worker URL being a prefix of the worker:
strncmp(url_copy, worker->s->name, worker_name_length) == 0)
but now that doesn't happen for ProxyPassMatch. This seems to be
due to the last return expecting str[x] to have been totally consumed
by the expected (worker) string.
--
Eric Covener
covener@gmail.com