No quadratic allocators (was Re: [RELEASE CANDIDATE] libapreq 1.34-RC2)

2007-05-07 Thread Joe Schaefer
Joe Schaefer [EMAIL PROTECTED] writes:

 Issac Goldstand [EMAIL PROTECTED] writes:

 The apreq developers are planning a maintenance release of
 libapreq1.  This version primarily addresses an issue noted
 with FireFox 2.0 truncating file uploads in SSL mode.

 Please give the tarball at

 http://people.apache.org/~issac/libapreq-1.34-RC2.tar.gz

 a try and report comments/problems/etc. to the apreq-dev list
 at [EMAIL PROTECTED]

 +1, tested on Debian stable i386.

Having looked over some recent literature on memory allocation
attacks, I'm changing my vote to -1.  We need to fix the 
crappy quadratic allocator in multipart_buffer_read_body.

Here's a first stab at it- completely untested (I didn't even
bother trying to compile it).  The strategy here though is to
allocate (more than) twice the amount last allocated, so the
total amount allocated will sum (as a geometric series) to
no more than 2 times the final allocation, which is O(n).

The problem with the current code is that the total amount
allocated is O(n^2), where n is basically the number of packets
received. This is entirely unsafe nowadays, so we should not bless
a new release which contains such code.

Index: c/apache_multipart_buffer.c
===
--- c/apache_multipart_buffer.c (revision 531273)
+++ c/apache_multipart_buffer.c (working copy)
@@ -273,17 +273,25 @@
 return len;
 }
 
-/*
-  XXX: this is horrible memory-usage-wise, but we only expect
-  to do this on small pieces of form data.
-*/
 char *multipart_buffer_read_body(multipart_buffer *self)
 {
 char buf[FILLUNIT], *out = ;
+size_t nalloc = 1, cur_len = 0;
 
-while(multipart_buffer_read(self, buf, sizeof(buf)))
-   out = ap_pstrcat(self-r-pool, out, buf, NULL);
+while(multipart_buffer_read(self, buf, sizeof(buf))) {
+size_t len = strlen(buf);
+if (len + cur_len + 1  nalloc) {
+char *tmp;
+nalloc = 2 * (nalloc + len + 1);
+tmp = ap_palloc(self-r-pool, nalloc);
+strcpy(tmp, out);
+out = tmp;
+}
 
+strcpy(out + cur_len, buf);
+cur_len += len;
+}
+
 #ifdef DEBUG
 ap_log_rerror(MPB_ERROR, multipart_buffer_read_body: '%s', out);
 #endif


-- 
Joe Schaefer



Re: Child pool not usable for logging

2007-05-07 Thread Sander Temme


On May 5, 2007, at 11:42 AM, Joachim Zobel wrote:


ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p_cur,
xml2_free will free %x., mem);


Stupid question: is your LogLevel set to debug?

In any case, the stderr fd gets switched to the error log file, so  
any printf() and related to stderr will land there, too.


OH. Here's your problem: see the server/log.c:444 (in trunk): if  
there is no server context, nothing gets logged for any LogLevel  
below notice.  Not sure about the rationale, except perhaps we didn't  
want to clutter up the terminal too much when the server starts.


If you must log in pool context (no server_rec to use for  
ap_log_error), just bump the level to AP_NOTICE if you want to see it.


Yes, PITA.

S.

--
[EMAIL PROTECTED]  http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



smime.p7s
Description: S/MIME cryptographic signature


Re: Child pool not usable for logging

2007-05-07 Thread Nick Kew
On Sun, 6 May 2007 21:14:39 +0200
Sander Temme [EMAIL PROTECTED] wrote:

 
 On May 5, 2007, at 11:42 AM, Joachim Zobel wrote:
 
  ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, p_cur,
  xml2_free will free %x., mem);
 
 Stupid question: is your LogLevel set to debug?

Won't help.

 In any case, the stderr fd gets switched to the error log file, so  
 any printf() and related to stderr will land there, too.
 
 OH. Here's your problem: see the server/log.c:444 (in trunk): if  
 there is no server context, nothing gets logged for any LogLevel  
 below notice.  Not sure about the rationale, except perhaps we
 didn't want to clutter up the terminal too much when the server
 starts.

I assumed the rationale is that LogLevel only exists in a server
context.  That's why mod_diagnostics uses APLOG_NOTICE, and why
mod_dumpio prints nothing at all in its default configuration.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/


Re: InterModule Communication(DSO)

2007-05-07 Thread William A. Rowe, Jr.
Graham Dumpleton wrote:
 Simplest means of setting information for a specific request which can
 then be seen by a handler implemented in a different module is by
 setting values in the 'notes' table of the request object.
 
 For something more elaborate, you may need to look at using optional
 functions that are exported by a module and can be looked up at run
 time by another module and called.
 
 For an example, look at the source for modules/ssl/ssl_engine_vars.c
 in httpd source and the optional functions it exports as:
 
APR_REGISTER_OPTIONAL_FN(ssl_is_https);
APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
APR_REGISTER_OPTIONAL_FN(ssl_ext_lookup);

This works as far as only one endpoint is being called (you are exposing
your module on an optional basis to answer questions.)

But when you want to provide multiple endpoints, you will want to create
your own module hooks.  See, for example, mod_dav.c or mod_proxy.c and
look at the _HOOK, _hook statements for how that is completely implemented.


Re: Child pool not usable for logging

2007-05-07 Thread Joachim Zobel
Hi.

Now that I understand what is happening I do undestand your post. Maybe
I should have read it more carefully.

Thx anyway,
Joachim 






Putting a web front end on an embedded device

2007-05-07 Thread Christina Dostie

Hi All:

Sorry in advance if this has been asked before, I've only been
looking at modules for a couple of weeks, but I checked
everywhere I could think of and I'm still looking for some answers.

I have a relatively high powered device on a network with a TCP
debug/status port. Users can telnet to this port, enter their credentials,
and tell the device to start spewing data at them. This particular
device outputs XML. Multiple users can connect to the device
simultaneously and each user has a different profile (list of events
they subscribe to). I'd like to put an apache web server on the network
and code up a module to create a web front end.

So far, this is what I'm thinking:
- User enters credentials, the module opens a socket to the device,
 passes along credentials, and holds the request_rec connection to
 the browser open (comet style streaming).
- Device passes back some administrative preamble and starts to stream
 data to the module, the module passes the chunks of xml to a filter
 which applies an XSLT transform to JS script chunks and the
 browser updates

If this is a plausible direction to go in, then my issue comes about when
a user wants to change their profile. On the browser, I open a 'back door'
XmlHttpRequest and send it, along with the session ID of the user. The
module must then find that session's connection to the device, signal the
module somehow, and tell it to pass the client request along to the device.

How would you guys go about coordinating the IPC here? A socket to the
device and a listening socket to listen for subscription changes on a
select?
Seems like a lot of overhead per user, plus I'd have to coordinate the
listening sockets to be on unique ports for each client, which would require
perhaps shared memory or the server pool. Perhaps shared memory and
signals? This is very MPM specific, though. It would also be nice to move
from a prefork MPM to the Event MPM to support more simultaneous users
in the future without a total overhaul.

Any input is appreciated. Thanks!

-Chris


Bug report for Apache httpd-1.3 [2007/05/06]

2007-05-07 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 8329|New|Nor|2002-04-20|mime_magic gives 500 and no error_log on Microsoft|
| 8849|New|Nor|2002-05-07|make install errors as root on NFS shares |
| 8882|New|Enh|2002-05-07|[PATCH] mod_rewrite communicates with external rew|
| 9037|New|Min|2002-05-13|Slow performance when acessing an unresolved IP ad|
| 9126|New|Blk|2002-05-15|68k-next-openstep v. 4.0  |
| 9726|New|Min|2002-06-09|Double quotes should be flagged as T_HTTP_TOKEN_ST|
| 9894|New|Maj|2002-06-16|getline sub in support progs collides with existin|
| |New|Nor|2002-06-19|Incorrect default manualdir value with layout.|
|10038|New|Min|2002-06-20|ab benchmaker hangs on 10K https URLs with keepali|
|10073|New|Maj|2002-06-20|upgrade from 1.3.24 to 1.3.26 breaks include direc|
|10166|Opn|Min|2002-06-24|HTTP/1.1 proxy requests made even when client make|
|10169|New|Nor|2002-06-24|Apache seg faults due to attempt to access out of |
|10178|New|Maj|2002-06-24|Proxy server cuts off begining of buffer when spec|
|10195|New|Nor|2002-06-24|Configure script erroneously detects system Expat |
|10199|New|Nor|2002-06-24|Configure can't handle directory names with unders|
|10243|New|Maj|2002-06-26|CGI scripts not getting POST data |
|10354|New|Nor|2002-06-30|ErrorDocument(.htaccess) fails when passed URL wit|
|10446|Opn|Blk|2002-07-03|spaces in link to http server seen as foreign char|
|10666|New|Enh|2002-07-10|line-end comment error message missing file name  |
|10744|New|Nor|2002-07-12|suexec might fail to open log file|
|10747|New|Maj|2002-07-12|ftp SIZE command and 'smart' ftp servers results i|
|10760|New|Maj|2002-07-12|empty ftp directory listings from cached ftp direc|
|10939|New|Maj|2002-07-18|directory listing errors  |
|11020|New|Maj|2002-07-21|APXS only recognise tests made by ./configure |
|11236|New|Min|2002-07-27|Possible Log exhaustion bug?  |
|11265|New|Blk|2002-07-29|mod_rewrite fails to encode special characters|
|11765|New|Nor|2002-08-16|.apaci.install.tmp installs in existing httpd.conf|
|11986|New|Nor|2002-08-23|Restart hangs when piping logs on rotation log pro|
|12096|New|Nor|2002-08-27|apxs does not handle binary dists installed at non|
|12574|New|Nor|2002-09-12|Broken images comes from mod_proxy when caching ww|
|12583|New|Nor|2002-09-12|First piped log process do not handle SIGTERM |
|12598|Opn|Maj|2002-09-12|Apache hanging in Keepalive State |
|12770|Opn|Nor|2002-09-18|ErrorDocument fail redirecting error 400  |
|13188|New|Nor|2002-10-02|does not configure correctly for hppa64-hp-hpux11.|
|13274|Ass|Nor|2002-10-04|Subsequent requests are destroyed by the request e|
|13607|Opn|Enh|2002-10-14|Catch-all enhancement for vhost_alias?|
|13687|New|Min|2002-10-16|Leave Debug symbol on Darwin  |
|13822|New|Maj|2002-10-21|Problem while running Perl modules accessing CGI::|
|14095|Opn|Nor|2002-10-30|Change default Content-Type (DefaultType) in defau|
|14250|New|Maj|2002-11-05|Alternate UserDirs don't work intermittantly  |
|14443|New|Maj|2002-11-11|Keep-Alive randomly causes TCP RSTs   |
|14448|Opn|Cri|2002-11-11|Apache WebServer not starting if installed on Comp|
|14518|Opn|Nor|2002-11-13|QUERY_STRING parts not incorporated by mod_rewrite|
|14670|New|Cri|2002-11-19|Apache didn't deallocate unused memory|
|14748|New|Nor|2002-11-21|Configure Can't find DBM on Mac OS X  |
|15011|New|Nor|2002-12-03|Apache processes not timing out on Solaris 8  |
|15028|New|Maj|2002-12-03|RedirectMatch does not escape properly|
|16013|Opn|Nor|2003-01-13|Fooling mod_autoindex + IndexIgnore   |
|16236|New|Maj|2003-01-18|Include directive in Apache is not parsed within c|
|16241|New|Maj|2003-01-19|Apache processes takes 100% CPU until killed manua|
|16492|New|Maj|2003-01-28|mod_proxy doesn't correctly retrieve values from C|

Re: Bug 41897 / Session-Stickiness with mod_proxy_balancer

2007-05-07 Thread Ruediger Pluem


On 04/06/2007 01:13 PM, Georg von Zezschwitz wrote:
 Jim Jagielski wrote:
 

 If we state that the evaluation takes place in the occurence of
 stickysession attributes
 and suggest

stickysession=Cookie:JSESSIONID stickysession=Path:;jsessionid to
 the user

 it will perform faster in average.

 As I promised to write the patch, I would do it the way Jim suggested
 it for backward
 compatibility, however I would also add a table sticky_type
 containing the Cookie vs.
 Path vs. Env-prefix (in a parsed way) to the balancer struct.

 Is this OK for everybody?


 Patch for trunk...
 
 
 Hi,
 
 attached is the patch for trunk with documentation  Co.
 
 Could anybody review it  commit?

Many thanks for sending the patch and my apologies that reviewing it took
that long. Please find my comments below.

Regards

Rüdiger

Throughout the code there are a number of code style issues that should
be fixed. Most of them are related to missing spaces before or after
assignments or operators. I do not mention them explicitly in my review
later. Please have a look at http://httpd.apache.org/dev/styleguide.html.

Index: docs/manual/mod/mod_proxy.xml
===
--- docs/manual/mod/mod_proxy.xml   (revision 526077)
+++ docs/manual/mod/mod_proxy.xml   (working copy)
@@ -707,9 +707,19 @@
 /td/tr
 trtdstickysession/td
 td-/td
-tdBalancer sticky session name. The value is usually set to something
-like codeJSESSIONID/code or codePHPSESSIONID/code,
-and it depends on the backend application server that support sessions.
+tdBalancer sticky session name. Multiple definitions are possible and
+are interpreted in the sequence of their definition. The
+value can be preceeded with a specification codeCookie/code,
+codePath/code or codeEnv/code to restrict the search.
+Without this specification, the identifier is searched in the URL path
+and then in the cookie. The value is usually set to something
+like codeJSESSIONID/code or codePHPSESSIONID/code, e.g.
+br/indent
+codestickysession=Cookie:JSESSIONID
+  stickysession=Path:;jsessionid/code
+/indent
+for Java Servlets and depends on the backend application server
+that support sessions.

I think the examples should be split into two separate sentences: One for the
simple case (no specification) for which PHPSESSIONID is a good example and
one for the more complex case (two settings with different specifications) for
which Java Servlets are a good example.

Index: modules/proxy/mod_proxy_balancer.c
===
--- modules/proxy/mod_proxy_balancer.c  (revision 526077)
+++ modules/proxy/mod_proxy_balancer.c  (working copy)
@@ -581,6 +605,30 @@
 }
 }

+static void print_balancer_sticky(request_rec *r,
+  apr_array_header_t *sticky)
+{
+int i;
+struct proxy_sticky_entry *entries;
+
+if (sticky==NULL)
+return;
+entries = (struct proxy_sticky_entry *) sticky-elts;
+for (i = 0; i  sticky-nelts; i++) {
+ if (i0)
+ ap_rputs ( , r);
+ switch (entries[i].method) {
+ case PROXY_STICKY_COOKIE:
+ ap_rputs (Cookie:, r); break;
+ case PROXY_STICKY_PATH:
+ ap_rputs (Path:, r); break;
+ case PROXY_STICKY_ENV:
+ ap_rputs (Env:, r); break;

Style

+ }
+ ap_rputs (entries[i].name, r);
+}
+}
+
 /* Manages the loadfactors and member status
  */
 static int balancer_handler(request_rec *r)
@@ -645,10 +693,30 @@
 if (bsel) {
 const char *val;
 if ((val = apr_table_get(params, ss))) {
-if (strlen(val))
-bsel-sticky = apr_pstrdup(conf-pool, val);
-else
-bsel-sticky = NULL;
+char *tok_cntx;
+bsel-sticky = apr_array_make(conf-pool, 1,
+  sizeof (struct proxy_sticky_entry));
+char *v = apr_strtok(apr_pstrdup(r-pool, val), +, tok_cntx);

This is not allowed in ANSI C: Declarations of variables need to be at the
beginning of a block. Better use ap_strchr here.

+while (v!=NULL) {
+struct proxy_sticky_entry * entry =
+   (struct proxy_sticky_entry *) apr_array_push(bsel-sticky);
+const char *colon_pos = strchr (v, ':');
+entry-method = PROXY_STICKY_COOKIE | PROXY_STICKY_PATH;
+if (colon_pos!=NULL) {
+while (*++colon_pos==' ')
+continue;
+entry-name = apr_pstrdup(conf-pool, colon_pos);
+if (!strncasecmp (cookie:, v, 7))
+entry-method = PROXY_STICKY_COOKIE;
+else if (!strncasecmp (path:, v, 5))

Putting a web front end on an embedded device

2007-05-07 Thread Christina Dostie

Hi All:

Sorry in advance if this has been asked before, I've only been looking at
modules for a couple
of weeks, but I checked everywhere I could think of and I'm still looking
for some answers.

I have a relatively high powered device on a network with a TCP debug/status
port. Users can telnet to
this port, enter their credentials, and tell the device to start spewing
data at them. This particular device
outputs XML. Multiple users can connect to the device simultaneously and
each user has a different
profile (list of events they subscribe to). Naturally, I'd like to put an
apache web server on the network
so I can support a web front end. So far, this is what I'm thinking:

- User enters credentials, the module opens a socket to the device, passes
along credentials, and
 holds the request_rec connection to the browser open (comet style
streaming).
- Device passes back some administrative preamble and starts to stream data
to the module
- the module passes the chunks of xml to a filter which applies an XSLT
transform to
 JS script chunks and the browser updates

If this is a plausible direction to go in, then my issue comes about when a
user wants to change
their profile. On the browser, I open a 'back door' XmlHttpRequest and send
it, along with the
session ID of the user. The module must then find the session's connection
to the device, signal
the module somehow, and tell it to pass the client request along to the
device.

How would you guys go about coordinating the IPC here? A socket to the
device and a listening
socket to listen for subscription changes on a select? Seems like a lot of
overhead per user, plus
I'd have to coordinate the listening sockets to be on unique ports for each
client, which would require
perhaps shared memory or the server pool. Perhaps shared memory and signals?
This is very MPM
specific, though. It would also be nice to move from a prefork MPM to the
event MPM to support
more simultaneous users in the future without a total overhaul.

Any input is appreciated. Thanks!

-Chris


trunk veto; ProxyPassInterpolateEnv

2007-05-07 Thread William A. Rowe, Jr.
Nick,

I'm moving from from a -.9 to a -1 of trunk on this because altering
the semantics of ALL of the existing ProxyPass[Reverse] directives in
one misplaced or poorly understood directive seems highly hazardous.

On any server with more than one administrator, this can be very toxic
and cause all sorts of ill will as Joe turns on the directive, breaking
James' mappings.  Similar issues occur when ProxyPass directives are
scattered throughout many .conf'lets.

Can this please be reverted, and replace if you like with a second set
of unambiguous ProxyPassEnv[Reverse|CookieDomain|CookiePath] directives
which triggers honoring the env var interpolation on a per-mapping basis?

My suggestion is to simply add a boolean to the stored ProxyPass entries
which is set for ProxyPassEnv* and otherwise left unset.  The existing
ProxyPass* becomes conditional on the per-entry boolean instead of a global
setting.

Thanks,

Bill



* mod_proxy: Support variable interpolation in reverse proxy configuration
  http://svn.apache.org/viewvc?view=revrevision=421686  (code)
  http://svn.apache.org/viewvc?view=revrevision=422178  (code)

http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml?r1=420990r2=421725
(docs)
  +1: niq, mturk
  -.9: wrowe notes; modifying the existing syntax seems inappropriate, new
   ProxyPassSubstitute or similarly named directives would seem to
   make more sense, permit direct Reverse'als when appropriate and
   restrict the Substitutions to be parsed only when required.



Re: [PATCH] mod_wombat: add table_get and table_set

2007-05-07 Thread Akins, Brian
On 5/4/07 7:42 PM, Rici Lake [EMAIL PROTECTED] wrote:


 In Lua, setting to nil is equivalent to deletion. So I think this should be:
 
   if (lua_isnoneornil(L, 3)
 apr_table_unset(t, key);
   else {
 const char *val = luaL_checkstring(L, 3);
 apr_table_set(t, key, val);
   }

+1


   if (val == NULL)
 lua_pushnil(L);
   else
 lua_pushstring(L, val);
 

+1

 Agreed. Also, it's misleading -- they are APR tables, not Lua tables.

Brian M. changed this before committing, I think.

 

 This is poor Lua style. You shouldn't assume (or require) the stack to
 be empty at the start of the function. Use top-relative (negative) indices
 instead -- they are no slower.

Until a day before I submitted patch, I had never touched Lua, so I'm sure I
have bad style and form :)

 Also use lua_{get,set}field for clarity, and luaL_register (luaL_openlib
 is deprecated).

I had been using the PiL 5.0 for docs and lua-users.org was down most of
last week.  I got hard copy of 5.1 PiL this weekend, so maybe my style will
improve ;)

Thanks for all the pointers.  I think mod_wombat is almost in a state where
I can start actually working on the original problem I needed to solve.

Question:  what would be the best way to load other modules to mod_wombat
(not apache modules). For example, I want/need to load the lua pcre stuff,
but I don't want to write a new apache module just to hook that into
mod_wombat.  I am new to Lua, so I am sure there is a better way.  Can ping
me off list if this seems OT for httpd-dev



-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies


CHANGES file for 1.3 and 2.x

2007-05-07 Thread Jim Jagielski

Seems to me that the more we work on the various 2.x trees
(2.0.x, 2.2.x and trunk), the harder it becomes to get
the various correct CHANGES entries in sync... For example,
the CHANGES for 2.2 and trunk just refer to changes up
to 2.0.56... What's the best way of syncing these? Should
we stop having a single CHANGES that tries to merge all
development together? Why not have something like:

  o Apache 1.3.x: CHANGES stay as is
  o Apache 2.0.x: CHANGES just incorporates 2.0.x work
  and we can either URL refer to older changes
  at the bottom of the file or, when we release,
  merge them.
  o Apache 2.2.x: CHANGES just notes 2.2.x work and we
  either refer to 2.0.x CHANGES and 1.3.x CHANGES
  or auto-merge when we release.
  o : Same pattern...

Comments? Ideas?



Re: Bug 41897 / Session-Stickiness with mod_proxy_balancer

2007-05-07 Thread Mladen Turk

Ruediger Pluem wrote:


On 04/06/2007 01:13 PM, Georg von Zezschwitz wrote:

Jim Jagielski wrote:


attached is the patch for trunk with documentation  Co.

Could anybody review it  commit?


Many thanks for sending the patch and my apologies that reviewing it took
that long. Please find my comments below.




I think we could use a simple two use case situation.
To be able to backport that to the 2.2 branch I propose
a following patch.

It adds additional struct member sticky_path that is
set to the sticky so if someone has in the config

... stickysession=JSESSIONID ... both sticky and
sticky_path will be the same.
However if there is a stickysession with
... stickysession=JSESSIONID|;jsessionid ...
will make w-sticky=JSESSIONID and w-sticky_path=;jsessionid

I'm not aware of any other way without introducing additional
directives that could be backported to 2.2

The question is, is that backportable as well?
If it is, I'll put that for a vote in STATUS.

Regards,
Mladen.



sticky_session.patch.txt
Description: application/octet-string


Re: CHANGES file for 1.3 and 2.x

2007-05-07 Thread Ruediger Pluem


On 05/07/2007 05:38 PM, Jim Jagielski wrote:
 Seems to me that the more we work on the various 2.x trees
 (2.0.x, 2.2.x and trunk), the harder it becomes to get
 the various correct CHANGES entries in sync... For example,
 the CHANGES for 2.2 and trunk just refer to changes up
 to 2.0.56... What's the best way of syncing these? Should
 we stop having a single CHANGES that tries to merge all
 development together? Why not have something like:
 
   o Apache 1.3.x: CHANGES stay as is
   o Apache 2.0.x: CHANGES just incorporates 2.0.x work
   and we can either URL refer to older changes
   at the bottom of the file or, when we release,
   merge them.
   o Apache 2.2.x: CHANGES just notes 2.2.x work and we
   either refer to 2.0.x CHANGES and 1.3.x CHANGES
   or auto-merge when we release.
   o : Same pattern...
 
 Comments? Ideas?
 
 

I do not think that we need to merge the files. Having pointers to
the other files seems to be sufficient for me.
This still leaves the task of syncing the CHANGES files of the stable
branches with that of the trunk which still leaves enough room for getting
out of sync. So having some sort of auto-merge here would be cool.


Regards

Rüdiger


PATCH: mod_wombat: add default scope and cache to config

2007-05-07 Thread Akins, Brian
This patch adds:
LuaDefaultCacheStyle
and
LuaDefaultScope 

To set defaults for these.  The code needs to be change around so that we
check dir_config first, and then revert to default.


-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies



default-config.diff
Description: Binary data


[Solved] Child pool not usable for logging

2007-05-07 Thread Joachim Zobel
Am Sonntag, den 06.05.2007, 14:25 +0530 schrieb Saju Pillai:
 err - asking obvious question but .. Your LogLevel is set to debug right ?

You were pretty close. According to nicks book (bottom of p. 324),
ap_log_perror does not have access to the server_rec and therefor can
not know the log level.

Sincerely,
Joachim 




Re: Bug 41897 / Session-Stickiness with mod_proxy_balancer

2007-05-07 Thread Ruediger Pluem


On 05/07/2007 05:56 PM, Mladen Turk wrote:

 
 I think we could use a simple two use case situation.
 To be able to backport that to the 2.2 branch I propose
 a following patch.
 
 It adds additional struct member sticky_path that is
 set to the sticky so if someone has in the config
 
 ... stickysession=JSESSIONID ... both sticky and
 sticky_path will be the same.
 However if there is a stickysession with
 ... stickysession=JSESSIONID|;jsessionid ...
 will make w-sticky=JSESSIONID and w-sticky_path=;jsessionid
 
 I'm not aware of any other way without introducing additional
 directives that could be backported to 2.2
 
 The question is, is that backportable as well?

I think this is backportable in general if we do a minor bump (which
is possible for backports). Currently I see the following problems
with the patch which seem to be solvable:

1. Documentation.
   We definitely need a patch for the documentation that describes how
   to handle the servlet case with the above patch. Otherwise people keep
   falling into the pit.

2. Apart from route search balancer-sticky is used in several additional
   locations for

   - Status pages (mod_status hook, loadbalancer manager)
   - Some notes / environment variables are set to balancer-sticky which is
 wrong if balancer-sticky_path was used to find the actual route.
 Furthermore it might be worth adding an additional environment variable
 (e.g. BALANCER_SESSION_STICKY_TYPE) that indicates whether
 BALANCER_SESSION_STICKY contains balancer-sticky or balancer-sticky_path.

   Adjusting sessionstickyness via the loadbalancer manager might not be needed 
as this
   currently does not work anyway since the balancer configuration is not 
stored in shared
   memory (Maybe we should turn off the possibility to change the balancer 
configuration via
   the manager until this is fixed as this can lead to weird results with 
different
   processes using different configurations).

3. The minor bump is missing which is needed due to the change of the struct.

4. I am confused by the following part of the patch :-):

+balancer-sticky = balancer-sticky_path = apr_pstrdup(p, val);
+if ((path = strchr(balancer-sticky, '|'))) {
+*path++ = '\0';
+balancer-sticky_path = path;
+}
+else
+balancer-sticky_path = balancer-sticky;

Why setting balancer-sticky_path twice in both cases (string with or without |)


Regards

Rüdiger




PATCH: mod_wombat fix finfo leak in vmprep.c load_file

2007-05-07 Thread Akins, Brian
Was always allocating finfo from a pool.  Now just do it on stack.


-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies



finfo-leak.diff
Description: Binary data


Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread Mario Brandt
Hello,
I've tested apache_2.2.4-win32-x86-openssl-0.9.8d.msi under Longhorn Beta 3
(VMware). Only thing that I changed from the default windows setup, was that
I turned off the firewall to test it from my network.

After installation I got an error message Process successfull executed. I
got that message also after rebooting windows. But Apache works fine! I
hadn't time to test that with PHP yet.

regards
Mario Brandt  


Re: [Solved] Child pool not usable for logging

2007-05-07 Thread Sander Temme


On May 7, 2007, at 11:38 AM, Joachim Zobel wrote:


Am Sonntag, den 06.05.2007, 14:25 +0530 schrieb Saju Pillai:
err - asking obvious question but .. Your LogLevel is set to debug  
right ?


You were pretty close. According to nicks book (bottom of p. 324),
ap_log_perror does not have access to the server_rec and therefor can
not know the log level.


It's not really up to the function invocation: they all wrap around a  
core function (to which I pointed in my other post) which does not  
log for the more granular qualifiers.


S.

--
[EMAIL PROTECTED]  http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



smime.p7s
Description: S/MIME cryptographic signature


Re: trunk veto; ProxyPassInterpolateEnv

2007-05-07 Thread Nick Kew
On Mon, 07 May 2007 09:15:09 -0500
William A. Rowe, Jr. [EMAIL PROTECTED] wrote:

 Nick,
 
 I'm moving from from a -.9 to a -1 of trunk on this because altering
 the semantics of ALL of the existing ProxyPass[Reverse] directives in
 one misplaced or poorly understood directive seems highly hazardous.
 
 On any server with more than one administrator, this can be very toxic
 and cause all sorts of ill will as Joe turns on the directive,
 breaking James' mappings.  Similar issues occur when ProxyPass
 directives are scattered throughout many .conf'lets.

The likelihood of anything breaking in an existing config seems
negligible, as the syntax for variable interpolation won't figure
in a literal URL-matching pattern (the syntax is ${var}).
AFAICS it would be perfectly safe to enable interpolation
automatically, without a directive.  The reason for doing so is
performance: enabling interpolation incurs an overhead of making
per-request copies of configuration stuff.

 Can this please be reverted, and replace if you like with a second set
 of unambiguous ProxyPassEnv[Reverse|CookieDomain|CookiePath]
 directives which triggers honoring the env var interpolation on a
 per-mapping basis?

That's a lot of extra complexity.  A little in the code and
configuration, but a lot in the documentation.  The sheer length
of some of our documents (including the proxy's) is already a
hurdle for users getting to grips with it.

Any chance you could outline an example to explain how my patch
would break something?

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/


Re: Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread yacsha
what?
- Original Message - 
From: Mario Brandt [EMAIL PROTECTED]
To: dev@httpd.apache.org
Sent: Tuesday, May 08, 2007 3:47 AM
Subject: Apache 2.2.4 under Win32 Longhorn


 Hello,
 I've tested apache_2.2.4-win32-x86-openssl-0.9.8d.msi under Longhorn Beta 3
 (VMware). Only thing that I changed from the default windows setup, was that
 I turned off the firewall to test it from my network.
 
 After installation I got an error message Process successfull executed. I
 got that message also after rebooting windows. But Apache works fine! I
 hadn't time to test that with PHP yet.
 
 regards
 Mario Brandt

Re: Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread William A. Rowe, Jr.
yacsha wrote:
 what?

I think Mario's post below is quite clear.  I am wondering, however,
*where* he sees the error message he cites.  A log?  A popup command
window?  An ok box?  Is there additional details (a window caption or
other details?)  Does it continue to happen on each reboot?

But glad to hear this works just fine - it implies we are not far from
working also on Vista, Longhorn's 'end user workstation' cousin.

 - Original Message - 
 From: Mario Brandt [EMAIL PROTECTED]
 To: dev@httpd.apache.org
 Sent: Tuesday, May 08, 2007 3:47 AM
 Subject: Apache 2.2.4 under Win32 Longhorn
 
 
 Hello,
 I've tested apache_2.2.4-win32-x86-openssl-0.9.8d.msi under Longhorn Beta 3
 (VMware). Only thing that I changed from the default windows setup, was that
 I turned off the firewall to test it from my network.

 After installation I got an error message Process successfull executed. I
 got that message also after rebooting windows. But Apache works fine! I
 hadn't time to test that with PHP yet.

 regards
 Mario Brandt



Re: Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread Mladen Turk

William A. Rowe, Jr. wrote:

yacsha wrote:

what?


I think Mario's post below is quite clear.  I am wondering, however,
*where* he sees the error message he cites.  A log?  A popup command
window?  An ok box?  Is there additional details (a window caption or
other details?)  Does it continue to happen on each reboot?

But glad to hear this works just fine - it implies we are not far from
working also on Vista, Longhorn's 'end user workstation' cousin.



Just tracking the Vista problems down.
One problem is the installer. Every awk config rewrite fails
so the installation ends up without config files.
Didn't try with Administrator account directly, but with the
member of the administrators group.

The problem described is probably related to ApacheMonitor,
and I'm still debugging why it fails.
Hope I'll have some answers in few days.

Regards,
Mladen.



Re: Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread William A. Rowe, Jr.
Mladen Turk wrote:
 
 Just tracking the Vista problems down.
 One problem is the installer. Every awk config rewrite fails
 so the installation ends up without config files.
 Didn't try with Administrator account directly, but with the
 member of the administrators group.

I'll look as soon as my Longhorn beta is up and running, I'm betting
that this is all related to the permissions and 'no documents in the
application tree' ruleset.  I can't imagine awk's posix fopen/fwrite
code is broken by vista.


Re: Apache 2.2.4 under Win32 Longhorn

2007-05-07 Thread Mladen Turk

William A. Rowe, Jr. wrote:

Mladen Turk wrote:

Just tracking the Vista problems down.
One problem is the installer. Every awk config rewrite fails
so the installation ends up without config files.
Didn't try with Administrator account directly, but with the
member of the administrators group.


I'll look as soon as my Longhorn beta is up and running, I'm betting
that this is all related to the permissions and 'no documents in the
application tree' ruleset.


Right, once when I added 'Full Control' to the 'Program Files'
for Users group, the installer works.
... and with the latest patch ApacheMonitor works as well :)

Regards,
Mladen.