You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by toni pérez <pl...@gmail.com> on 2006/09/08 16:23:46 UTC

[users@httpd] the request_rec structure in c plugins

hello list,

I'm building a C plugin for apache and, I need acces to the POST DATA
in the request.
I not found which structure contains the POST DATA in the request_rec structure.
There is the args field that contains the query string, but is for GET
method, I need the same for the POST method.

In the headers space there are the headers fields and the post data
that I need separated by 2 enters.

example capture by ethereal :

----------------------------------------------------------------------------------------------------
POST /ejemplo.html HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3)
Gecko/20060523 Ubuntu/dapper Firefox/1.5.0.3

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://localhost/ejemplo.html

Content-Type: text/plain

Content-Length: 51



name=yourname

mail=yourmail

comment=yourcomment

------------------------------------------------------------------------------------------------

How I can obtain the 3 fields (name,mail,comment) send by the form ?

thanks,

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] the request_rec structure in c plugins

Posted by Joshua Slive <jo...@slive.ca>.
On 9/8/06, toni pérez <pl...@gmail.com> wrote:
> hello list,
>
> I'm building a C plugin for apache and, I need acces to the POST DATA
> in the request.
> I not found which structure contains the POST DATA in the request_rec structure.
> There is the args field that contains the query string, but is for GET
> method, I need the same for the POST method.
>
> In the headers space there are the headers fields and the post data
> that I need separated by 2 enters.

Two links for you:

1. libapreq: http://httpd.apache.org/apreq/
Which is a set of support libraries/modules for building other apache
modules.  It includes some utilities for reading POST data.

2. Module authors list: http://httpd.apache.org/lists.html#modules-dev
For discussing how to write modules for apache httpd.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org