Re: Unhappy interactions between AIX, apxs, instdso.sh, apr/build-1/libtool and php
Well, my patch is at the end, leaving the rm in place. However, I could examine looking at using slibclean (shared library clean) - which is the program to remove outstanding (loaded, but not active) shared library code. And - thinking through - if the remove is not done, and the .so file is not copied - the old .so copy remains - but you expect it to be updated. For these cases, rather than remove I would move the file to a dated pid (mv $TARGET $TARGET.$today.$$) - and if all fails move it back, otherwise remove (and slibclean again, for certainty). I have been quite perturbed in the past when I was installing live and it failed. My previous installed php was now broken. re: slibclean - the program has been around forever - at least since since AIX 4.X (starting in 1994-1995). No idea if it has been tested before for php and/or instdso.sh. However, to work, slibclean still needs the previous version to be stopped. I assume that is the same as unlink() of a file - the inode is not actually cleared until both the link count is 0 and there are no open connections to the inode. That is, I do not expect that slibclean is removing open routines - but it might. Finally, In my case, as I am packaging to a temp directory (installing to $INSTALL_ROOT/*) this should never be an issue. The other issue I run into is the -a argument - because when packaging ( On Sun, May 4, 2014 at 11:54 PM, Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu wrote: On May 4, 2014, at 5:46 PM, Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu wrote: My only comment to that would be: has AIX resolved the issue wherein it is required that the file backing a previously-loaded module has to be rm’d, in order to ensure that the in-memory copy is released? Responding to myself, after a quick consult with the Googlemonster: Seems you need to call a utility called slibclean, to remove the memory references to the shared object. And, sometimes, that still doesn’t work - so you have to rm it anyway. :/ Anyhoo - it seems to me that the real problem is that we’re deleting the newly generated .so, rather than the *target* into which we’re trying to copy (which is what would be what has the in-memory references). Best, Victor -- Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu
Re: Unhappy interactions between AIX, apxs, instdso.sh, apr/build-1/libtool and php
I see I did not read far enough - as you found the reference to slibclean. In it's defense I expect the IBM install program is using slibclean during it's installation of files - or, the files are being moved to something like /usr/lpp/lpp.name/save (it has been a long long time since I have studied how the installp recover option works) and the remove is only actually performed after the new files have been put into position. On Mon, May 5, 2014 at 8:14 AM, Michael Felt mamf...@gmail.com wrote: Well, my patch is at the end, leaving the rm in place. However, I could examine looking at using slibclean (shared library clean) - which is the program to remove outstanding (loaded, but not active) shared library code. And - thinking through - if the remove is not done, and the .so file is not copied - the old .so copy remains - but you expect it to be updated. For these cases, rather than remove I would move the file to a dated pid (mv $TARGET $TARGET.$today.$$) - and if all fails move it back, otherwise remove (and slibclean again, for certainty). I have been quite perturbed in the past when I was installing live and it failed. My previous installed php was now broken. re: slibclean - the program has been around forever - at least since since AIX 4.X (starting in 1994-1995). No idea if it has been tested before for php and/or instdso.sh. However, to work, slibclean still needs the previous version to be stopped. I assume that is the same as unlink() of a file - the inode is not actually cleared until both the link count is 0 and there are no open connections to the inode. That is, I do not expect that slibclean is removing open routines - but it might. Finally, In my case, as I am packaging to a temp directory (installing to $INSTALL_ROOT/*) this should never be an issue. The other issue I run into is the -a argument - because when packaging ( On Sun, May 4, 2014 at 11:54 PM, Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu wrote: On May 4, 2014, at 5:46 PM, Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu wrote: My only comment to that would be: has AIX resolved the issue wherein it is required that the file backing a previously-loaded module has to be rm’d, in order to ensure that the in-memory copy is released? Responding to myself, after a quick consult with the Googlemonster: Seems you need to call a utility called slibclean, to remove the memory references to the shared object. And, sometimes, that still doesn’t work - so you have to rm it anyway. :/ Anyhoo - it seems to me that the real problem is that we’re deleting the newly generated .so, rather than the *target* into which we’re trying to copy (which is what would be what has the in-memory references). Best, Victor -- Victor J. Orlikowski victor.j.orlikow...@alumni.duke.edu
Re: svn commit: r1591328 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c
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, yla...@apache.org 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=1591328r1=1591327r2=1591328view=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=1591328r1=1591327r2=1591328view=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
Re: svn commit: r1583175 - /httpd/httpd/trunk/modules/mappers/mod_alias.c
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 cove...@gmail.com 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
!me. On May 5, 2014, at 9:34 AM, Eric Covener cove...@gmail.com 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 cove...@gmail.com 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: r1592537 - /httpd/httpd/branches/2.4.x/STATUS
On Mon, May 5, 2014 at 10:14 AM, traw...@apache.org 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 21 | 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 21 | 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 21 | 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 21 | 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=1592537r1=1592536r2=1592537view=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
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 cove...@gmail.com 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: r1592529 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_scgi.c modules/proxy/proxy_util.c
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=1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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
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= 1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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
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=1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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=1592529r1=1592528r2=1592529view=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: r1592615 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_scgi.c proxy_util.c scgi.h
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=1592615view=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 */
[patch] regexp rewrite map
[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
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=1592615view=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/