Set-Cookie

2009-03-26 Thread Marco Spinetti

I have a doubt about ho to set multiple cookies.
I'm using apache 2.2 and in my module handler I'm trying to set two 
different cookies with:


apr_table_set(r-headers_out, Set-Cookie, co);

apr_table_set(r-headers_out, Set-Cookie, co1);

It seems that the second instruction override the first one.
So my question: how can I set two cookies in my module?

Best regards

Marco


Re: Set-Cookie

2009-03-26 Thread Sorin Manolache
On Thu, Mar 26, 2009 at 09:37, Marco Spinetti m.spine...@pisa.iol.it wrote:
 I have a doubt about ho to set multiple cookies.
 I'm using apache 2.2 and in my module handler I'm trying to set two
 different cookies with:

 apr_table_set(r-headers_out, Set-Cookie, co);

 apr_table_set(r-headers_out, Set-Cookie, co1);

 It seems that the second instruction override the first one.
 So my question: how can I set two cookies in my module?

apr_table_addn(r-headers_out, Set-Cookie, cookie);


-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


Re: Set-Cookie

2009-03-26 Thread Marco Spinetti

Thanks very much.
So I have to use:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);

Best regards.

Marco

Rainer Jung ha scritto:

On 26.03.2009 10:07, Marco Spinetti wrote:

Ok, I have to use apr_table_add instead od apr_table_set.
So I should write:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);

If I write:

apr_table_set(r-headers_out, Set-Cookie, co);
apr_table_merge(r-headers_out, Set-Cookie, co1);

is it right?

What are the differences between the two approches? browser 
compatibility?

Best regards

Marco


Whether to merge or add

http://apr.apache.org/docs/apr/1.3/group__apr__tables.html

depends on whether you need the various (header) values to get 
concatenated with ,  in between and the header send only once, or 
you want the headers multiple times, each time with a different value.


What's right depends on the spec that defines the header. Set-Cookie 
requires the header once for each cookie to set.


Regards,

Rainer







load mod_php.so for each child separately

2009-03-26 Thread Andrej van der Zee
Hi,

If I am correct, on Linux all childs in MPM prefork share the same
mod_php.so which is loaded in the parent process. Is there a way to
load mod_php.so separately for each forked child? Can I force such a
thing in httpd.conf or maybe in the child_init() hook in a module?

Cheers,
Andrej


Writing CPP Modules (or C, but using CPP libraries)

2009-03-26 Thread Erik Westland

Is there a prescribed method for writing CPP Modules (or C, but use CPP 
libraries)? 

I followed Zachary Miller's Cookbook for writing C++ modules 
(http://www.zarfmouse.us/apache-cplusplus/), but it is somewhat dated and 
wasn't as clean as I would have hoped.

I found mod_cplusplus (http://modcplusplus.sourceforge.net/) - module to 
facilitate writing C++ modules/filters. It hasn't been updated since early 
2007, so I'm not sure if it mature/stable.

Thoughts?

Thanks,
Erik



  


HTTP pipelining in keep-alive requests

2009-03-26 Thread Andrea Martino

Hi all,

For a small project I'm working on (a Java-UPNP server) I'm trying to replicate 
some Apache functions, and there is one I can't figure out on my own (I looked 
at the code but I didn't understand how it works).

Let's assume the httpd receives the following pipelined requests (WITHOUT 
content-lenght header):

|-- from here --|
POST /endpoint HTTP/1.1
User-Agent: Xenon
Connection: Keep-alive
Host:192.168.1.40

soapbla bla bla/soapGET /description HTTP/1.1
User-Agent: Xenon
Connection: Keep-alive
Host:192.168.1.40

|-- to here --|

I noticed that somehow the webserver is able to detect the second request, even 
if theoretically the second get could be part of the first put, how does it 
work? How does apache figure out when the first PUT is complete? Does apache 
consider new lines, new packets, or delays? Or does it only consider the socket 
content?

Thanks a lot for everything that could help me duplicate this... ;-)
Andrea



  


Re: HTTP pipelining in keep-alive requests

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 07:32, Andrea Martino wrote:
 Hi all,
 
 For a small project I'm working on (a Java-UPNP server) I'm trying to 
 replicate some Apache functions, and there is one I can't figure out on my 
 own (I looked at the code but I didn't understand how it works).
 
 Let's assume the httpd receives the following pipelined requests (WITHOUT 
 content-lenght header):
 
 |-- from here --|
 POST /endpoint HTTP/1.1
 User-Agent: Xenon
 Connection: Keep-alive
 Host:192.168.1.40
 
 soapbla bla bla/soapGET /description HTTP/1.1
 User-Agent: Xenon
 Connection: Keep-alive
 Host:192.168.1.40
 
 |-- to here --|
 
 I noticed that somehow the webserver is able to detect the second request,
 even if theoretically the second get could be part of the first put, how does
 it work? How does apache figure out when the first PUT is complete? Does 
 apache
 consider new lines, new packets, or delays? Or does it only consider the
socket content?

It does not. Your request is invalid. Either you need to provide a
content-length header for the length of your your request body or you
need to send it in chunked encoding.

Regards

Rüdiger



Re: HTTP pipelining in keep-alive requests

2009-03-26 Thread Andrea Martino

Hi Rüdiger,
I understand the request is not correct, but httpd answers anyway (at least the 
version installed on my pc):

To the previous request, my httpd answers as following:

|-- from here --|
HTTP/1.1 404 Not Found
Date: Thu, 26 Mar 2009 07:09:17 GMT
Server: Apache/2.2.11 (Win32) PHP/5.2.9
Content-Length: 206
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title404 Not Found/title
/headbody
h1Not Found/h1
pThe requested URL /endpoint was not found on this server./p
/body/html
HTTP/1.1 400 Bad Request
Date: Thu, 26 Mar 2009 07:09:17 GMT
Server: Apache/2.2.11 (Win32) PHP/5.2.9
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title400 Bad Request/title
/headbody
h1Bad Request/h1
pYour browser sent a request that this server could not understand.br /
/p
/body/html
|-- to here --|

As you can see, httpd detects the second request, even if it answers with 400 
Bad Request.

Thanks
Andrea



- Original Message 
From: Ruediger Pluem rpl...@apache.org
To: dev@httpd.apache.org
Sent: Thursday, March 26, 2009 7:57:47 AM
Subject: Re: HTTP pipelining in keep-alive requests

On 26.03.2009 07:32, Andrea Martino wrote:
 Hi all,
 
 For a small project I'm working on (a Java-UPNP server) I'm trying to 
 replicate some Apache functions, and there is one I can't figure out on my 
 own (I looked at the code but I didn't understand how it works).
 
 Let's assume the httpd receives the following pipelined requests (WITHOUT 
 content-lenght header):
 
 |-- from here --|
 POST /endpoint HTTP/1.1
 User-Agent: Xenon
 Connection: Keep-alive
 Host:192.168.1.40
 
 soapbla bla bla/soapGET /description HTTP/1.1
 User-Agent: Xenon
 Connection: Keep-alive
 Host:192.168.1.40
 
 |-- to here --|
 
 I noticed that somehow the webserver is able to detect the second request,
 even if theoretically the second get could be part of the first put, how does
 it work? How does apache figure out when the first PUT is complete? Does 
 apache
 consider new lines, new packets, or delays? Or does it only consider the
socket content?

It does not. Your request is invalid. Either you need to provide a
content-length header for the length of your your request body or you
need to send it in chunked encoding.

Regards

Rüdiger


  


Re: HTTP pipelining in keep-alive requests

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 08:11, Andrea Martino wrote:
 Hi Rüdiger,
 I understand the request is not correct, but httpd answers anyway (at least 
 the version installed on my pc):

What is the output of the error log and the access log?
Which version do you use?
What is the Timeout setting on your server?
Do you sent both request in one go or is there a pause time between both?
If yes how long?

Regards

Rüdiger



Re: current status of loadable MPM changes

2009-03-26 Thread Jeff Trawick
On Wed, Mar 25, 2009 at 8:53 PM, Nick Kew n...@webthing.com wrote:


 On 24 Mar 2009, at 21:45, Jeff Trawick wrote:

  something I'm in a relative hurry to get feedback on is this part:

 2. retain data

   How can MPMs retain data across unload of the DSO?
 s-process-server_pool userdata
   won't work as-is because there's no server_rec in the pre_config hook.


 Is there a need for an API here?  As opposed to the MPM working with
 its own file-scope static variables, for instance?


File-scope static variables don't work for DSOs (for data retained across
unload/reload) since the variables are re-instantiated at reload.

That led to the following idiom in quite a few modules:

const char *userdata_key = rewrite_init_module;

apr_pool_userdata_get(data, userdata_key, s-process-pool);
if (!data) {
first_time = 1;
apr_pool_userdata_set((const void *)1, userdata_key,
  apr_pool_cleanup_null, s-process-pool);
}

(This is a simple use with just a flag.)

That's more gory than it needs to be, and MPMs needed this capability in the
pre-config hook, when there is no s-process-pool; hence the need for a
change.




   Proposal: Add ap_set_retained_data(key, value),
 ap_get_retained_data(key) APIs
 (implementation detail: it will set/get userdata on pglobal)

 Although not necessary, provide ap_get_config_count()
 (better name!) to
 indicate how many passes of config have completed.  (The
 interface could be
 a global variable, but some third-party module would
 inevitably clear it.)


 Looks fine, if there is indeed a need for it.


Cool...  Note that the final (working) interface is a bit different, where
ap_set_retained_data takes key + length, allocates the space, and returns
the address to the caller.


Re: HTTP pipelining in keep-alive requests

2009-03-26 Thread Andrea Martino

The output log contains the following:

[Thu Mar 26 08:09:17 2009] [error] [client 192.168.1.50] File does not exist: 
C:/Programmi/Apache Software Foundation/Apache2.2/htdocs/endpoint
[Thu Mar 26 08:09:17 2009] [error] [client 192.168.1.50] Invalid URI in request 
soapbla bla bla/soapGET /description HTTP/1.1

The access log:

192.168.1.50 - - [26/Mar/2009:08:09:17 +0100] POST /endpoint HTTP/1.1 404 206
192.168.1.50 - - [26/Mar/2009:08:09:17 +0100] soapbla bla bla/soapGET 
/description HTTP/1.1 400 226

The server is Apache/2.2.11 (Win32) PHP/5.2.9 (taken from the HTTP header in 
the response)

The 2 requests are sent together, very likely withing the same IP packet... In 
Java I did:

String request = POST /   soapxxx/soapGET / HTTP ;
outputStream.write(request.getBytes());
outputStream.flush();


This behaviour really puzzles me... ;-)

Thanks again
Andrea



- Original Message 
From: Ruediger Pluem rpl...@apache.org
To: dev@httpd.apache.org
Sent: Thursday, March 26, 2009 8:28:55 AM
Subject: Re: HTTP pipelining in keep-alive requests

On 26.03.2009 08:11, Andrea Martino wrote:
 Hi Rüdiger,
 I understand the request is not correct, but httpd answers anyway (at least 
 the version installed on my pc):

What is the output of the error log and the access log?
Which version do you use?
What is the Timeout setting on your server?
Do you sent both request in one go or is there a pause time between both?
If yes how long?

Regards

Rüdiger





criteria for axing MPMs from the tree

2009-03-26 Thread Jeff Trawick
[  ] MPM from trunk wouldn't build/serve a page on Linux prior to changes
for MPM DSO support[  ] MPM from last 2.2.x release wouldn't build/serve a
page on Linux
[  ] Brad/Brian/David speak up regarding the several non-Unix MPMs
[  ] ???

If somebody is actively using something besides (WinNT, prefork, worker,
event, simple), I'm very happy to make the changes required by the MPM DSO
support, but I don't want to waste my time (supposedly there are some things
to see in Amsterdam!).

Generally, nobody should be wasting their time on the little MPM museum we
have.

-- 
Born in Roswell... married an alien...


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 09:04, Jeff Trawick wrote:
 [  ] MPM from trunk wouldn't build/serve a page on Linux prior to changes
 for MPM DSO support[  ] MPM from last 2.2.x release wouldn't build/serve a
 page on Linux
 [  ] Brad/Brian/David speak up regarding the several non-Unix MPMs
 [  ] ???
 
 If somebody is actively using something besides (WinNT, prefork, worker,
 event, simple), I'm very happy to make the changes required by the MPM DSO
 support, but I don't want to waste my time (supposedly there are some things
 to see in Amsterdam!).
 
 Generally, nobody should be wasting their time on the little MPM museum we
 have.
 

We should axe

leader
perchild
threadpool

immediately in trunk as IMHO they are not maintained for years.
I am not quite sure how much care the platform specific MPMs for OS2 and
BEOS get. Novell seems to be still maintained by Brad.
Plus we should promote event from experimental to a regular one.

Regards

Rüdiger



Re: criteria for axing MPMs from the tree

2009-03-26 Thread Paul Querna
On Thu, Mar 26, 2009 at 9:18 AM, Ruediger Pluem rpl...@apache.org wrote:
 We should axe

 leader
 perchild
 threadpool

 immediately in trunk as IMHO they are not maintained for years.
 I am not quite sure how much care the platform specific MPMs for OS2 and
 BEOS get. Novell seems to be still maintained by Brad.
 Plus we should promote event from experimental to a regular one.

+1 to all of this.

Although, I think we should/could axe the BeOS MPM, i've not heard of
anyone using or maintaining it for years.


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Nick Kew


On 26 Mar 2009, at 08:18, Ruediger Pluem wrote:


We should axe

leader
perchild
threadpool


Criterion: those MPMs that pre-date 2.2 but are not included in it
need to be shoved away in a dusty attic.

Looks like the above list.

--
Nick Kew


Re: Set-Cookie

2009-03-26 Thread Marco Spinetti

Ok, I have to use apr_table_add instead od apr_table_set.
So I should write:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);

If I write:

apr_table_set(r-headers_out, Set-Cookie, co);
apr_table_merge(r-headers_out, Set-Cookie, co1);

is it right?

What are the differences between the two approches? browser compatibility?
Best regards

Marco

Sorin Manolache ha scritto:

On Thu, Mar 26, 2009 at 09:37, Marco Spinetti m.spine...@pisa.iol.it wrote:
  

I have a doubt about ho to set multiple cookies.
I'm using apache 2.2 and in my module handler I'm trying to set two
different cookies with:

apr_table_set(r-headers_out, Set-Cookie, co);

apr_table_set(r-headers_out, Set-Cookie, co1);

It seems that the second instruction override the first one.
So my question: how can I set two cookies in my module?



apr_table_addn(r-headers_out, Set-Cookie, cookie);


  




Re: criteria for axing MPMs from the tree

2009-03-26 Thread Justin Erenkrantz
2009/3/26 Ruediger Pluem rpl...@apache.org:
 We should axe

 leader
 perchild
 threadpool

 immediately in trunk as IMHO they are not maintained for years.

+1.  -- justin


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Jeff Trawick
On Thu, Mar 26, 2009 at 11:04 AM, Justin Erenkrantz
jus...@erenkrantz.comwrote:

 2009/3/26 Ruediger Pluem rpl...@apache.org:
  We should axe
 
  leader
  perchild
  threadpool
 
  immediately in trunk as IMHO they are not maintained for years.

 +1.  -- justin


I'm working on removing these three; the task consists mostly of pruning
bits and pieces out of various files.


Re: Set-Cookie

2009-03-26 Thread Rainer Jung

On 26.03.2009 10:07, Marco Spinetti wrote:

Ok, I have to use apr_table_add instead od apr_table_set.
So I should write:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);

If I write:

apr_table_set(r-headers_out, Set-Cookie, co);
apr_table_merge(r-headers_out, Set-Cookie, co1);

is it right?

What are the differences between the two approches? browser compatibility?
Best regards

Marco


Whether to merge or add

http://apr.apache.org/docs/apr/1.3/group__apr__tables.html

depends on whether you need the various (header) values to get 
concatenated with ,  in between and the header send only once, or you 
want the headers multiple times, each time with a different value.


What's right depends on the spec that defines the header. Set-Cookie 
requires the header once for each cookie to set.


Regards,

Rainer




Re: criteria for axing MPMs from the tree

2009-03-26 Thread Jim Jagielski


On Mar 26, 2009, at 4:18 AM, Ruediger Pluem wrote:


On 26.03.2009 09:04, Jeff Trawick wrote:
[  ] MPM from trunk wouldn't build/serve a page on Linux prior to  
changes
for MPM DSO support[  ] MPM from last 2.2.x release wouldn't build/ 
serve a

page on Linux
[  ] Brad/Brian/David speak up regarding the several non-Unix MPMs
[  ] ???

If somebody is actively using something besides (WinNT, prefork,  
worker,
event, simple), I'm very happy to make the changes required by the  
MPM DSO
support, but I don't want to waste my time (supposedly there are  
some things

to see in Amsterdam!).

Generally, nobody should be wasting their time on the little MPM  
museum we

have.



We should axe

leader
perchild
threadpool



+1



Re: svn commit: r758597 - /httpd/httpd/trunk/server/mpm/config.m4

2009-03-26 Thread Paul Querna
As much as i would like to use simple, I don't think its quite ready
yet (time/patches welcome!).

I think the default should be event for the time being.

2009/3/26  j...@apache.org:
 Author: jim
 Date: Thu Mar 26 11:09:33 2009
 New Revision: 758597

 URL: http://svn.apache.org/viewvc?rev=758597view=rev
 Log:
 prefork is soo 1990s. make new default simple

 Modified:
    httpd/httpd/trunk/server/mpm/config.m4

 Modified: httpd/httpd/trunk/server/mpm/config.m4
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config.m4?rev=758597r1=758596r2=758597view=diff
 ==
 --- httpd/httpd/trunk/server/mpm/config.m4 (original)
 +++ httpd/httpd/trunk/server/mpm/config.m4 Thu Mar 26 11:09:33 2009
 @@ -7,7 +7,7 @@
   APACHE_MPM=$withval
  ],[
   if test x$APACHE_MPM = x; then
 -    APACHE_MPM=prefork
 +    APACHE_MPM=simple
   fi
  ])
  AC_MSG_RESULT($APACHE_MPM)





Re: svn commit: r758597 - /httpd/httpd/trunk/server/mpm/config.m4

2009-03-26 Thread Justin Erenkrantz
On Thu, Mar 26, 2009 at 1:00 PM, Paul Querna p...@querna.org wrote:
 I think the default should be event for the time being.

+1.  -- justin


moving event out of experimental

2009-03-26 Thread trawick

anyone opposed?

this is just svn move experimental/event . and svn delete experimental,  
right? (as well as fixing the other dangling bits, checking if  
documentation is in order, etc.)


Re: svn commit: r758597 - /httpd/httpd/trunk/server/mpm/config.m4

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 13:25, Justin Erenkrantz wrote:
 On Thu, Mar 26, 2009 at 1:00 PM, Paul Querna p...@querna.org wrote:
 I think the default should be event for the time being.
 
 +1.  -- justin
 
 

+1.

Regards

Rüdiger


Re: svn commit: r758597 - /httpd/httpd/trunk/server/mpm/config.m4

2009-03-26 Thread Rainer Jung

On 26.03.2009 13:25, Justin Erenkrantz wrote:

On Thu, Mar 26, 2009 at 1:00 PM, Paul Quernap...@querna.org  wrote:

I think the default should be event for the time being.


+1

Rainer



Re: Re: criteria for axing MPMs from the tree

2009-03-26 Thread trawick

On Mar 26, 2009 11:49am, Jim Jagielski j...@jagunet.com wrote:



On Mar 26, 2009, at 4:18 AM, Ruediger Pluem wrote:






On 26.03.2009 09:04, Jeff Trawick wrote:




[ ] MPM from trunk wouldn't build/serve a page on Linux prior to changes



for MPM DSO support[ ] MPM from last 2.2.x release wouldn't build/serve a



page on Linux



[ ] Brad/Brian/David speak up regarding the several non-Unix MPMs



[ ] ???





If somebody is actively using something besides (WinNT, prefork, worker,



event, simple), I'm very happy to make the changes required by the MPM DSO


support, but I don't want to waste my time (supposedly there are some  
things



to see in Amsterdam!).





Generally, nobody should be wasting their time on the little MPM museum we



have.








We should axe





leader



perchild



threadpool








+1


Those three are now gone.

In the 2.2.x CHANGES file there is no mention of BeOS or OS/2 (or OS2 for  
that matter). I think those two MPMs should be removed.


* In early 2.2.x at least, somebody was maintaining Netware; I imagine that  
2.2.x still works fine.
* The last BeOS-specific MPM change I can find was in 2004  
(http://svn.apache.org/viewvc?view=revrevision=102941).
* The last OS/2-specific MPM change I can find was in 2003  
(http://svn.apache.org/viewvc?view=revrevision=101826).


Votes:

[ ] yank BeOS MPM from trunk
[ ] yank OS/2 MPM from trunk

(I'm +1 on both votes)


Re: Set-Cookie

2009-03-26 Thread Joe Lewis

Marco Spinetti wrote:

Thanks very much.
So I have to use:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);


Rather than playing with a proxy or fireway gateway that could remove 
one of your set cookie headers (because you have multiple), you may want 
to combine the cookies into one.  See the Message Headers section for 
more information :


http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

Joe


Best regards.

Marco

Rainer Jung ha scritto:

On 26.03.2009 10:07, Marco Spinetti wrote:

Ok, I have to use apr_table_add instead od apr_table_set.
So I should write:

apr_table_add(r-headers_out, Set-Cookie, co);
apr_table_add(r-headers_out, Set-Cookie, co1);

If I write:

apr_table_set(r-headers_out, Set-Cookie, co);
apr_table_merge(r-headers_out, Set-Cookie, co1);

is it right?

What are the differences between the two approches? browser 
compatibility?

Best regards

Marco


Whether to merge or add

http://apr.apache.org/docs/apr/1.3/group__apr__tables.html

depends on whether you need the various (header) values to get 
concatenated with ,  in between and the header send only once, or 
you want the headers multiple times, each time with a different value.


What's right depends on the spec that defines the header. Set-Cookie 
requires the header once for each cookie to set.


Regards,

Rainer








--
Joe Lewis
Chief Nerd  SILVERHAWK http://www.silverhawk.net/   (801) 660-1900


/If gun laws in fact worked% the sponsors of this type of legislation 
should have no difficulty drawing upon long lists of examples of crime 
rates reduced by such legislation. That they cannot do so after a 
century and a half of trying--that they must sweep under the rug the 
southern attempts at gun control in the 1870-1910 period% the 
northeastern attempts in the 1920-1939 period% the attempts at both 
Federal and State levels in 1965-1976--establishes the repeated% 
complete and inevitable failure of gun laws to control serious crime.
   --Senator Orrin Hatch% Chairman% Senate Judiciary Committee 
Subcommittee on the Constitution% 97th Cong.% 2d Sess.% The Right to 
Keep and Bear Arms% Committee Print I-IX% 1-23 (1982)./


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 15:36, traw...@gmail.com wrote:
 
 Votes:
 
 [ ] yank BeOS MPM from trunk
 [ ] yank OS/2 MPM from trunk
 
 (I'm +1 on both votes)
 

+1 on both. The stay in svn and can resurrect if somebody really cares.

Regards

Rüdiger



Re: HTTP pipelining in keep-alive requests

2009-03-26 Thread Ronald Park
It looks like it's interpreting the whole 'soapbla bla bla/soapGET' as
the method for the second request.  Is there a two or three sets of  '/r/n'
(or just '/n' in Windows?) after the header in the first message; if three,
perhaps it's interpreting the first message as a POST with no body?

Ron

On Thu, Mar 26, 2009 at 3:52 AM, Andrea Martino ciacc...@yahoo.com wrote:


 The output log contains the following:

 [Thu Mar 26 08:09:17 2009] [error] [client 192.168.1.50] File does not
 exist: C:/Programmi/Apache Software Foundation/Apache2.2/htdocs/endpoint
 [Thu Mar 26 08:09:17 2009] [error] [client 192.168.1.50] Invalid URI in
 request soapbla bla bla/soapGET /description HTTP/1.1

 The access log:

 192.168.1.50 - - [26/Mar/2009:08:09:17 +0100] POST /endpoint HTTP/1.1 404
 206
 192.168.1.50 - - [26/Mar/2009:08:09:17 +0100] soapbla bla bla/soapGET
 /description HTTP/1.1 400 226

 The server is Apache/2.2.11 (Win32) PHP/5.2.9 (taken from the HTTP header
 in the response)

 The 2 requests are sent together, very likely withing the same IP packet...
 In Java I did:

 String request = POST /   soapxxx/soapGET / HTTP ;
 outputStream.write(request.getBytes());
 outputStream.flush();


 This behaviour really puzzles me... ;-)

 Thanks again
 Andrea



 - Original Message 
 From: Ruediger Pluem rpl...@apache.org
 To: dev@httpd.apache.org
 Sent: Thursday, March 26, 2009 8:28:55 AM
 Subject: Re: HTTP pipelining in keep-alive requests

 On 26.03.2009 08:11, Andrea Martino wrote:
  Hi Rüdiger,
  I understand the request is not correct, but httpd answers anyway (at
 least the version installed on my pc):

 What is the output of the error log and the access log?
 Which version do you use?
 What is the Timeout setting on your server?
 Do you sent both request in one go or is there a pause time between both?
 If yes how long?

 Regards

 Rüdiger






-- 
Principal Software Engineer for Hire
http://www.linkedin.com/in/ronaldparkjr


Re: criteria for axing MPMs from the tree

2009-03-26 Thread William A. Rowe, Jr.

traw...@gmail.com wrote:


Votes:

[+1] yank BeOS MPM from trunk
[+1] yank OS/2 MPM from trunk


and for completeness
  [+1] yank Netware from trunk

Netware is 'done' - surely some will use it for another 5 years
but not for 'new software'.  Their 2.2 build is sufficient IMHO.

A totally separate vote/discussion is required on d...@apr.


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Brad Nicholes
 On 3/26/2009 at 11:14 AM, in message 49cbb7d9.80...@rowe-clan.net, 
 William
A. Rowe, Jr. wr...@rowe-clan.net wrote:
 traw...@gmail.com wrote:
 
 Votes:
 
 [+1] yank BeOS MPM from trunk
 [+1] yank OS/2 MPM from trunk
 
 and for completeness
[+1] yank Netware from trunk
 
 Netware is 'done' - surely some will use it for another 5 years
 but not for 'new software'.  Their 2.2 build is sufficient IMHO.
 
 A totally separate vote/discussion is required on d...@apr.

FWIW, netware still builds and runs in trunk.  If you yank the MPM, then I 
guess netware really will be done. :(

Brad



Re: criteria for axing MPMs from the tree

2009-03-26 Thread Jeff Trawick
On Thu, Mar 26, 2009 at 6:55 PM, Brad Nicholes bnicho...@novell.com wrote:

  On 3/26/2009 at 11:14 AM, in message 49cbb7d9.80...@rowe-clan.net,
 William
 A. Rowe, Jr. wr...@rowe-clan.net wrote:
  traw...@gmail.com wrote:
 
  Votes:
 
  [+1] yank BeOS MPM from trunk
  [+1] yank OS/2 MPM from trunk
 
  and for completeness
 [+1] yank Netware from trunk
 
  Netware is 'done' - surely some will use it for another 5 years
  but not for 'new software'.  Their 2.2 build is sufficient IMHO.
 
  A totally separate vote/discussion is required on d...@apr.

 FWIW, netware still builds and runs in trunk.


That's good enough for me (though I guess you haven't tried in a couple of
days ;) ).  I'll add in the changes to work with the new MPM interface that
allows DSO MPMs.


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Brad Nicholes
 On 3/26/2009 at 11:55 AM, in message
49cb6d2b02ac0003c...@lucius.provo.novell.com, Brad Nicholes
bnicho...@novell.com wrote:
 On 3/26/2009 at 11:14 AM, in message 49cbb7d9.80...@rowe-clan.net, 
 William
 A. Rowe, Jr. wr...@rowe-clan.net wrote:
 traw...@gmail.com wrote:
 
 Votes:
 
 [+1] yank BeOS MPM from trunk
 [+1] yank OS/2 MPM from trunk
 
 and for completeness
[+1] yank Netware from trunk
 
 Netware is 'done' - surely some will use it for another 5 years
 but not for 'new software'.  Their 2.2 build is sufficient IMHO.
 
 A totally separate vote/discussion is required on d...@apr.
 
 FWIW, netware still builds and runs in trunk.  If you yank the MPM, then I 
 guess netware really will be done. :(
 

Just to follow up.  Apache 2.0.x for NetWare is the only version that is still 
shipping on the NetWare platform.  I am not sure if anybody is really using 
Apache 2.2.x for NetWare or not.  I expect that there are a few loyal NetWare 
fans out there that upgraded to 2.2 on there own.  Apache 2.3.x and beyond, no 
plans to use it, ship it and I can only really maintain it to make sure that 
things still build and appear to run correctly.  So basically, if you all 
decide to pull the NetWare MPM, then I guess I don't have to worry about 
maintaining apache for NetWare beyond 2.2.x.

Brad



Re: criteria for axing MPMs from the tree

2009-03-26 Thread Jeff Trawick
On Thu, Mar 26, 2009 at 7:05 PM, Brad Nicholes bnicho...@novell.com wrote:

  On 3/26/2009 at 11:55 AM, in message
 49cb6d2b02ac0003c...@lucius.provo.novell.com, Brad Nicholes
 bnicho...@novell.com wrote:
  On 3/26/2009 at 11:14 AM, in message 49cbb7d9.80...@rowe-clan.net,
 William
  A. Rowe, Jr. wr...@rowe-clan.net wrote:
  traw...@gmail.com wrote:
 
  Votes:
 
  [+1] yank BeOS MPM from trunk
  [+1] yank OS/2 MPM from trunk
 
  and for completeness
 [+1] yank Netware from trunk
 
  Netware is 'done' - surely some will use it for another 5 years
  but not for 'new software'.  Their 2.2 build is sufficient IMHO.
 
  A totally separate vote/discussion is required on d...@apr.
 
  FWIW, netware still builds and runs in trunk.  If you yank the MPM, then
 I
  guess netware really will be done. :(
 

 Just to follow up.  Apache 2.0.x for NetWare is the only version that is
 still shipping on the NetWare platform.  I am not sure if anybody is really
 using Apache 2.2.x for NetWare or not.  I expect that there are a few loyal
 NetWare fans out there that upgraded to 2.2 on there own.  Apache 2.3.x and
 beyond, no plans to use it, ship it and I can only really maintain it to
 make sure that things still build and appear to run correctly.  So
 basically, if you all decide to pull the NetWare MPM, then I guess I don't
 have to worry about maintaining apache for NetWare beyond 2.2.x.


You pull the trigger then ;)




-- 
Born in Roswell... married an alien...


Re: criteria for axing MPMs from the tree

2009-03-26 Thread Brad Nicholes
 On 3/26/2009 at 12:07 PM, in message
cc67648e0903261107l1302f629k95494e01834c6...@mail.gmail.com, Jeff Trawick
traw...@gmail.com wrote:
 On Thu, Mar 26, 2009 at 7:05 PM, Brad Nicholes bnicho...@novell.com wrote:
 
  On 3/26/2009 at 11:55 AM, in message
 49cb6d2b02ac0003c...@lucius.provo.novell.com, Brad Nicholes
 bnicho...@novell.com wrote:
  On 3/26/2009 at 11:14 AM, in message 49cbb7d9.80...@rowe-clan.net,
 William
  A. Rowe, Jr. wr...@rowe-clan.net wrote:
  traw...@gmail.com wrote:
 
  Votes:
 
  [+1] yank BeOS MPM from trunk
  [+1] yank OS/2 MPM from trunk
 
  and for completeness
 [+1] yank Netware from trunk
 
  Netware is 'done' - surely some will use it for another 5 years
  but not for 'new software'.  Their 2.2 build is sufficient IMHO.
 
  A totally separate vote/discussion is required on d...@apr.
 
  FWIW, netware still builds and runs in trunk.  If you yank the MPM, then
 I
  guess netware really will be done. :(
 

 Just to follow up.  Apache 2.0.x for NetWare is the only version that is
 still shipping on the NetWare platform.  I am not sure if anybody is really
 using Apache 2.2.x for NetWare or not.  I expect that there are a few loyal
 NetWare fans out there that upgraded to 2.2 on there own.  Apache 2.3.x and
 beyond, no plans to use it, ship it and I can only really maintain it to
 make sure that things still build and appear to run correctly.  So
 basically, if you all decide to pull the NetWare MPM, then I guess I don't
 have to worry about maintaining apache for NetWare beyond 2.2.x.
 
 
 You pull the trigger then ;)
 
 
 

Pull it.  

It's been a good run and I really had a lot of fun porting and maintaining 
Apache for NetWare.  But I guess it's time to say goodbye (to Apache for 
NetWare, not me ;)  I will try to hang around and maintain the older versions, 
if anything needs to be maintained.  If there is anything that comes up with 
Apache for the Linux platform that I can help with, I will certainly do my 
best.  But I guess going forward, if Apache for NetWare ever becomes relevant 
again, I'll just pick it up and port it like I did before.  But I really don't 
see that happening.  

Brad




Re: [PATCH] mod_dbd with more than one pool

2009-03-26 Thread Chris Darroch

Ronald Park wrote:

I did have one minor nit to pick with the implementation of the 
DBDInitSQL command.  A user might presume that the order of commands 
listed in the config file would be preserved when the commands are run.  
By using a hash table, you'll likely get a random order causing 
problems.  For example, perhaps the user needs to first load one table 
then choose a subset from that first table to file another; if you run 
them in the reserve order, the second table will likely be empty. :(


  Thanks for the comment -- noted in PR #46827.

Chris.

--
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B



Re: criteria for axing MPMs from the tree

2009-03-26 Thread Ruediger Pluem
On 26.03.2009 19:25, Brad Nicholes wrote:

 
 Pull it.  
 
 It's been a good run and I really had a lot of fun porting and maintaining 
 Apache for NetWare.
 But I guess it's time to say goodbye (to Apache for NetWare, not me ;)  I will
try to hang
 around and maintain the older versions, if anything needs to be maintained.
If there is anything
 that comes up with Apache for the Linux platform that I can help with, I will
certainly do my best.
 But I guess going forward, if Apache for NetWare ever becomes relevant again,
I'll just pick it
 up and port it like I did before.  But I really don't see that happening.

Whichever way this goes, a big thanks for all your work on Netware.

Regards

Rüdiger



mod_lua: package.loaded == apache2 (bug)

2009-03-26 Thread Peter Cawley
The function apl_load_apache2_lmodule, which is meant to load the
apache2 library is flawed in that it loads the library into the
package.loaded table and sets this as the global apache2. It should
load it into a new table, and set this as the global apache2 and
package.loaded.apache2. What follows is a small test script which
shows this (all tests _should_ pass, but most of the apache2 ones do
not). Also attached is a patch which fixes this.

 begin code sample 
function handle(req)
  local function assert(test)
local status = loadstring('return '.. test)()
req:write(test ..': '.. (status and pass or FAIL) ..'\n')
  end

  -- control tests
  assert [[string == require string]]
  assert package.loaded.math == math

  -- apache2 tests
  assert [[apache2 == require apache2]]
  assert package.loaded.apache2 == apache2
  assert package.loaded ~= apache2
  assert apache2.apache2 == nil
  assert apache2.OK ~= nil
  assert package.loaded.apache2.OK ~= nil
end
 end code sample 


package_loaded_apache2.patch
Description: Binary data


Re: [Problem] Not able to Link APR to my programs

2009-03-26 Thread SAMEER KUMAR
Well thnx guys...

I tried, as proposed by various users and developers in response to my
 query, using the -Ipath of apr-$installedversion-config. That too did not
 work. Finally I managed to serve my purpose using gcc command, executing
 apr-$installedversion-config file (ie apr-1-config installed in
 /usr/local/apr/bin in my case). I use this file to print the options
 required for complition using APR library.

Lately I realized that, I have mistaken your advice being a novice.

Here is a snapshot of what I used:



 *[r...@a104cc-user86 bin]# gcc $(./apr-1-config --includes)
 $(./apr-1-config --libs) $(./apr-1-config --link-ld) $(./apr-1-config
 --cflags) $(./apr-1-config --cppflags)  /cat.c
 *


You people suggested to add same thing, what i have added to my command (but
in a bit different way)...

Nick Kew wrote an excellent book on Apache 2 modules; the old Writing
 Apache Modules in Perl and C is still somewhat relevant as well.


I would like to know if some one can help me with material on programming
with APR.

Thnx alot guys...

Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: sameer.kasi2...@gmail.com
  05bce...@nirmauni.ac.in
Phone: +919375220396


Re: [Problem] Not able to Link APR to my programs

2009-03-26 Thread Jens Frey

Well thnx guys...
I tried, as proposed by various users and developers in response to  
my query, using the -Ipath of apr-$installedversion-config. That  
too did not work. Finally I managed to serve my purpose using gcc  
command, executing apr-$installedversion-config file (ie apr-1- 
config installed in /usr/local/apr/bin in my case). I use this file  
to print the options required for complition using APR library.

Lately I realized that, I have mistaken your advice being a novice.

Here is a snapshot of what I used:

[r...@a104cc-user86 bin]# gcc $(./apr-1-config --includes) $(./apr-1- 
config --libs) $(./apr-1-config --link-ld) $(./apr-1-config -- 
cflags) $(./apr-1-config --cppflags)  /cat.c

Maybe that works for you? I could not find the previous post

$ export APR_LIBS=`apr-1-config --cflags --cppflags --includes -- 
ldflags --link-ld --libs`
$ export APU_LIBS=`apu-1-config --includes --ldflags --link-ld -- 
libs`

$ gcc $APR_LIBS $APU_LIBS srcFile.c -o prgName

You people suggested to add same thing, what i have added to my  
command (but in a bit different way)...


Nick Kew wrote an excellent book on Apache 2 modules; the old  
Writing Apache Modules in Perl and C is still somewhat relevant as  
well.


I would like to know if some one can help me with material on  
programming with APR.
Actually i copied the above from one of the writeups i did with APR on  
my blog. It's not much but maybe that helps you get started.


http://blogs.coffeecrew.org/blogs/datapile/tags/apr

Hope i could help,

Jens



Ideas for content-aware filter modules for 2.4

2009-03-26 Thread Nick Kew

Following the BoF, I'll put down a brief marker on-list on the
theme of content-awareness.  More when I'm back home
and not totally knackered.

We have handling of certain important encodings:
SSL and compression (albeit not quite bug-free) as
standard in current versions.  I'd be interested to
expand that with some new filter modules.

1.  Character Encoding.  We have very limited capability
in mod_charset_lite.  We can expand that to support
automatic detection of charset, and either setting a request
field or transforming to a selected charset.

We can also provide an API for modules to configure this,
in cases where more than one transformation is wanted.
A real-life use case for this is where users of libxml2-based
modules such as mod_proxy_html need to use charsets
other than utf-8, and particularly charsets that are not
supported by libxml2.

2.  Generic XML support.

In mod_xmlns, a SAX2 parser parses XML to a stream of
SAX events.  Events are keyed on namespace, and
application modules can register handlers for a namespace.

A good illustrative use case was my parser for the
ESI (Edge-side includes) namespace.  I've also used it
to generate HTML and RDF from a common source:
a task you might otherwise use XSLT for, at a much
higher performance cost.  I also hacked it to support
scripting and embedded SQL queries, but that's a
line I don't see as so interesting, because it gets us
into the territory of well-established alternatives
including PHP and JSP.

Joachim Zobel's mod_xml2 abstracts this further by
defining SAX event buckets (e.g. startElement bucket)
and passing them down the filter chain.  We could build
on the same approach to pass DOM or similar nodes as
buckets for applications like XSLT.

If we use expat for this, we avoid introducing any new
dependencies.

3.  Data type library.

Our filter architecture works well for tasks such as (some)
image processing.  I don't think that's something we want
to do too much of in core, but it might add something if
we provided some basics, such as encoding/decoding
of the regular Web image formats (gif/jpeg/png, and svg
using xmlns dispatch).  A similar approach might apply
more widely to other media.


I can contribute some of this from my existing work,
including relicensing where necessary.  That is,
if there's interest in adding some of these things
as standard in 2.4.

--
Nick Kew


Re: criteria for axing MPMs from the tree

2009-03-26 Thread William A. Rowe, Jr.

Ruediger Pluem wrote:


Whichever way this goes, a big thanks for all your work on Netware.


+1 and a huge 'wish you were here' Brad!!!

I'm not pushing to 'break' netware, but rather, deciding to do once it
is broken.  The situation is very similar to Wk2 and NT4SP6 which are
abandoned, but in theory might work for 90% of the cases.  Do we work
to preserve them, or work to recover them if we break them, or do we
truly bother either way?

Bill