You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Nicholas Bastin <ni...@gmail.com> on 2008/06/06 00:28:19 UTC
Common libraries/code for GET/POST handling?
I have a content handler that needs to do GET and POST processing of
significant amounts of data from web service clients. This code is
relatively straightfoward, but it also seems like code that has been
written hundreds of times before and probably in a more robust way
than I'll accomplish on my first try. Are there any libraries out
there or code snippets that do URI Query parsing into data structures
from GETs, and request processing into structures from POST data?
--
Nick
Re: Common libraries/code for GET/POST handling?
Posted by Nicholas Bastin <ni...@gmail.com>.
On Fri, Jun 6, 2008 at 4:27 PM, ed <ed...@s5h.net> wrote:
> I don't know if this is any use, but did you try it with a debugger and
> step through a monolithic request? Usually it helps quite a bit to do
> this.
It seems like apreq_params() was what I was looking for instead.
GETs, at least, are being handled properly now. Thanks for the help.
--
Nick
Re: Common libraries/code for GET/POST handling?
Posted by ed <ed...@s5h.net>.
On Fri, 6 Jun 2008 13:24:37 -0400
"Nicholas Bastin" <ni...@gmail.com> wrote:
> Is there any use-case documentation or example code for how to use
> this library? I call apreq_handle_apache2(r) followed by
> apreq_parse_query_string (r->pool, table, r->parsed_uri.query), and my
> apache blows up in my face. The reference documentation tells me what
> functions are available, but not how I'm supposed to string them
> together. There's a link to an example in the documentation, but that
> link is long dead.
I don't know if this is any use, but did you try it with a debugger and
step through a monolithic request? Usually it helps quite a bit to do
this.
Failing that, mod_perl might be a good direction to go in, and it's not
that much slower than a C module.
--
The CAT5 to Alderan is dying a slow death because of BobaFett.
Sun Microsystems is practising their rocket jump.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg.html
Re: Common libraries/code for GET/POST handling?
Posted by Nicholas Bastin <ni...@gmail.com>.
On Fri, Jun 6, 2008 at 6:10 AM, Chris Newman <ch...@floor51.com> wrote:
> Check libapreq:
>
> http://httpd.apache.org/apreq/
Is there any use-case documentation or example code for how to use
this library? I call apreq_handle_apache2(r) followed by
apreq_parse_query_string (r->pool, table, r->parsed_uri.query), and my
apache blows up in my face. The reference documentation tells me what
functions are available, but not how I'm supposed to string them
together. There's a link to an example in the documentation, but that
link is long dead.
--
Nick
Re: Common libraries/code for GET/POST handling?
Posted by Chris Newman <ch...@floor51.com>.
Hi Nick,
Nicholas Bastin wrote:
> I have a content handler that needs to do GET and POST processing of
> significant amounts of data from web service clients. This code is
> relatively straightfoward, but it also seems like code that has been
> written hundreds of times before and probably in a more robust way
> than I'll accomplish on my first try. Are there any libraries out
> there or code snippets that do URI Query parsing into data structures
> from GETs, and request processing into structures from POST data?
Check libapreq:
http://httpd.apache.org/apreq/
chris
>
> --
> Nick
>
>