Re: svn commit: r1592615 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_scgi.c proxy_util.c scgi.h

2014-05-05 Thread Jeff Trawick
On Mon, May 5, 2014 at 3:43 PM, Marion & Christophe JAILLET <
christophe.jail...@wanadoo.fr> wrote:

> Thanks :)
> The comment also answer a question I had: "Where does this default 4000
> comes from?"
>
>
> /** @} */
> missing ?
>

r1592632

Thanks!


>
> CJ
>
> Le 05/05/2014 21:26, traw...@apache.org a écrit :
>
>> Author: trawick
>>
>> Added: httpd/httpd/trunk/modules/proxy/scgi.h
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/
>> proxy/scgi.h?rev=1592615&view=auto
>> 
>> ==
>> --- httpd/httpd/trunk/modules/proxy/scgi.h (added)
>> +++ httpd/httpd/trunk/modules/proxy/scgi.h Mon May  5 19:26:33 2014
>> @@ -0,0 +1,34 @@
>> +/* Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + * http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +
>> +/**
>> + * @file scgi.h
>> + * @brief Shared SCGI-related definitions
>> + *
>> + * @ingroup APACHE_INTERNAL
>> + * @{
>> + */
>> +
>> +#ifndef SCGI_H
>> +#define SCGI_H
>> +
>> +/* This is not defined by the protocol.  It is a convention
>> + * of mod_proxy_scgi, and mod_proxy utility routines must
>> + * use the same value as mod_proxy_scgi.
>> + */
>> +#define SCGI_DEF_PORT 4000
>> +
>> +#endif /* SCGI_H */
>>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/


[patch] regexp rewrite map

2014-05-05 Thread Jim Riggs
[Posting separately to both dev and users to see if anyone on either side sees 
value in getting this committed.]

About a year ago, I had an idea for a new type of RewriteMap that would fill an 
important need for a few particular use cases that we have [1]. While we were 
at ApacheCon in Denver, I spent some time talking with JimJag, Rich, and 
Covener as well as updating the code from a crude proof of concept to something 
real. I would appreciate feedback from anyone, especially on whether or not 
this is something worth pursuing getting committed.

It is a simple concept: the map is just a list of regexp patterns and 
replacements. These could be done as individual RewriteRules, obviously, but 
this rewrite map would reduce clutter in the config file, be more readable, and 
could even be externally generated/maintained without any httpd admin 
involvement. For example, an application or batch job could generate a map file 
with dozens or hundreds of entries that httpd would pick up without a 
restart/graceful, and the config might only contain a single RewriteRule:


[map file]
/foo(bar)? /baz$1
/(apple|banana|orange) /fruit/$1
/post/(\d+)(/.*)?  /article/$1$2
...


[config file]
RewriteMap "regexptest" "regexp:path/to/re.map"

RewriteCond "${regexptest:$1}" "^(.+)$"
RewriteRule "^(.*)$" "%1" [R]
...


Possible use cases that I can think of:

1. Redirect list (e.g. legacy site to new site) without pages of 
RewriteRules/Redirects
2. Simplify 100s or 1000s of rewrite rules into 1 + the map as above
3. "White list" of URL patterns to proxy through to backend servers (can be 
application generated; my particular use case)
4. Maps could be application generated, maintained in a spreadsheet or DB, or 
created with scripts/greps/etc.

Just like text and hash maps, results are cached. I did some tests with up to 
100K entries in the map, and it was still extremely responsive and worked 
flawlessly. The only thing this doesn't have is flags (e.g. NC), but that can 
be handled in the pattern itself via (?i).

If interested, I would love it if some folks would try the attached patch and 
let me know what you think.

- Jim

[1] http://httpd.markmail.org/thread/3dheejtgwmdpxxt5



regexp_map.patch
Description: Binary data




Re: svn commit: r1592615 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_scgi.c proxy_util.c scgi.h

2014-05-05 Thread Marion & Christophe JAILLET

Thanks :)
The comment also answer a question I had: "Where does this default 4000 
comes from?"



/** @} */
missing ?

CJ

Le 05/05/2014 21:26, traw...@apache.org a écrit :

Author: trawick
Added: httpd/httpd/trunk/modules/proxy/scgi.h
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/scgi.h?rev=1592615&view=auto
==
--- httpd/httpd/trunk/modules/proxy/scgi.h (added)
+++ httpd/httpd/trunk/modules/proxy/scgi.h Mon May  5 19:26:33 2014
@@ -0,0 +1,34 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file scgi.h
+ * @brief Shared SCGI-related definitions
+ *
+ * @ingroup APACHE_INTERNAL
+ * @{
+ */
+
+#ifndef SCGI_H
+#define SCGI_H
+
+/* This is not defined by the protocol.  It is a convention
+ * of mod_proxy_scgi, and mod_proxy utility routines must
+ * use the same value as mod_proxy_scgi.
+ */
+#define SCGI_DEF_PORT 4000
+
+#endif /* SCGI_H */


Re: svn commit: r1592529 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_scgi.c modules/proxy/proxy_util.c

2014-05-05 Thread Marion & Christophe JAILLET

Moreover,

all mod_proxy_something that do not append the port when the default is 
used are built this way:


static int FCT_canon(request_rec *r, char *url)
{
[...]
apr_port_t port, def_port;
[...]

if (port != def_port)
apr_snprintf(sport, sizeof(sport), ":%d", port);
else
sport[0] = '\0';
[...]
}

All, except scgi, use a ":%d". scgi has ":%u".

To be consistent, I think that %u should be used in all places.


CJ


Le 05/05/2014 20:59, Marion & Christophe JAILLET a écrit :

Hi,

why not having SCGI_DEFAULT_PORT in a .h file, just as AJP13_DEF_PORT?
This would avoid using SCGI_DEFAULT_PORT in one place and 4000 in 
another.


Moreover, this could be renamed as SCGI_DEF_PORT to be consistent with 
AJP.


Just my 2 cents.

CJ

Le 05/05/2014 16:02, traw...@apache.org a écrit :

Author: trawick
Date: Mon May  5 14:02:48 2014
New Revision: 1592529

URL: http://svn.apache.org/r1592529
Log:
mod_proxy_scgi: Support Unix sockets.

ap_proxy_port_of_scheme(): Support default SCGI port (4000).

Modified:
 httpd/httpd/trunk/CHANGES
 httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
 httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1592529&r1=1592528&r2=1592529&view=diff
== 


--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon May  5 14:02:48 2014
@@ -1,6 +1,9 @@
   -*- 
coding: utf-8 -*-

  Changes with Apache 2.5.0
  +  *) mod_proxy_scgi: Support Unix sockets. ap_proxy_port_of_scheme():
+ Support default SCGI port (4000).  [Jeff Trawick]
+
*) mod_proxy_fcgi: Fix occasional high CPU when handling request 
bodies.

   [Jeff Trawick]

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c?rev=1592529&r1=1592528&r2=1592529&view=diff
== 


--- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Mon May  5 
14:02:48 2014

@@ -176,13 +176,15 @@ static int scgi_canon(request_rec *r, ch
  {
  char *host, sport[sizeof(":65535")];
  const char *err, *path;
-apr_port_t port = SCGI_DEFAULT_PORT;
+apr_port_t port, def_port;
if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
  return DECLINED;
  }
  url += sizeof(SCHEME); /* Keep slashes */
  +port = def_port = SCGI_DEFAULT_PORT;
+
  err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, 
&port);

  if (err) {
  ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
@@ -190,7 +192,12 @@ static int scgi_canon(request_rec *r, ch
  return HTTP_BAD_REQUEST;
  }
  -apr_snprintf(sport, sizeof(sport), ":%u", port);
+if (port != def_port) {
+apr_snprintf(sport, sizeof(sport), ":%u", port);
+}
+else {
+sport[0] = '\0';
+}
if (ap_strchr(host, ':')) { /* if literal IPv6 address */
  host = apr_pstrcat(r->pool, "[", host, "]", NULL);

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1592529&r1=1592528&r2=1592529&view=diff
== 


--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon May  5 14:02:48 
2014

@@ -3514,6 +3514,7 @@ static proxy_schemes_t pschemes[] =
  {
  {"fcgi", 8000},
  {"ajp",  AJP13_DEF_PORT},
+{"scgi", 4000},
  { NULL, 0x } /* unknown port */
  };






Re: svn commit: r1592529 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_scgi.c modules/proxy/proxy_util.c

2014-05-05 Thread Jeff Trawick
On Mon, May 5, 2014 at 2:59 PM, Marion & Christophe JAILLET <
christophe.jail...@wanadoo.fr> wrote:

> Hi,
>
> why not having SCGI_DEFAULT_PORT in a .h file, just as AJP13_DEF_PORT?
> This would avoid using SCGI_DEFAULT_PORT in one place and 4000 in another.
>
> Moreover, this could be renamed as SCGI_DEF_PORT to be consistent with AJP.
>
> Just my 2 cents.
>
> CJ
>

I previously considered it as a very marginal improvement at best, but
since you asked I'll make the change :)

r1592615

Thanks!


> Le 05/05/2014 16:02, traw...@apache.org a écrit :
>
>  Author: trawick
>> Date: Mon May  5 14:02:48 2014
>> New Revision: 1592529
>>
>> URL: http://svn.apache.org/r1592529
>> Log:
>> mod_proxy_scgi: Support Unix sockets.
>>
>> ap_proxy_port_of_scheme(): Support default SCGI port (4000).
>>
>> Modified:
>>  httpd/httpd/trunk/CHANGES
>>  httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
>>  httpd/httpd/trunk/modules/proxy/proxy_util.c
>>
>> Modified: httpd/httpd/trunk/CHANGES
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=
>> 1592529&r1=1592528&r2=1592529&view=diff
>> 
>> ==
>> --- httpd/httpd/trunk/CHANGES [utf-8] (original)
>> +++ httpd/httpd/trunk/CHANGES [utf-8] Mon May  5 14:02:48 2014
>> @@ -1,6 +1,9 @@
>>-*- coding:
>> utf-8 -*-
>>   Changes with Apache 2.5.0
>>   +  *) mod_proxy_scgi: Support Unix sockets.  ap_proxy_port_of_scheme():
>> + Support default SCGI port (4000).  [Jeff Trawick]
>> +
>> *) mod_proxy_fcgi: Fix occasional high CPU when handling request
>> bodies.
>>[Jeff Trawick]
>>
>> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/
>> proxy/mod_proxy_scgi.c?rev=1592529&r1=1592528&r2=1592529&view=diff
>> 
>> ==
>> --- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
>> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Mon May  5 14:02:48
>> 2014
>> @@ -176,13 +176,15 @@ static int scgi_canon(request_rec *r, ch
>>   {
>>   char *host, sport[sizeof(":65535")];
>>   const char *err, *path;
>> -apr_port_t port = SCGI_DEFAULT_PORT;
>> +apr_port_t port, def_port;
>> if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
>>   return DECLINED;
>>   }
>>   url += sizeof(SCHEME); /* Keep slashes */
>>   +port = def_port = SCGI_DEFAULT_PORT;
>> +
>>   err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host,
>> &port);
>>   if (err) {
>>   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
>> @@ -190,7 +192,12 @@ static int scgi_canon(request_rec *r, ch
>>   return HTTP_BAD_REQUEST;
>>   }
>>   -apr_snprintf(sport, sizeof(sport), ":%u", port);
>> +if (port != def_port) {
>> +apr_snprintf(sport, sizeof(sport), ":%u", port);
>> +}
>> +else {
>> +sport[0] = '\0';
>> +}
>> if (ap_strchr(host, ':')) { /* if literal IPv6 address */
>>   host = apr_pstrcat(r->pool, "[", host, "]", NULL);
>>
>> Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/
>> proxy/proxy_util.c?rev=1592529&r1=1592528&r2=1592529&view=diff
>> 
>> ==
>> --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
>> +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon May  5 14:02:48 2014
>> @@ -3514,6 +3514,7 @@ static proxy_schemes_t pschemes[] =
>>   {
>>   {"fcgi", 8000},
>>   {"ajp",  AJP13_DEF_PORT},
>> +{"scgi", 4000},
>>   { NULL, 0x } /* unknown port */
>>   };
>>
>>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/


Re: svn commit: r1592529 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_scgi.c modules/proxy/proxy_util.c

2014-05-05 Thread Marion & Christophe JAILLET

Hi,

why not having SCGI_DEFAULT_PORT in a .h file, just as AJP13_DEF_PORT?
This would avoid using SCGI_DEFAULT_PORT in one place and 4000 in another.

Moreover, this could be renamed as SCGI_DEF_PORT to be consistent with AJP.

Just my 2 cents.

CJ

Le 05/05/2014 16:02, traw...@apache.org a écrit :

Author: trawick
Date: Mon May  5 14:02:48 2014
New Revision: 1592529

URL: http://svn.apache.org/r1592529
Log:
mod_proxy_scgi: Support Unix sockets.

ap_proxy_port_of_scheme(): Support default SCGI port (4000).

Modified:
 httpd/httpd/trunk/CHANGES
 httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
 httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1592529&r1=1592528&r2=1592529&view=diff
==
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon May  5 14:02:48 2014
@@ -1,6 +1,9 @@
   -*- coding: utf-8 -*-
  Changes with Apache 2.5.0
  
+  *) mod_proxy_scgi: Support Unix sockets.  ap_proxy_port_of_scheme():

+ Support default SCGI port (4000).  [Jeff Trawick]
+
*) mod_proxy_fcgi: Fix occasional high CPU when handling request bodies.
   [Jeff Trawick]
  


Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c?rev=1592529&r1=1592528&r2=1592529&view=diff
==
--- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Mon May  5 14:02:48 2014
@@ -176,13 +176,15 @@ static int scgi_canon(request_rec *r, ch
  {
  char *host, sport[sizeof(":65535")];
  const char *err, *path;
-apr_port_t port = SCGI_DEFAULT_PORT;
+apr_port_t port, def_port;
  
  if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {

  return DECLINED;
  }
  url += sizeof(SCHEME); /* Keep slashes */
  
+port = def_port = SCGI_DEFAULT_PORT;

+
  err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
  if (err) {
  ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
@@ -190,7 +192,12 @@ static int scgi_canon(request_rec *r, ch
  return HTTP_BAD_REQUEST;
  }
  
-apr_snprintf(sport, sizeof(sport), ":%u", port);

+if (port != def_port) {
+apr_snprintf(sport, sizeof(sport), ":%u", port);
+}
+else {
+sport[0] = '\0';
+}
  
  if (ap_strchr(host, ':')) { /* if literal IPv6 address */

  host = apr_pstrcat(r->pool, "[", host, "]", NULL);

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1592529&r1=1592528&r2=1592529&view=diff
==
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon May  5 14:02:48 2014
@@ -3514,6 +3514,7 @@ static proxy_schemes_t pschemes[] =
  {
  {"fcgi", 8000},
  {"ajp",  AJP13_DEF_PORT},
+{"scgi", 4000},
  { NULL, 0x } /* unknown port */
  };
  


Re: svn commit: r1583175 - /httpd/httpd/trunk/modules/mappers/mod_alias.c

2014-05-05 Thread Rainer Jung
On 05.05.2014 15:34, Eric Covener wrote:
> I don't want to churn in SVN too much, does anyone have an issue with
> dropping the context info stuff for the regex case completely?

Thanks for asking again and agreed here.

Regards,

Rainer

> On Mon, Mar 31, 2014 at 1:49 PM, Eric Covener  wrote:
>>> So you suggest to remove ap_set_context_info() from the AliasMatch handling?
>>
>> Yes, I just don't think we can pick appropriate values safely.




Re: svn commit: r1592537 - /httpd/httpd/branches/2.4.x/STATUS

2014-05-05 Thread Jeff Trawick
On Mon, May 5, 2014 at 10:14 AM,  wrote:

> Author: trawick
> Date: Mon May  5 14:14:53 2014
> New Revision: 1592537
>
> URL: http://svn.apache.org/r1592537
> Log:
> $ ./test/readbody.sh httpd scgi tcp 1 100 2>&1 | egrep '(Document
> Length|Failed requests|Requests per second)'
> Document Length:71453 bytes
> Failed requests:0
> Requests per second:9698.92 [#/sec] (mean)
> $ ./test/readbody.sh httpd scgi unix 1 100 2>&1 | egrep '(Document
> Length|Failed requests|Requests per second)'
> Document Length:71453 bytes
> Failed requests:0
> Requests per second:10140.24 [#/sec] (mean)
> $ ./test/readbody.sh nginx scgi tcp 1 100 2>&1 | egrep '(Document
> Length|Failed requests|Requests per second)'
> Document Length:71453 bytes
> Failed requests:0
> Requests per second:3900.32 [#/sec] (mean)
> $ ./test/readbody.sh nginx scgi unix 1 100 2>&1 | egrep '(Document
> Length|Failed requests|Requests per second)'
> Document Length:71453 bytes
> Failed requests:0
> Requests per second:4300.62 [#/sec] (mean)
>

BTW, if httpd and nginx doing the same sort of thing side by side is
interesting, you might have a look at
http://emptyhammock.com/projects/info/pyweb/index.html , and of course let
me know what I have screwed up or should eventually cover ;)

The stats above were from a post-big-file/echo-request-body test, which
isn't shown in the tutorial.  (If I ever get beyond trying to tweak or fix
httpd or uWSGI I'll get to coverage of something more interesting than
"hello, world".)



> Modified:
> httpd/httpd/branches/2.4.x/STATUS
>
> Modified: httpd/httpd/branches/2.4.x/STATUS
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1592537&r1=1592536&r2=1592537&view=diff
>
> ==
> --- httpd/httpd/branches/2.4.x/STATUS (original)
> +++ httpd/httpd/branches/2.4.x/STATUS Mon May  5 14:14:53 2014
> @@ -240,6 +240,10 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
>   2.4.x patch: trunk patch works modulo CHANGES
>   +1: ylavic
>
> +   * mod_proxy_scgi: Support Unix sockets
> + httpd patch: httpd://svn.apache.org/r1592529
> + 2.4.x patch: trunk patch works modulo CHANGES
> + +1: trawick
>
>  OTHER PROPOSALS
>
>
>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/


Re: svn commit: r1583175 - /httpd/httpd/trunk/modules/mappers/mod_alias.c

2014-05-05 Thread Jim Jagielski
!me.

On May 5, 2014, at 9:34 AM, Eric Covener  wrote:

> I don't want to churn in SVN too much, does anyone have an issue with
> dropping the context info stuff for the regex case completely?
> 
> On Mon, Mar 31, 2014 at 1:49 PM, Eric Covener  wrote:
>>> So you suggest to remove ap_set_context_info() from the AliasMatch handling?
>> 
>> Yes, I just don't think we can pick appropriate values safely.
> 
> 
> 
> -- 
> Eric Covener
> cove...@gmail.com
> 



Re: svn commit: r1583175 - /httpd/httpd/trunk/modules/mappers/mod_alias.c

2014-05-05 Thread Eric Covener
I don't want to churn in SVN too much, does anyone have an issue with
dropping the context info stuff for the regex case completely?

On Mon, Mar 31, 2014 at 1:49 PM, Eric Covener  wrote:
>> So you suggest to remove ap_set_context_info() from the AliasMatch handling?
>
> Yes, I just don't think we can pick appropriate values safely.



-- 
Eric Covener
cove...@gmail.com


Re: svn commit: r1591328 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c

2014-05-05 Thread Eric Covener
Trying to get my 2.4.x reviews in.

Maybe I'm misunderstanding the change, but wasn't the previous
behavior more desirable?

If the entry were within its expiry, those same headers wouldn't have
been sent to the client (well, none but the first who filled in the
cache).  Why should it act differently just because it had to
revalidated with its own conditional?

On Wed, Apr 30, 2014 at 10:58 AM,   wrote:
> Author: ylavic
> Date: Wed Apr 30 14:58:33 2014
> New Revision: 1591328
>
> URL: http://svn.apache.org/r1591328
> Log:
> mod_cache: Preserve non-cacheable headers forwarded from an origin 304
>response. PR 55547.
>
> When mod_cache asks for a revalidation of a stale entry and the origin 
> responds
> with a 304 (not that stale), the module strips the non-cacheable headers from
> the origin response and merges the stale headers to update the cache.
>
> The problem is that mod_cache won't forward the non-cacheable headers to the
> client, for example if the 304 response contains both Set-Cookie and
> 'Cache-Control: no-cache="Set-Cookie"' headers, or CacheIgnoreHeaders is used.
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/modules/cache/mod_cache.c
>
> Modified: httpd/httpd/trunk/CHANGES
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1591328&r1=1591327&r2=1591328&view=diff
> ==
> --- httpd/httpd/trunk/CHANGES [utf-8] (original)
> +++ httpd/httpd/trunk/CHANGES [utf-8] Wed Apr 30 14:58:33 2014
> @@ -1,6 +1,9 @@
>   -*- coding: utf-8 
> -*-
>  Changes with Apache 2.5.0
>
> +  *) mod_cache: Preserve non-cacheable headers forwarded from an origin 304
> +response. PR 55547. [Yann Ylavic]
> +
>*) mod_cache: Don't add cached/revalidated entity headers to a 304 
> response.
>  PR 55547. [Yann Ylavic]
>
>
> Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1591328&r1=1591327&r2=1591328&view=diff
> ==
> --- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_cache.c Wed Apr 30 14:58:33 2014
> @@ -1444,10 +1444,14 @@ static apr_status_t cache_save_filter(ap
>   * the cached headers.
>   *
>   * However, before doing that, we need to first merge in
> - * err_headers_out and we also need to strip any hop-by-hop
> - * headers that might have snuck in.
> + * err_headers_out (note that store_headers() below already selects
> + * the cacheable only headers using ap_cache_cacheable_headers_out(),
> + * here we want to keep the original headers in r->headers_out and
> + * forward all of them to the client, including non-cacheable ones).
>   */
> -r->headers_out = ap_cache_cacheable_headers_out(r);
> +r->headers_out = apr_table_overlay(r->pool, r->headers_out,
> +   r->err_headers_out);
> +apr_table_clear(r->err_headers_out);
>
>  /* Merge in our cached headers.  However, keep any updated values. */
>  /* take output, overlay on top of cached */
>
>



-- 
Eric Covener
cove...@gmail.com