Re: AW: mod_proxy_balancer

2007-09-11 Thread Plüm , Rüdiger , VF-Group
Thanks for testing. The attached patch cleanly applies to 2.2.x and also
contains a backport of r527937.

Regards

Rüdiger

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] 
 Auftrag von Vinicius Petrucci
 Gesendet: Dienstag, 11. September 2007 03:11
 An: dev@httpd.apache.org
 Betreff: Re: AW: mod_proxy_balancer
 
 
 What do I have to do to work in 2.2.6? Too much changes in r572937?
 
 On 10/09/2007, Vinicius Petrucci [EMAIL PROTECTED] wrote:
  Hi Rüdiger,
 
  I've tested the 2nd. It works fine. :)
 
  best,
  Vinicius
 
  On 10/09/2007, Ruediger Pluem [EMAIL PROTECTED] wrote:
  
  
   On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
I've tried the 1st patch (which is simpler and nicer) 
 in httpd-trunk
and now It seems to work... :)
  
   Thanks for testing, but can you please also test the 2nd patch?
   Only the 2nd patch is backportable and I would like to 
 see this fixed in 2.2.x too.
  
   Regards
  
   Rüdiger
  
  
 
 
  --
  Vinicius Tavares Petrucci
  home page: http://www.ic.uff.br/~vpetrucci
 
 
 
 -- 
 Vinicius Tavares Petrucci
 home page: http://www.ic.uff.br/~vpetrucci
 


worker_init_patch_plus_r572937_2.2.x.diff
Description: worker_init_patch_plus_r572937_2.2.x.diff


Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread Joe Orton
On Mon, Sep 10, 2007 at 09:47:24PM +0200, Ruediger Pluem wrote:
 On 09/10/2007 08:40 AM, Plüm wrote:
  That was the goal of my diagnostic patch: Finding out if we have a pool
  issue. Looks like we have. I guess the right fix is as you say 
  to use the parent pool (process scope).
 
 Not 100% sure regarding the correct pool, but would that be the correct fix

That's not really thread-safe, and it ought to be, though we might get 
away with it since it's called during startup.  But rather than guessing 
pools, actually caching the stuff once at startup is probably cleanest, 
e.g.:

Index: ssl_private.h
===
--- ssl_private.h   (revision 574523)
+++ ssl_private.h   (working copy)
@@ -680,7 +680,7 @@
 void ssl_log_ssl_error(const char *, int, int, server_rec *);
 
 /**  Variables  */
-void ssl_var_register(void);
+void ssl_var_register(apr_pool_t *p);
 char*ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, 
request_rec *, char *);
 apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer, const 
char *extension);
 
Index: ssl_engine_vars.c
===
--- ssl_engine_vars.c   (revision 574523)
+++ ssl_engine_vars.c   (working copy)
@@ -58,12 +58,32 @@
 return sslconn  sslconn-ssl;
 }
 
-void ssl_var_register(void)
+static const char var_interface[] = mod_ssl/ MOD_SSL_VERSION;
+static char var_library_interface[] = SSL_LIBRARY_TEXT;
+static char *var_library = NULL;
+
+void ssl_var_register(apr_pool_t *p)
 {
+char *cp, *cp2;
+
 APR_REGISTER_OPTIONAL_FN(ssl_is_https);
 APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
 APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
-return;
+
+/* Perform once-per-process library version determination: */
+var_library = apr_pstrdup(p, SSL_LIBRARY_DYNTEXT);
+
+if ((cp = strchr(var_library, ' ')) != NULL) {
+*cp = '/';
+if ((cp2 = strchr(cp, ' ')) != NULL)
+*cp2 = NUL;
+}
+
+if ((cp = strchr(var_library_interface, ' ')) != NULL) {
+*cp = '/';
+if ((cp2 = strchr(cp, ' ')) != NULL)
+*cp2 = NUL;
+}
 }
 
 /* This function must remain safe to use for a non-SSL connection. */
@@ -635,34 +655,16 @@
 
 static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var)
 {
-static const char interface[] = mod_ssl/ MOD_SSL_VERSION;
-static char library_interface[] = SSL_LIBRARY_TEXT;
-static char *library = NULL;
 char *result;
   
-if (!library) {
-char *cp, *cp2;
-library = apr_pstrdup(p, SSL_LIBRARY_DYNTEXT);
-if ((cp = strchr(library, ' ')) != NULL) {
-*cp = '/';
-if ((cp2 = strchr(cp, ' ')) != NULL)
-*cp2 = NUL;
-}
-if ((cp = strchr(library_interface, ' ')) != NULL) {
-*cp = '/';
-if ((cp2 = strchr(cp, ' ')) != NULL)
-*cp2 = NUL;
-}
-}
-
 if (strEQ(var, INTERFACE)) {
-result = apr_pstrdup(p, interface);
+result = apr_pstrdup(p, var_interface);
 }
 else if (strEQ(var, LIBRARY_INTERFACE)) {
-result = apr_pstrdup(p, library_interface);
+result = apr_pstrdup(p, var_library_interface);
 }
 else if (strEQ(var, LIBRARY)) {
-result = apr_pstrdup(p, library);
+result = apr_pstrdup(p, var_library);
 }
 else {
 result = NULL;
Index: mod_ssl.c
===
--- mod_ssl.c   (revision 574523)
+++ mod_ssl.c   (working copy)
@@ -482,7 +482,7 @@
 ap_hook_insert_filter (ssl_hook_Insert_Filter, NULL,NULL, APR_HOOK_MIDDLE);
 /*ap_hook_handler   (ssl_hook_Upgrade,   NULL,NULL, 
APR_HOOK_MIDDLE); */
 
-ssl_var_register();
+ssl_var_register(p);
 
 APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
 APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);


Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread Plüm , Rüdiger , VF-Group
 -Ursprüngliche Nachricht-
 Von: Joe Orton  
 Gesendet: Dienstag, 11. September 2007 11:35
 An: dev@httpd.apache.org
 Betreff: Re: AW: SSL_VERSION_LIBRARY
 
 
 On Mon, Sep 10, 2007 at 09:47:24PM +0200, Ruediger Pluem wrote:
  On 09/10/2007 08:40 AM, Plüm wrote:
   That was the goal of my diagnostic patch: Finding out if 
 we have a pool
   issue. Looks like we have. I guess the right fix is as you say 
   to use the parent pool (process scope).
  
  Not 100% sure regarding the correct pool, but would that be 
 the correct fix
 
 That's not really thread-safe, and it ought to be, though we 
 might get 
 away with it since it's called during startup.  But rather 
 than guessing 
 pools, actually caching the stuff once at startup is probably 
 cleanest, 
 e.g.:

Looks good for me. Thanks for working this out. I assume the pool given
to ssl_register_hooks is a very long living pool that lasts as long as 
the process lives.
Mind to attach this patch to PR43334 
(https://issues.apache.org/bugzilla/show_bug.cgi?id=43334)?

Regards

Rüdiger



Re: Want to kill Apache process when its parent process gets killed.

2007-09-11 Thread Jeff Trawick
On 9/10/07, Ashwani Kumar Sharma [EMAIL PROTECTED] wrote:

 In my application I am spawning httpd.exe from the parent process.
...
 My requirement is that:
...
 In the Abnormal termination of the parent process. The Apache should keep
 looking for its parent process. If the parent process is not present

then the Apache web server should also kill itself.
 How can I implement the 2nd point?

not even a half-baked idea:

Somebody gets the monitor hook called from the Windows MPM (i.e.,
fixes Apache on Windows to call a hook that is provided on
Unix/Linux).

   General idea (mpm_winnt.c)

/* Wait for shutdown or restart events or for child death */
winnt_mpm_state = AP_MPMQ_RUNNING;
do {
rv = WaitForMultipleObjects(NUM_WAIT_HANDLES, (HANDLE *)
event_handles, FALSE, something-that-means-one-second);
   if (rv == WAIT_TIMEOUT) {
ap_run_monitor(pconf);
   }
} while (rv == WAIT_TIMEOUT);

(remove existing check for WAIT_TIMEOUT that considers it a fatal error)

Your application starts httpd.exe with a define like

   -DMOD_FOO_MONITORED_PID=13579

and a config that loads a custom plug-in module provided by you which
implements the monitor hook that checks for when that pid goes away.

???How to make the monitor hook take down httpd?  apache -k stop???


RE: Want to kill Apache process when its parent process gets killed.

2007-09-11 Thread Ashwani Kumar Sharma
Hi Jeff,

Thanks for your reply. 

The httpd.exe of Apache web server has two processes running in windows.
When we kill the parent httpd.exe the child httpd.exe is still running and
listening to the web request. I don't want this.

I want to modify this in such a way that if I kill the parent httpd.exe
through following code, the child process should also get killed. How is it
possible? Please guide me. It's very urgent.

hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
if (hProcess == NULL) return FALSE;
dwError = ERROR_SUCCESS;
if (!TerminateProcess(hProcess, (DWORD)-1))
dwError = GetLastError();


where pid is the parent process id.



Thanks and Regards,
Ashwani Sharma
Mob: 09916454843
Off: +91-80-26265053


-Original Message-
From: Jeff Trawick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 4:15 PM
To: dev@httpd.apache.org
Subject: Re: Want to kill Apache process when its parent process gets killed.

On 9/10/07, Ashwani Kumar Sharma [EMAIL PROTECTED] wrote:

 In my application I am spawning httpd.exe from the parent process.
...
 My requirement is that:
...
 In the Abnormal termination of the parent process. The Apache should keep
 looking for its parent process. If the parent process is not present

then the Apache web server should also kill itself.
 How can I implement the 2nd point?

not even a half-baked idea:

Somebody gets the monitor hook called from the Windows MPM (i.e.,
fixes Apache on Windows to call a hook that is provided on
Unix/Linux).

   General idea (mpm_winnt.c)

/* Wait for shutdown or restart events or for child death */
winnt_mpm_state = AP_MPMQ_RUNNING;
do {
rv = WaitForMultipleObjects(NUM_WAIT_HANDLES, (HANDLE *)
event_handles, FALSE, something-that-means-one-second);
   if (rv == WAIT_TIMEOUT) {
ap_run_monitor(pconf);
   }
} while (rv == WAIT_TIMEOUT);

(remove existing check for WAIT_TIMEOUT that considers it a fatal error)

Your application starts httpd.exe with a define like

   -DMOD_FOO_MONITORED_PID=13579

and a config that loads a custom plug-in module provided by you which
implements the monitor hook that checks for when that pid goes away.

???How to make the monitor hook take down httpd?  apache -k stop???


DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. If you have received this message by mistake please notify the 
sender by return e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for 
viruses and defects. While MindTree Consulting Limited (MindTree) has put in 
place checks to minimize the risks, MindTree will not be responsible for any 
viruses or defects or any forwarded attachments emanating either from within 
MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages 
sent to or from MindTree e-mail address. Messages sent to or from this e-mail 
address may be stored on the MindTree e-mail system or else where.


FW: Want to kill Apache process when its parent process gets killed.

2007-09-11 Thread Ashwani Kumar Sharma

Hi Jeff,

Thanks for your reply. 

The httpd.exe of Apache web server has two processes running in windows.
When we kill the parent httpd.exe the child httpd.exe is still running and
listening to the web request. I don't want this.

I want to modify this in such a way that if I kill the parent httpd.exe
through following code, the child process should also get killed. How is it
possible? Please guide me. It's very urgent.

hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
if (hProcess == NULL) return FALSE;
dwError = ERROR_SUCCESS;
if (!TerminateProcess(hProcess, (DWORD)-1))
dwError = GetLastError();


where pid is the parent process id.



Thanks and Regards,
Ashwani Sharma
Mob: 09916454843
Off: +91-80-26265053


-Original Message-
From: Jeff Trawick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 4:15 PM
To: dev@httpd.apache.org
Subject: Re: Want to kill Apache process when its parent process gets killed.

On 9/10/07, Ashwani Kumar Sharma [EMAIL PROTECTED] wrote:

 In my application I am spawning httpd.exe from the parent process.
...
 My requirement is that:
...
 In the Abnormal termination of the parent process. The Apache should keep
 looking for its parent process. If the parent process is not present

then the Apache web server should also kill itself.
 How can I implement the 2nd point?

not even a half-baked idea:

Somebody gets the monitor hook called from the Windows MPM (i.e.,
fixes Apache on Windows to call a hook that is provided on
Unix/Linux).

   General idea (mpm_winnt.c)

/* Wait for shutdown or restart events or for child death */
winnt_mpm_state = AP_MPMQ_RUNNING;
do {
rv = WaitForMultipleObjects(NUM_WAIT_HANDLES, (HANDLE *)
event_handles, FALSE, something-that-means-one-second);
   if (rv == WAIT_TIMEOUT) {
ap_run_monitor(pconf);
   }
} while (rv == WAIT_TIMEOUT);

(remove existing check for WAIT_TIMEOUT that considers it a fatal error)

Your application starts httpd.exe with a define like

   -DMOD_FOO_MONITORED_PID=13579

and a config that loads a custom plug-in module provided by you which
implements the monitor hook that checks for when that pid goes away.

???How to make the monitor hook take down httpd?  apache -k stop???


DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. If you have received this message by mistake please notify the 
sender by return e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for 
viruses and defects. While MindTree Consulting Limited (MindTree) has put in 
place checks to minimize the risks, MindTree will not be responsible for any 
viruses or defects or any forwarded attachments emanating either from within 
MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages 
sent to or from MindTree e-mail address. Messages sent to or from this e-mail 
address may be stored on the MindTree e-mail system or else where.


Re: svn commit: r573831 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c

2007-09-11 Thread André Malo
* [EMAIL PROTECTED] wrote: 


 Author: niq
 Date: Sat Sep  8 05:46:10 2007
 New Revision: 573831

 URL: http://svn.apache.org/viewvc?rev=573831view=rev
 Log:
 Add option to escape backreferences in RewriteRule.
 PR 34602  and  PR 39746
 Patch by Guenther Gsenger

 Modified:
 httpd/httpd/trunk/CHANGES
 httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml
 httpd/httpd/trunk/modules/mappers/mod_rewrite.c

This spreads another uri escaper copy around. Why can't we take 
ap_escape_uri? Without deep digging: what's the difference?

nd


Re: An enterprise-ish request (ie, basically SNMP)

2007-09-11 Thread Nick Kew
On Mon, 10 Sep 2007 19:09:25 -0400
Jeff McAdams [EMAIL PROTECTED] wrote:

 I look forward to being able to answering any questions about our
 desires and hope to see some discussion and progress on an SNMP
 implementation.  If people think some financial support would be
 helpful in bringing this about, I'm certainly willing to talk about
 that and work out what my company would be willing to do along those
 lines.

Some apache developers, including myself[1], make a living doing
contract work for companies with development needs, such as yours.
If you have a budget, I'll be happy to talk to you.  The fact you're
looking to make it available as open source will qualify you for
a reduction in my standard rate.

If your budget doesn't extend to a professional developer,
maybe you can look for some other arrangement, perhaps working
with other prospective users of such a module, or taking
pot-luck with a student.  But you're unlikely to prompt anyone 
into developing it from scratch unless they themselves have an
existing need for it.

[1] http://apache.webthing.com/

-- 
Nick Kew

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


Re: AW: mod_proxy_balancer

2007-09-11 Thread Vinicius Petrucci
Tested in 2.2.6 ...

Thanks Rüdiger ! :)

On 11/09/2007, Plüm, Rüdiger, VF-Group [EMAIL PROTECTED] wrote:
 Thanks for testing. The attached patch cleanly applies to 2.2.x and also
 contains a backport of r527937.

 Regards

 Rüdiger

  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED]
  Auftrag von Vinicius Petrucci
  Gesendet: Dienstag, 11. September 2007 03:11
  An: dev@httpd.apache.org
  Betreff: Re: AW: mod_proxy_balancer
 
 
  What do I have to do to work in 2.2.6? Too much changes in r572937?
 
  On 10/09/2007, Vinicius Petrucci [EMAIL PROTECTED] wrote:
   Hi Rüdiger,
  
   I've tested the 2nd. It works fine. :)
  
   best,
   Vinicius
  
   On 10/09/2007, Ruediger Pluem [EMAIL PROTECTED] wrote:
   
   
On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
 I've tried the 1st patch (which is simpler and nicer)
  in httpd-trunk
 and now It seems to work... :)
   
Thanks for testing, but can you please also test the 2nd patch?
Only the 2nd patch is backportable and I would like to
  see this fixed in 2.2.x too.
   
Regards
   
Rüdiger
   
   
  
  
   --
   Vinicius Tavares Petrucci
   home page: http://www.ic.uff.br/~vpetrucci
  
 
 
  --
  Vinicius Tavares Petrucci
  home page: http://www.ic.uff.br/~vpetrucci
 




-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci


Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread Jim Jagielski

What with this and the Win32/apr issues, seems to me that
we should consider a 2.2.7 out soonish :)


Re: svn commit: r573831 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c

2007-09-11 Thread Nick Kew
On Tue, 11 Sep 2007 15:11:35 +0200
André Malo [EMAIL PROTECTED] wrote:

 * [EMAIL PROTECTED] wrote: 
 
 
  Author: niq
  Date: Sat Sep  8 05:46:10 2007
  New Revision: 573831
 
  URL: http://svn.apache.org/viewvc?rev=573831view=rev
  Log:
  Add option to escape backreferences in RewriteRule.
  PR 34602  and  PR 39746
  Patch by Guenther Gsenger
 
  Modified:
  httpd/httpd/trunk/CHANGES
  httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml
  httpd/httpd/trunk/modules/mappers/mod_rewrite.c
 
 This spreads another uri escaper copy around. Why can't we take 
 ap_escape_uri? Without deep digging: what's the difference?

As I said in my reply to Rüdiger, I just applied the patch from
bugzilla, having ascertained that it looked sound and worked for
cases identified in both the bug reports referenced.

A further improvement, round tuits permitting, would indeed be
to look deeper, and eliminate any duplication.

-- 
Nick Kew

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


Re: svn commit: r573831 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c

2007-09-11 Thread André Malo
* Nick Kew wrote: 


 On Tue, 11 Sep 2007 15:11:35 +0200

 André Malo [EMAIL PROTECTED] wrote:
  * [EMAIL PROTECTED] wrote:
   Author: niq
   Date: Sat Sep  8 05:46:10 2007
   New Revision: 573831
  
   URL: http://svn.apache.org/viewvc?rev=573831view=rev
   Log:
   Add option to escape backreferences in RewriteRule.
   PR 34602  and  PR 39746
   Patch by Guenther Gsenger
  
   Modified:
   httpd/httpd/trunk/CHANGES
   httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml
   httpd/httpd/trunk/modules/mappers/mod_rewrite.c
 
  This spreads another uri escaper copy around. Why can't we take
  ap_escape_uri? Without deep digging: what's the difference?

 As I said in my reply to Rüdiger, I just applied the patch from
 bugzilla, having ascertained that it looked sound and worked for
 cases identified in both the bug reports referenced.

Yep, sorry. Saw that reply too late. Just took a look at the diff and was 
disturbed by the cluttering ;)

Also I don't like the ' ' = '+' transition, which should not be applied for 
paths. It's safer to translate that always to %20, I guess.

 A further improvement, round tuits permitting, would indeed be
 to look deeper, and eliminate any duplication.

It should be done before considering backport, IMHO.

By the way, I'm wondering why nobody picked up the suggested use of the 
escape rewrite map (or I overread it). 
(http://issues.apache.org/bugzilla/show_bug.cgi?id=34602#c16)

nd


Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread jean-frederic clere
Plüm wrote:
 
 -Ursprüngliche Nachricht-
 Von: jean-frederic clere
 Gesendet: Montag, 10. September 2007 16:38
 An: dev@httpd.apache.org
 Betreff: Re: svn commit: r573264 - 
 /httpd/httpd/trunk/include/scoreboard.h


 Jim Jagielski wrote:
 On Sep 10, 2007, at 6:37 AM, Plüm, Rüdiger, VF-Group wrote:

 For example what about adding:
 static APR_OPTIONAL_FN_TYPE(ap_proxy_lb_worker_size)
 *proxy_lb_worker_size;
 and use a void * in scoreboard and an int for the size?
 For me this sounds fine, but I would guess that Jim doesn't like
 the void * idea in the scoreboard.

 I don't mind it at all, if we use it because we don't know
 what will be stored away or because we may use the storage
 differently at different times. But this is never the
 case. lb_score always is proxy_worker_stat.


 The attached patch remove lb_score from scoreboard.c.

 Comments?
 
 1. IMHO requires a minor bump.

Find a patch that covers all the points you raised below.

More comments?

Cheers

Jean-Frederic

 2. Why messing around with lb_score any longer? Instead of
 
 return sizeof(lb_score);

we could do
 
 return sizeof(proxy_worker_stat);
 
 3. We should register the optional functions ap_proxy_lb_workers and
ap_proxy_lb_worker_size in the same place and should keep the code
of them next to each other. With your patch they are distributed over
mod_proxy.c and mod_proxy_balancer.c. IMHO they belong to mod_proxy.c
as we call ap_proxy_initialize_worker_share from mod_proxy's child init
(so even if we do not load mod_proxy_balancer we need the scoreboard 
 entries).
 4. All
  if (lb_limit)
in scoreboard.c should be extended to
  if (lb_limit  worker_size)
 
 
 Regards
 
 Rüdiger
 
 

Index: server/scoreboard.c
===
--- server/scoreboard.c (revision 574500)
+++ server/scoreboard.c (working copy)
@@ -62,13 +62,15 @@
 
 static APR_OPTIONAL_FN_TYPE(ap_proxy_lb_workers)
 *pfn_proxy_lb_workers;
+static APR_OPTIONAL_FN_TYPE(ap_proxy_lb_worker_size)
+*pfn_proxy_lb_worker_size;
 
 struct ap_sb_handle_t {
 int child_num;
 int thread_num;
 };
 
-static int server_limit, thread_limit, lb_limit;
+static int server_limit, thread_limit, lb_limit, worker_size;
 static apr_size_t scoreboard_size;
 
 /*
@@ -101,11 +103,18 @@
 else
 lb_limit = 0;
 
+if (!pfn_proxy_lb_worker_size)
+pfn_proxy_lb_worker_size = 
APR_RETRIEVE_OPTIONAL_FN(ap_proxy_lb_worker_size);
+if (pfn_proxy_lb_worker_size)
+worker_size = pfn_proxy_lb_worker_size();
+else
+worker_size = 0;
+
 scoreboard_size = sizeof(global_score);
 scoreboard_size += sizeof(process_score) * server_limit;
 scoreboard_size += sizeof(worker_score) * server_limit * thread_limit;
-if (lb_limit)
-scoreboard_size += sizeof(lb_score) * lb_limit;
+if (lb_limit  worker_size)
+scoreboard_size += worker_size * lb_limit;
 
 return scoreboard_size;
 }
@@ -129,9 +138,9 @@
 ap_scoreboard_image-servers[i] = (worker_score *)more_storage;
 more_storage += thread_limit * sizeof(worker_score);
 }
-if (lb_limit) {
-ap_scoreboard_image-balancers = (lb_score *)more_storage;
-more_storage += lb_limit * sizeof(lb_score);
+if (lb_limit  worker_size) {
+ap_scoreboard_image-balancers = (void *)more_storage;
+more_storage += lb_limit * worker_size;
 }
 ap_assert(more_storage == (char*)shared_score + scoreboard_size);
 ap_scoreboard_image-global-server_limit = server_limit;
@@ -281,9 +290,9 @@
sizeof(worker_score) * thread_limit);
 }
 /* Clean up the lb workers data */
-if (lb_limit) {
+if (lb_limit  worker_size) {
 memset(ap_scoreboard_image-balancers, 0,
-   sizeof(lb_score) * lb_limit);
+   worker_size * lb_limit);
 }
 return OK;
 }
@@ -490,8 +499,10 @@
 
 AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num)
 {
-if (((lb_num  0) || (lb_limit  lb_num))) {
+char *ptr;
+if (((lb_num  0) || (lb_limit  lb_num)) || worker_size==0) {
 return(NULL); /* Out of range */
 }
-return ap_scoreboard_image-balancers[lb_num];
+ptr = (char *) ap_scoreboard_image-balancers + lb_num*worker_size;
+return (lb_score *) ptr;
 }
Index: modules/proxy/mod_proxy_balancer.c
===
--- modules/proxy/mod_proxy_balancer.c  (revision 574500)
+++ modules/proxy/mod_proxy_balancer.c  (working copy)
@@ -19,7 +19,6 @@
 #define CORE_PRIVATE
 
 #include mod_proxy.h
-#include scoreboard.h
 #include ap_mpm.h
 #include apr_version.h
 #include apr_hooks.h
Index: modules/proxy/proxy_util.c
===
--- modules/proxy/proxy_util.c  (revision 574500)
+++ 

Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:



1. IMHO requires a minor bump.


Find a patch that covers all the points you raised below.

More comments?



Requires a major bump. Also destroys all those mystical
other balancers from working as-is, since they
must now be not only recompiled but also re-coded to
implement ap_proxy_lb_worker_size() so that the
old lb_score entry exists and has some size associated
with it... Didn't try applying or compiling but
I'm not sure it will even build cleanly since
it appears we've lost lb_score now.


Re: svn commit: r573831 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c

2007-09-11 Thread Nick Kew
On Tue, 11 Sep 2007 18:10:57 +0200
André Malo [EMAIL PROTECTED] wrote:

  A further improvement, round tuits permitting, would indeed be
  to look deeper, and eliminate any duplication.
 
 It should be done before considering backport, IMHO.

Yep, guess so.  I think I just put a proposal in STATUS (just
transcribing recent trunk/CHANGES entries), but I can withdraw
that pending further thought.

 By the way, I'm wondering why nobody picked up the suggested use of
 the escape rewrite map (or I overread it). 
 (http://issues.apache.org/bugzilla/show_bug.cgi?id=34602#c16)

Can't speak for others, but I simply missed it.

-- 
Nick Kew

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


Favicon.ico

2007-09-11 Thread Jack Gostl
This is my first message to this list. Hope I'm sending to the right place.

I'm trying to get favicon.ico to work.

I'm running Apache 1.3.33 on AIX 5.3. To avoid confusion, I picked up a working 
favicon.ico from another site and dropped it into the root (virtual) directory.

I did some research on Google, and based on that I added:

AddType image/x-icon .ico 

to my config. 

I still don't see the icon. The odd part is that this works perfectly on the 
precompiled Apache on my WIndows XP box. 

Any suggestions here?

Thanks - Jack




Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread jean-frederic clere
Jim Jagielski wrote:
 
 On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:
 

 1. IMHO requires a minor bump.

 Find a patch that covers all the points you raised below.

 More comments?

 
 Requires a major bump. Also destroys all those mystical
 other balancers from working as-is, since they
 must now be not only recompiled but also re-coded to
 implement ap_proxy_lb_worker_size() so that the
 old lb_score entry exists and has some size associated
 with it...

ap_proxy_lb_worker_size is in mod_proxy as Rüdiger suggested it.
I agree it can't be backported to 2.2 but why can't it by in trunk?

 Didn't try applying or compiling but
 I'm not sure it will even build cleanly since
 it appears we've lost lb_score now.
 

Compiling (make clean; make; make install; $HOME/APACHE/bin/apachectl
start; curl -v http://localhost/mytests) is something I try before
submitting a patch.

Cheers

Jean-Frederic



Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 12:44 PM, jean-frederic clere wrote:


Jim Jagielski wrote:


On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:



1. IMHO requires a minor bump.


Find a patch that covers all the points you raised below.

More comments?



Requires a major bump. Also destroys all those mystical
other balancers from working as-is, since they
must now be not only recompiled but also re-coded to
implement ap_proxy_lb_worker_size() so that the
old lb_score entry exists and has some size associated
with it...


ap_proxy_lb_worker_size is in mod_proxy as Rüdiger suggested it.


My point is that this function must be defined by any other
balancer that wants to use this scoreboard space. You had
mentioned concern that we can't be monkeying all that
much with lb_score and stuff because other balancers
may be wanting to use it. This patch does nothing to
help that really... once the API breaks, well, we
can do whatever we want :)



I agree it can't be backported to 2.2 but why can't it by in trunk?



Never said it couldn't. Just made a comment that this
patch isn't suitable for backporting. If I didn't care
about a backportable patch, I would have originally created
something quite different than what I did. 2.2 *still* has
the problem. Instead, we're fixing something that doesn't
have a problem... :/

Of course, all this assumes that the present usage of
a general scoreboard is still the right design choice.
Personally, as was discussed awhile ago, we need
a better abstraction as well as moving *away* from
a general purpose-shove-everything-in-here scoreboard.

Re: An enterprise-ish request (ie, basically SNMP)

2007-09-11 Thread Jeff McAdams
Nick Kew wrote:
 On Mon, 10 Sep 2007 19:09:25 -0400
 Jeff McAdams [EMAIL PROTECTED] wrote:
 I look forward to being able to answering any questions about our
 desires and hope to see some discussion and progress on an SNMP
 implementation.  If people think some financial support would be
 helpful in bringing this about, I'm certainly willing to talk about
 that and work out what my company would be willing to do along those
 lines.

 Some apache developers, including myself[1], make a living doing
 contract work for companies with development needs, such as yours.
 If you have a budget, I'll be happy to talk to you.  The fact you're
 looking to make it available as open source will qualify you for
 a reduction in my standard rate.

While I don't have anything hard and fast, like I said, I have talked,
informally with some management folks around here about possibly getting
some professional development work done on it and didn't get much
push-back on it, so it seems likely that we could make something happen.
 Unfortunately, that means I don't really have any real numbers to
consider at this point though I could probably talk in off-the-record
generalities to at least get an idea if what it'd take to get it done.

Certainly having Apache developers, such as yourself, would be a great
thing for us.  I figure its more likely to be a successful project if
we've got someone working on it that's already familiar with the httpd
code base and best practices for module development, etc.

For the benefit of the list...if there are other developers, in addition
to Nick, that might be interested in taking a look at this project and
tackling it, let me know and we can certainly talk.

Thanks!
-- 
Jeff McAdams
They that can give up essential liberty to obtain a
little temporary safety deserve neither liberty nor safety.
   -- Benjamin Franklin



signature.asc
Description: OpenPGP digital signature


Re: An enterprise-ish request (ie, basically SNMP)

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 1:11 PM, Jeff McAdams wrote:



For the benefit of the list...if there are other developers, in  
addition

to Nick, that might be interested in taking a look at this project and
tackling it, let me know and we can certainly talk.



I actually work for a company which is currently working
out the logistics of open sourcing and donating our
SNMP module. It would serve as a nice base to start
from.



Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:



 AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num)
 {
-if (((lb_num  0) || (lb_limit  lb_num))) {
+char *ptr;
+if (((lb_num  0) || (lb_limit  lb_num)) || worker_size==0) {
 return(NULL); /* Out of range */
 }
-return ap_scoreboard_image-balancers[lb_num];
+ptr = (char *) ap_scoreboard_image-balancers +  
lb_num*worker_size;

+return (lb_score *) ptr;


Ideally, of course, lb_score should just go away
and use void *... (and remove that (char *) stuff
as well).



RE: Favicon.ico

2007-09-11 Thread Allen Pulsifer
What happens if you go to another box and do a

curl -I http://www.yoursite.com/favicon.ico

and/or

curl -i http://www.yoursite.com/favicon.ico

[Try this on google or yahoo if you want to see what should happen.]



Re: Want to kill Apache process when its parent process gets killed.

2007-09-11 Thread Jeff Trawick
On 9/11/07, Ashwani Kumar Sharma [EMAIL PROTECTED] wrote:
 Hi Jeff,

 Thanks for your reply.

 The httpd.exe of Apache web server has two processes running in windows.
 When we kill the parent httpd.exe the child httpd.exe is still running and
 listening to the web request. I don't want this.

When you said

In my application I am spawning httpd.exe from the parent process.

I assumed thereafter that parent refers to your own application that
starts the web server, but you have a different kind of issuefor which
I have no ideas.

Good luck...


windows cl/link invocations

2007-09-11 Thread Eric Covener
For debugging a windows build, is there a simple change to the Apache
build/workspace that will print all the cl.exe/link.exe invocations?

FWIW I'm using VC6 and my build is kicked off as below:

msdev apache.dsw /MAKE BuildBin Win32 Release

I see that sometimes while poking around in individual DSP files,
these odd .plg files are generated but not when I do the full build

-- 
Eric Covener
[EMAIL PROTECTED]


Add 2.2.6 to bugzilla

2007-09-11 Thread Ruediger Pluem
Can someone with appropriate permissions please add version 2.2.6 to bugzilla 
such
that bug reports can be done correctly? Thanks.

Regards

Rüdiger


Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Ruediger Pluem


On 09/11/2007 06:09 PM, jean-frederic clere wrote:
 Plüm wrote:
 -Ursprüngliche Nachricht-
 Von: jean-frederic clere
 Gesendet: Montag, 10. September 2007 16:38
 An: dev@httpd.apache.org
 Betreff: Re: svn commit: r573264 - 
 /httpd/httpd/trunk/include/scoreboard.h


 Jim Jagielski wrote:
 On Sep 10, 2007, at 6:37 AM, Plüm, Rüdiger, VF-Group wrote:

 For example what about adding:
 static APR_OPTIONAL_FN_TYPE(ap_proxy_lb_worker_size)
 *proxy_lb_worker_size;
 and use a void * in scoreboard and an int for the size?
 For me this sounds fine, but I would guess that Jim doesn't like
 the void * idea in the scoreboard.

 I don't mind it at all, if we use it because we don't know
 what will be stored away or because we may use the storage
 differently at different times. But this is never the
 case. lb_score always is proxy_worker_stat.


 The attached patch remove lb_score from scoreboard.c.

 Comments?
 1. IMHO requires a minor bump.
 
 Find a patch that covers all the points you raised below.
 
 More comments?

Index: server/scoreboard.c
===
--- server/scoreboard.c»(revision 574500)
+++ server/scoreboard.c»(working copy)
@@ -490,8 +499,10 @@
·
 AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num)
 {
-if (((lb_num  0) || (lb_limit  lb_num))) {
+char *ptr;
+if (((lb_num  0) || (lb_limit  lb_num)) || worker_size==0) {

I do not understand the setting of the brackets here. I suppose this should be:

if ((lb_num  0) || (lb_limit  lb_num) || (worker_size == 0)) {

instead.


Index: modules/proxy/mod_proxy_balancer.c
===
--- modules/proxy/mod_proxy_balancer.c»·(revision 574500)
+++ modules/proxy/mod_proxy_balancer.c»·(working copy)
@@ -19,7 +19,6 @@
 #define CORE_PRIVATE
·
 #include mod_proxy.h
-#include scoreboard.h

Due to r574485 scoreboard.h is needed by mod_proxy_balancer to access
ap_get_scoreboard_lb. So this patch to mod_proxy_balancer.c should be
removed from your patch.



Regards

Rüdiger


Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Ruediger Pluem


On 09/11/2007 06:23 PM, Jim Jagielski wrote:
 
 On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:
 

 1. IMHO requires a minor bump.

 Find a patch that covers all the points you raised below.

 More comments?

 
 Requires a major bump. Also destroys all those mystical

Curious again. Why a major bump? Because lb_score is being converted from
a complete type to an incomplete type?

Regards

Rüdiger



Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 4:04 PM, Ruediger Pluem wrote:




On 09/11/2007 06:23 PM, Jim Jagielski wrote:


On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:



1. IMHO requires a minor bump.


Find a patch that covers all the points you raised below.

More comments?



Requires a major bump. Also destroys all those mystical


Curious again. Why a major bump? Because lb_score is being  
converted from

a complete type to an incomplete type?



That is one reason. Another is that any module, including
mod_proxy, which needs to create the old lb_score needs
to implement ap_proxy_lb_worker_size(). If that function
doesn't exist, then even if they implement ap_proxy_lb_workers(),
the lb score slot will be 0 size...

I would say that if the code was adjusted so if
the function did not exist, and the worker_size
defaulted to 1024, then they would be no regressions
for 3rd party modules, which would remove the bump and
make it a viable 2.2 backport.

I'd +1 that.


Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski

Why doesn't j-f go ahead and commit the revised patch
to trunk and we can address our concerns in the code
instead of email :)



Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Ruediger Pluem


On 09/11/2007 10:18 PM, Jim Jagielski wrote:
 
 On Sep 11, 2007, at 4:04 PM, Ruediger Pluem wrote:
 


 On 09/11/2007 06:23 PM, Jim Jagielski wrote:

 On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:


 1. IMHO requires a minor bump.

 Find a patch that covers all the points you raised below.

 More comments?


 Requires a major bump. Also destroys all those mystical

 Curious again. Why a major bump? Because lb_score is being converted from
 a complete type to an incomplete type?

 
 That is one reason. Another is that any module, including
 mod_proxy, which needs to create the old lb_score needs
 to implement ap_proxy_lb_worker_size(). If that function
 doesn't exist, then even if they implement ap_proxy_lb_workers(),
 the lb score slot will be 0 size...

Just thinking. If some module did a

sizeof(lb_score)

it will fail to compile after the patch, because lb_score is now an
incomplete type. So I guess in order to keep it backportable we
need to stick with

typedef struct lb_score lb_score;
struct lb_score {
unsigned char data[1024];
};

The improvement would be that we do not waste space any longer
if ap_proxy_lb_worker_size() is present and that we can be sure
that enough space is present if ap_proxy_lb_worker_size() is present
and returns more than 1024.

 
 I would say that if the code was adjusted so if
 the function did not exist, and the worker_size
 defaulted to 1024, then they would be no regressions
 for 3rd party modules, which would remove the bump and
 make it a viable 2.2 backport.

Sounds reasonable to me.  So +1 from me adjusting the patch
in a way that it defaults to 1024 if ap_proxy_lb_worker_size()
is missing.

Regards

Rüdiger


Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 4:39 PM, Ruediger Pluem wrote:



it will fail to compile after the patch, because lb_score is now an
incomplete type. So I guess in order to keep it backportable we
need to stick with

typedef struct lb_score lb_score;
struct lb_score {
unsigned char data[1024];
};



This is a good point that I completely missed...

I would also suggest that we keep ap_proxy_lb_workers
in proxy_util.c (as it currently is), since even
though its not part of the API, other proxy module
make have a need for it (and again, keeping the
number of changes to a minimum).




Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Ruediger Pluem


On 09/11/2007 10:51 PM, Jim Jagielski wrote:

 
 I would also suggest that we keep ap_proxy_lb_workers
 in proxy_util.c (as it currently is), since even
 though its not part of the API, other proxy module
 make have a need for it (and again, keeping the
 number of changes to a minimum).

+1. That means also to keep it in mod_proxy.h.
But we shouldn't do the same mistake with ap_proxy_lb_worker_size().
So keep it static in mod_proxy.c.

Regards

Rüdiger



Re: svn commit: r573264 - /httpd/httpd/trunk/include/scoreboard.h

2007-09-11 Thread Jim Jagielski


On Sep 11, 2007, at 5:01 PM, Ruediger Pluem wrote:




On 09/11/2007 10:51 PM, Jim Jagielski wrote:



I would also suggest that we keep ap_proxy_lb_workers
in proxy_util.c (as it currently is), since even
though its not part of the API, other proxy module
make have a need for it (and again, keeping the
number of changes to a minimum).


+1. That means also to keep it in mod_proxy.h.
But we shouldn't do the same mistake with ap_proxy_lb_worker_size().
So keep it static in mod_proxy.c.



+1. I prefer opt functions being static anyway, but
it's too late for ap_proxy_lb_workers() :)




Re: Want to kill Apache process when its parent process gets killed.

2007-09-11 Thread William A. Rowe, Jr.
Ashwani Kumar Sharma wrote:
 
 The httpd.exe of Apache web server has two processes running in windows.
 When we kill the parent httpd.exe the child httpd.exe is still running and
 listening to the web request. I don't want this.

Since you forcibly terminate the server process(es) your instance of httpd.exe
won't be cleaned up.  It's really not terribly graceful.

It's the unix equivilant of sending kill -KILL instead of kill.  Ick.

I believe you can solve your entire problem by telling httpd.exe to shut down,
and avoiding the abandoned children.  The API would be GenerateConsoleCtrlEvent
to force a CTRL_C_EVENT at the process

http://msdn2.microsoft.com/en-us/library/ms683155.aspx

all of which is to say you aren't using httpd.exe as a service, which is where
most of the testing and evalution effort is invested in.

Since you are replacing the parent wrapper you might consider dropping the
parent altogether (see the -X flag, I'm not sure if -DONE_PROCESS is the
same effect on win32 offhand).

Bill


Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread William A. Rowe, Jr.
Jim Jagielski wrote:
 What with this and the Win32/apr issues, seems to me that
 we should consider a 2.2.7 out soonish :)

I was about to suggest the same :)

With Win32/APR there isn't a fix.  Not yet at least, Tom Donovan and I are
going back and forth with ideas that break the fewest binaries (it's not
going to be workable to require users to obtain new copies).  So some
fix that is entirely made by a minor change to mod_fcgid itself, and not
the individually compiled fcgid's, is more appropriate.

But I've sort of put that aside to look at the mod_perl issues that some
user had reported.  Will have some update shortly this week.

The SSL_VERISON_LIBRARY is thankfully quite fixable, something in, say
patches/apply_to_2.2.6 would certainly go a long ways to helping in the
very short term.

Bill


Re: windows cl/link invocations

2007-09-11 Thread William A. Rowe, Jr.
Eric Covener wrote:
 For debugging a windows build, is there a simple change to the Apache
 build/workspace that will print all the cl.exe/link.exe invocations?
 
 FWIW I'm using VC6 and my build is kicked off as below:
 
 msdev apache.dsw /MAKE BuildBin Win32 Release
 
 I see that sometimes while poking around in individual DSP files,
 these odd .plg files are generated but not when I do the full build

.plg are associated with a workspace not a project.

For what it's worth, you might be interested in running

nmake -f Makefile.win _apacher  full.log 21

to see the complete compilation.


IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread William A. Rowe, Jr.
There seems to be troubles in paradise.  cc'ing httpd who had
recently updated mime-types.

I'm not speaking about IE7's refusal to assign quality quotients to
their Accept: alternatives, no, this is a bit trickier and it looks
like we are in the wrong.

An example document, /dist/httpd/httpd-2.2.6.tar.gz is requested and
received complete via netcat sniffing of request and query to a.a.o.
Firefox etc all receive the document complete.

But within IE7, the request is truncated at 4864kb instead of the
expected 6mb.  My best guess is that IE believes it can grok the file
as it's advertised content type.  This is observed on a number of
different IE7 boxes across several ISPs speaking to archive.a.o.

Best I can figure, this is really application/x-tar+x-gzip (or would
that be application/x-gzip+x-tar?) if we don't want to (and we don't
want to) advertise the content stream as gzip'ed (preventing automatic
inflation which would cause md5/asc sigs to mismatch).

Thoughts?

Bill
GET /dist/httpd/httpd-2.2.6.tar.gz HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, 
application/x-ms-application, */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 
2.0.50727; .NET CLR 3.0.04506.30)
Host: archive.apache.org
Connection: Keep-Alive

HTTP/1.1 200 OK
Date: Tue, 11 Sep 2007 21:59:17 GMT
Server: Apache/2.3.0-dev (Unix)
Last-Modified: Thu, 06 Sep 2007 19:31:02 GMT
ETag: b1b7be-5bfe97-9007c980
Accept-Ranges: bytes
Content-Length: 6028951
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-tar



Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread Nick Kew


On 11 Sep 2007, at 23:26, William A. Rowe, Jr. wrote:



Best I can figure, this is really application/x-tar+x-gzip (or would
that be application/x-gzip+x-tar?) if we don't want to (and we don't
want to) advertise the content stream as gzip'ed (preventing automatic
inflation which would cause md5/asc sigs to mismatch).


I disagree.  The right thing is indeed to advertise it as gzipped,
and provide sigs for the uncompressed tarballs (alongside the
compressed ones).  In fact we could reduce the number of
sig files by providing MD5s for everything in one file, and then
just PGP-sign the MD5 file.



HTTP/1.1 200 OK
Date: Tue, 11 Sep 2007 21:59:17 GMT
Server: Apache/2.3.0-dev (Unix)
Last-Modified: Thu, 06 Sep 2007 19:31:02 GMT
ETag: b1b7be-5bfe97-9007c980
Accept-Ranges: bytes
Content-Length: 6028951
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-tar


An application that understands tar may unpack that.

Does a Content-Disposition header help with IE7?
And would it help browsers if we supply a Content-MD5 header?

--
Nick Kew


Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread Nikolas Coukouma
William A. Rowe, Jr. wrote:
 An example document, /dist/httpd/httpd-2.2.6.tar.gz is requested and
...
 Best I can figure, this is really application/x-tar+x-gzip (or would
 that be application/x-gzip+x-tar?) if we don't want to (and we don't
 want to) advertise the content stream as gzip'ed (preventing automatic
 inflation which would cause md5/asc sigs to mismatch).
   

Due to the lack of a real standard (AFAIK ...) that doesn't use content
encodings, it's hard to say what is correct. If it's decided to avoid
the use of Content-Encoding (is the hash and signature problem that
bad?), I'd suggest the use of the existing application/x-tgz over a new
type.

Regards,
-Nikolas



signature.asc
Description: OpenPGP digital signature


Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread Nikolas Coukouma
William A. Rowe, Jr. wrote:
 There seems to be troubles in paradise.  cc'ing httpd who had
 recently updated mime-types.

 Best I can figure, this is really application/x-tar+x-gzip (or would
 that be application/x-gzip+x-tar?) if we don't want to (and we don't
 want to) advertise the content stream as gzip'ed (preventing automatic
 inflation which would cause md5/asc sigs to mismatch).
   

It should also be noted that this has been discussed here before, in
February of 2003

http://mail-archives.apache.org/mod_mbox/httpd-dev/200302.mbox/[EMAIL PROTECTED]



signature.asc
Description: OpenPGP digital signature


Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread William A. Rowe, Jr.
Nick Kew wrote:
 
 On 11 Sep 2007, at 23:26, William A. Rowe, Jr. wrote:
 

 Best I can figure, this is really application/x-tar+x-gzip (or would
 that be application/x-gzip+x-tar?) if we don't want to (and we don't
 want to) advertise the content stream as gzip'ed (preventing automatic
 inflation which would cause md5/asc sigs to mismatch).
 
 I disagree.  The right thing is indeed to advertise it as gzipped,
 and provide sigs for the uncompressed tarballs (alongside the
 compressed ones).  In fact we could reduce the number of
 sig files by providing MD5s for everything in one file, and then
 just PGP-sign the MD5 file.

On the other hand, this is really application/x-gzip ment for another
application to inflate, and then untar.

Seriously, if I download 20 packages getting ready to do things on a third
machine, I sure as hell don't want to scp those packages across my intranet
in an inflated tar format!  And definitely not from an unpacked tar!

 HTTP/1.1 200 OK
 Date: Tue, 11 Sep 2007 21:59:17 GMT
 Server: Apache/2.3.0-dev (Unix)
 Last-Modified: Thu, 06 Sep 2007 19:31:02 GMT
 ETag: b1b7be-5bfe97-9007c980
 Accept-Ranges: bytes
 Content-Length: 6028951
 Keep-Alive: timeout=5, max=100
 Connection: Keep-Alive
 Content-Type: application/x-tar

 An application that understands tar may unpack that.

No, because you missed

Content-Encoding: gzip

and at that point any user agent can inflate and unpack it, of course.

That is one alternative if ment to be viewed in a user agent.  These
particular archives are not ment to, however, at the time they are
obtained.

Consider mirrors, do we expect the mirror or proxy to make local decisions
about storing this compressed or uncompressed?  Certainly not.

 Does a Content-Disposition header help with IE7?

No clue offhand, but that isn't a HTTP/1.1 field so I couldn't care less.
I think this really is our fault for representing the wrong Content-Type.

 And would it help browsers if we supply a Content-MD5 header?

Absolutely -1.  I'd have no problem with a Content-MD5 footer, but we
don't know the MD5 until the entire response is composed.  As a matter
of efficiency only a footer makes sense.



Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread William A. Rowe, Jr.
Nikolas Coukouma wrote:
 
 Due to the lack of a real standard (AFAIK ...) that doesn't use content
 encodings, it's hard to say what is correct.

Agreed...

 If it's decided to avoid the use of Content-Encoding (is the hash and 
 signature problem that bad?)

Yes if mirrors can't be authenticated...

 I'd suggest the use of the existing application/x-tgz over a new type.

That's a rational alternative to consider, thanks!

And thanks for the pointer at the previous discussion.

Bill


Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread William A. Rowe, Jr.
Nikolas Coukouma wrote:
 
 It should also be noted that this has been discussed here before, in
 February of 2003
 
 http://mail-archives.apache.org/mod_mbox/httpd-dev/200302.mbox/[EMAIL 
 PROTECTED]

Actually this wasn't; that subject was filename munging and content-type
inference.  This is honest-to-goodness content-type handling.




Re: IE7, application/x-tar and our archive.apache.org .tar.gz's

2007-09-11 Thread William A. Rowe, Jr.
Jochen Wiedmann wrote:
 On 9/12/07, William A. Rowe, Jr. [EMAIL PROTECTED] wrote:
 
 But within IE7, the request is truncated at 4864kb instead of the
 expected 6mb.  My best guess is that IE believes it can grok the file
 as it's advertised content type.
 
 Is it possible that the browser invokes a content handler (for example
 winzip or something like that) on the transferred file, which detects
 at some point, that the mime type is wrong and therefore fails,
 causing the browser to abort the connection?

This is pretty much a virgin 2003 R2 SP2 Server with Visual Studio 2005
installed, upgraded to IE7.

It really isn't that decorated, a quick delve shows that HKCR/.tar does
map to Content Type application/x-tar (as it should) and that's associated
to PercievedType compressed.  Simply the windows compressed folder handler.

Yet and still, this was a save as file, not an attempt to open.

FWIW MS maps .tgz to Content Type application/x-compressed, whatever the
heck that's supposed to mean :)

Bill


Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread William A. Rowe, Jr.
Looking at the scope of all these static calls, I really believe the
patch is this simple (process-pool survives the entire httpd);

Index: ssl_engine_vars.c
===
--- ssl_engine_vars.c   (revision 574494)
+++ ssl_engine_vars.c   (working copy)
@@ -190,7 +190,7 @@
  */
 if (result == NULL) {
 if (strlen(var)  12  strcEQn(var, SSL_VERSION_, 12))
-result = ssl_var_lookup_ssl_version(p, var+12);
+result = ssl_var_lookup_ssl_version(s-process-pool, var+12);
 else if (strcEQ(var, SERVER_SOFTWARE))
 result = ap_get_server_banner();
 else if (strcEQ(var, API_VERSION)) {
@@ -262,7 +262,8 @@

 ssl = sslconn-ssl;
 if (strlen(var)  8  strcEQn(var, VERSION_, 8)) {
-result = ssl_var_lookup_ssl_version(p, var+8);
+result = ssl_var_lookup_ssl_version(c-base_server-process-pool,
+var+8);
 }
 else if (ssl != NULL  strcEQ(var, PROTOCOL)) {
 result = (char *)SSL_get_version(ssl);



Re: AW: SSL_VERSION_LIBRARY

2007-09-11 Thread William A. Rowe, Jr.
William A. Rowe, Jr. wrote:
 Looking at the scope of all these static calls, I really believe the
 patch is this simple (process-pool survives the entire httpd);

Sorry - scratch that.  I wasn't counting the frequency of pstrdup calls.

Just begging for optimization :)


Re: Add 2.2.6 to bugzilla

2007-09-11 Thread Sander Temme
Ruediger Pluem wrote:

 Can someone with appropriate permissions please add version 2.2.6 to bugzilla 
 such
 that bug reports can be done correctly? Thanks.

I don't have my Bugzilla login password on me right now... I'll add this
tomorrow when I get home, if no one beats me to it.

S.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Add 2.2.6 to bugzilla

2007-09-11 Thread William A. Rowe, Jr.
Sander Temme wrote:
 Ruediger Pluem wrote:
 
 Can someone with appropriate permissions please add version 2.2.6 to 
 bugzilla such
 that bug reports can be done correctly? Thanks.
 
 I don't have my Bugzilla login password on me right now... I'll add this
 tomorrow when I get home, if no one beats me to it.

Had beat you to it.  Everything httpd-wise and apr-wise is in sync.


exists? apache debugging/tracing tool for config files.

2007-09-11 Thread Ed S. Peschko
All,

I was wondering - is there a tracking/debugging tool that allows you to see 
exactly
what happens with an incoming URL? ie, output looking something like this:

http://www.mysite.com/cgi-bin/test_script.pl

Parsing url... partial url '/cgi-bin/test_script.pl'
Looking up Script alias: /cgi-bin =  directory 
'/opt/tools/install/cgi-bin'
Looking at directory directive: /opt/tools/install/cgi-bin
Looking at Options: +Exec-CGI
Looking at extension '.pl' = executing script.

I've looked around pretty much everywhere and haven't found anything
remotely like this.

But - given how many pitfalls there are in configuring apache, I would 
have thought that this would have been a pretty basic itch to scratch, 
so i'm hesitant to approach it further until I hear definitively that
something like this does not exist.

Anyways, if something like this does NOT exist, exactly what options do folks
have for debugging apache control files, apart from manually grepping through
the log files and embedding an apache configuration parser in your brain?

Thanks much,

Ed