oops - I meant to say "read up to Content-length from the socket" - that
would guarantee all the POST vars are available to modules that want to
peek at it without causing a 101 to be sent!
Cheers,
Alistair


Alistair Young
Senior Applications Specialist
Sabhal Mòr Ostaig
An Teanga
Slèite
An t-Eilean Sgitheanach
Alba  IV44 8RQ
UK
Fòn:                    01471 888343
Post-dealanach: [EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 10/30/02 17:00 PM >>>
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:
r->connection->client->inptr
I'll just have to move to Apache 2.0!
Many thanks,
Alistair


Alistair Young
Senior Applications Specialist
Sabhal Mòr Ostaig
An Teanga
Slèite
An t-Eilean Sgitheanach
Alba  IV44 8RQ
UK
Fòn:                    01471 888343
Post-dealanach: [EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 10/30/02 15:28 PM >>>
-----BEGIN PGP SIGNED MESSAGE-----
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
request_rec; 
if you want access (but in read-only as no update api was provided) this
data 
(client post parameters), you have to use ap_should_client_block(); who
is 
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
in
 >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
parameters 
pointing a char* to r->connection->client->inptr;
there are stored post parametrs, exactly what you are searching
for....BUT!!!
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
tricky 
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
 >Apache\PHP\Perl!

now cook and send us the pie!

- -- 
Maurizio Marini
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9v8dP4Q/49nIJTlwRAny8AJ4yMCnDbR82Yu4R0U4sW9KjK+KLqwCcCTOy
0pnyiRTlv7FKOiVFap354Yc=
=3L1Y
-----END PGP SIGNATURE-----


Reply via email to