httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Young" <>
Subject Re: low level design
Date Wed, 30 Oct 2002 16:48:33 GMT
Hi all,
Thanks to all those who replied but it seems that it's not possible to
do what I need in Apache 1.3 -> I'll have to go to Apache 2.0 but
unfortunately PHP isn't ready for that yet!
It looks like Apache 1.3 reads a set amount from the client when a
request is made but sniffing the raw packets confirms that the client
has already sent ALL the POST headers to Apache. Apache just doesn't
read them all from the wire. This means that you can access at most the
first two POST vars without calling ap_should_client_block() - a nice
enhancement would be if Apache actually read up to EOF on the socket
which would mean it had all the POST vars in:
I'll just have to move to Apache 2.0!
Many thanks,

Alistair Young
Senior Applications Specialist
Sabhal Mòr Ostaig
An Teanga
An t-Eilean Sgitheanach
Alba  IV44 8RQ
Fòn:                    01471 888343
>>> 10/30/02 15:28 PM >>>
Hash: SHA1

On Wednesday 30 October 2002 11:46 am, Alistair Young wrote:
 >Hi all,
 >I have a request to the Apache dev people regarding POST data from a
 >client browser. I'm sure that getting data off the wire more than once
 >is out but I ran ngrep while submitting a form to my module and I
 >noticed that the entire page is sent to the server.
 >i.e. the incoming packets contained the HTTP headers (which Apache
 >stores) and the form variables (which it doesn't seem to store) 
why you say this?

- - to get
 >them you need to call ap_should_client_block(),
yes, it's right

 which seems a waste as
 >the data has already come over the wire to Apache with the original
 >request headers
data has already come over the wire; data is stored somewhere in
if you want access (but in read-only as no update api was provided) this
(client post parameters), you have to use ap_should_client_block(); who
wasting what?!?

 >If the form variables are coming in anyway, at the same time as the
 >request headers, does anyone know if Apache stores the form variables
 >some undocumented table somewhere?
yes sir! 

   if (ap_should_client_block(r)) {
		char *p=r->connection->client->inptr;

after calling ap_should_client_block(r), you can freely access post
pointing a char* to r->connection->client->inptr;
there are stored post parametrs, exactly what you are searching
BUT...this is true only for http; if you are using https, at that
address you 
will not find post parameters; to access them in https is very very
and i was not able to do it (sigh!)

 >If I can get access to the form variables at the header_handler phase
 >then we'll be cooking with gas and the semantic web will come to

now cook and send us the pie!

- -- 
Maurizio Marini
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


View raw message