Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-11 Thread Jan Kaluža
On 07/10/2014 03:57 PM, Yann Ylavic wrote: On Thu, Jul 10, 2014 at 9:12 AM, Jan Kaluža jkal...@redhat.com wrote: On 07/09/2014 04:26 PM, Yann Ylavic wrote: I forgot proxysection(), why not handle the ap_proxy_define_match_worker() case there too? I'm not sure I see what you mean. There's

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-10 Thread Jan Kaluža
On 07/09/2014 04:26 PM, Yann Ylavic wrote: On Wed, Jul 9, 2014 at 4:14 PM, Yann Ylavic ylavic@gmail.com wrote: On Wed, Jul 9, 2014 at 3:03 PM, Jan Kaluža jkal...@redhat.com wrote: Hi, could you please check the patch I've attached to this email? Looks good to me. It changes following

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-10 Thread Yann Ylavic
On Thu, Jul 10, 2014 at 9:12 AM, Jan Kaluža jkal...@redhat.com wrote: On 07/09/2014 04:26 PM, Yann Ylavic wrote: I forgot proxysection(), why not handle the ap_proxy_define_match_worker() case there too? I'm not sure I see what you mean. There's match_worker created in proxysection(), or do

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-09 Thread Jan Kaluža
On 04/29/2014 03:51 PM, Jim Jagielski wrote: On Apr 29, 2014, at 8:41 AM, Jan Kaluža jkal...@redhat.com wrote: Because later we have to match the URL of request with some proxy_worker. If you configure ProxyPassMatch like this: ProxyPassMatch ^/test/(\d+)/foo.jpg http://x/$1/foo.jpg Then

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-09 Thread Yann Ylavic
On Wed, Jul 9, 2014 at 3:03 PM, Jan Kaluža jkal...@redhat.com wrote: Hi, could you please check the patch I've attached to this email? Looks good to me. It changes following parts of Yann's patch: 1. keep only single name of the worker stored in shared memory. 2. when ProxyPassMatch is

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-07-09 Thread Yann Ylavic
On Wed, Jul 9, 2014 at 4:14 PM, Yann Ylavic ylavic@gmail.com wrote: On Wed, Jul 9, 2014 at 3:03 PM, Jan Kaluža jkal...@redhat.com wrote: Hi, could you please check the patch I've attached to this email? Looks good to me. It changes following parts of Yann's patch: 1. keep only

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-30 Thread Yann Ylavic
On Wed, Apr 30, 2014 at 12:53 AM, Yann Ylavic ylavic@gmail.com wrote: Still another solution for these workers would be to reuse the ap_regmatch_t vector from proxy_trans() to exact match the worker's name (with its zero or more $N replaced with strings offsets from vector[N], like

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jim Jagielski
On Apr 24, 2014, at 8:57 PM, Yann Ylavic ylavic@gmail.com wrote: Hi Jan, sorry for the late. On Tue, Apr 22, 2014 at 3:39 PM, Jan Kaluža jkal...@redhat.com wrote: Hi again, the patch has been here for some time already. I hesitate to commit it to trunk without any review, because

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jan Kaluža
On 04/29/2014 01:04 PM, Jim Jagielski wrote: On Apr 24, 2014, at 8:57 PM, Yann Ylavic ylavic@gmail.com wrote: Hi Jan, sorry for the late. On Tue, Apr 22, 2014 at 3:39 PM, Jan Kaluža jkal...@redhat.com wrote: Hi again, the patch has been here for some time already. I hesitate to commit

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jim Jagielski
On Apr 29, 2014, at 7:41 AM, Jan Kaluža jkal...@redhat.com wrote: That's what we do with current patch I think, don't we? In the patch, we create char *match_name which is NULL when the worker_name is not regex and contains the escaped name if regex is used (with $N replaced by '*').

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jan Kaluža
On 04/29/2014 02:22 PM, Jim Jagielski wrote: On Apr 29, 2014, at 7:41 AM, Jan Kaluža jkal...@redhat.com wrote: That's what we do with current patch I think, don't we? In the patch, we create char *match_name which is NULL when the worker_name is not regex and contains the escaped name if

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jim Jagielski
On Apr 29, 2014, at 8:41 AM, Jan Kaluža jkal...@redhat.com wrote: Because later we have to match the URL of request with some proxy_worker. If you configure ProxyPassMatch like this: ProxyPassMatch ^/test/(\d+)/foo.jpg http://x/$1/foo.jpg Then the proxy_worker name would be

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jan Kaluža
On 04/29/2014 03:29 PM, Jim Jagielski wrote: On Apr 29, 2014, at 8:41 AM, Jan Kaluža jkal...@redhat.com wrote: Because later we have to match the URL of request with some proxy_worker. If you configure ProxyPassMatch like this: ProxyPassMatch ^/test/(\d+)/foo.jpg http://x/$1/foo.jpg Then

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Jim Jagielski
On Apr 29, 2014, at 8:41 AM, Jan Kaluža jkal...@redhat.com wrote: Because later we have to match the URL of request with some proxy_worker. If you configure ProxyPassMatch like this: ProxyPassMatch ^/test/(\d+)/foo.jpg http://x/$1/foo.jpg Then the proxy_worker name would be

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-29 Thread Yann Ylavic
On Tue, Apr 29, 2014 at 3:51 PM, Jim Jagielski j...@jagunet.com wrote: On Apr 29, 2014, at 8:41 AM, Jan Kaluža jkal...@redhat.com wrote: Because later we have to match the URL of request with some proxy_worker. If you configure ProxyPassMatch like this: ProxyPassMatch ^/test/(\d+)/foo.jpg

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-28 Thread Jan Kaluža
On 04/25/2014 02:57 AM, Yann Ylavic wrote: Hi Jan, sorry for the late. No problem :). On Tue, Apr 22, 2014 at 3:39 PM, Jan Kaluža jkal...@redhat.com wrote: Hi again, the patch has been here for some time already. I hesitate to commit it to trunk without any review, because it changes the

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-24 Thread Yann Ylavic
Hi Jan, sorry for the late. On Tue, Apr 22, 2014 at 3:39 PM, Jan Kaluža jkal...@redhat.com wrote: Hi again, the patch has been here for some time already. I hesitate to commit it to trunk without any review, because it changes the core code in mod_proxy and I'm afraid that there could exist

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-22 Thread Jan Kaluža
Hi again, the patch has been here for some time already. I hesitate to commit it to trunk without any review, because it changes the core code in mod_proxy and I'm afraid that there could exist more corner-cases I'm not aware of. On the other side (and to motivate someone with deeper

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-04-10 Thread Jan Kaluža
Hi, can you please check the attached patch? I think it should be closer to the proper way how to fix this than the previous one. It works properly for me even for URLs with '*' and '?'. Regards, Jan Kaluza On 03/21/2014 03:27 PM, Yann Ylavic wrote: Yes, selecting the right worker is all

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-21 Thread Yann Ylavic
On Wed, Mar 19, 2014 at 9:59 AM, Jan Kaluža jkal...@redhat.com wrote: On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-21 Thread Yann Ylavic
oups, sorry for the numbering. On Fri, Mar 21, 2014 at 2:11 PM, Yann Ylavic ylavic@gmail.com wrote: On Wed, Mar 19, 2014 at 9:59 AM, Jan Kaluža jkal...@redhat.com wrote: On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote:

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-21 Thread Jim Jagielski
Just a thought, but wouldn't the better place to fix this be in ap_proxy_get_worker()?? On Mar 21, 2014, at 9:13 AM, Yann Ylavic ylavic@gmail.com wrote: oups, sorry for the numbering. On Fri, Mar 21, 2014 at 2:11 PM, Yann Ylavic ylavic@gmail.com wrote: On Wed, Mar 19, 2014 at 9:59

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-21 Thread Yann Ylavic
Yes, selecting the right worker is all in ap_proxy_get_worker(), but probably also add_pass() and proxysection() would need something like ap_proxy_define_wildcard_worker() to register this kind of worker (save the original name, ...). On Fri, Mar 21, 2014 at 3:15 PM, Jim Jagielski

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-19 Thread Jan Kaluža
On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the dollars (plus the following digit) could be

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-19 Thread Jan Kaluža
On 03/19/2014 09:59 AM, Jan Kaluža wrote: On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-19 Thread Jan Kaluža
On 03/19/2014 10:13 AM, Jan Kaluža wrote: On 03/19/2014 09:59 AM, Jan Kaluža wrote: On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-18 Thread Jan Kaluza
This is also needed to fix ProxyPassMatch with UDS. Without this patch following configuration does not work: ProxyPassMatch ^/web/(.*\.php)$ unix:/run/php-fpm/fpm.sock|fcgi://127.0.0.1/var/www/html/$1 If nobody is against, I will commit it to trunk later this week. Regards, Jan Kaluza On

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-18 Thread Yann Ylavic
Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the dollars (plus the following digit) could be replaced by a wildcard (ie. *) and ap_proxy_get_worker() could then use ap_strcasecmp_match() against the requested URL.

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-18 Thread Yann Ylavic
On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the dollars (plus the following digit) could be replaced by a wildcard (ie. *) and

Re: [PATCH] Fix settings options with ProxyPassMatch

2014-03-18 Thread Jan Kaluza
On 03/18/2014 02:46 PM, Yann Ylavic wrote: On Tue, Mar 18, 2014 at 2:38 PM, Yann Ylavic ylavic@gmail.com wrote: Wouldn't it be possible to define wildcard workers when the URL is known to be a regexp substitution? For these workers' URLs, the dollars (plus the following digit) could be