Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Decoding HTTP requests

2 views
Skip to first unread message

Marc Balmer

unread,
Jul 20, 2011, 8:12:50 AM7/20/11
to
I am looking for code to decode HTTP PUT/GET/etc. requests, i.e.
breaking the request down to the variables that have been transmitted,
with proper (de)escaping etc., maybe with file upload capabilities.
Should be written in C and BSD/MIT licensed.

If you know of such a library, I'd be happy to learn of it.

(background: Trying to add RESTful services to httpd, using Lua to
handle the request. But I am missing the request decoding part)

tnx,
Marc

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Jochen Kunz

unread,
Jul 20, 2011, 10:41:17 AM7/20/11
to
On Wed, 20 Jul 2011 14:12:50 +0200
Marc Balmer <ma...@msys.ch> wrote:

> I am looking for code to decode HTTP PUT/GET/etc. requests, i.e.
> breaking the request down to the variables that have been transmitted,

Maybe you can cut somthing out of libhttpd.c:httpd_parse_request() from:
http://acme.com/software/thttpd/

Maybe worth a look also:
http://acme.com/software/micro_httpd/
http://acme.com/software/mini_httpd/
--


\end{Jochen}

\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}

Thor Lancelot Simon

unread,
Jul 21, 2011, 11:09:56 AM7/21/11
to
On Wed, Jul 20, 2011 at 02:12:50PM +0200, Marc Balmer wrote:
> I am looking for code to decode HTTP PUT/GET/etc. requests, i.e.
> breaking the request down to the variables that have been transmitted,
> with proper (de)escaping etc., maybe with file upload capabilities.
> Should be written in C and BSD/MIT licensed.
>
> If you know of such a library, I'd be happy to learn of it.
>
> (background: Trying to add RESTful services to httpd, using Lua to
> handle the request. But I am missing the request decoding part)

You might look at libevent, likely libevent 2.0. It grew a bunch of
that kind of stuff after we imported 1.4.

Thor

0 new messages