views:

206

answers:

7

What well known C/C++ libraries are out there that could allow one to implement servlets, or at least provide most of the essentials for dealing with HTTP/CGI protocols such as http headers, error codes, cookies, GET/POST etc.

So far I have only found CPPSERV.

EDIT: Looking for server side solutions.

+4  A: 

Here's one in C with ridiculous performance characteristics: ry's http-parser.

Matt Joiner
Now down to 40 bytes, how lucky we are that they fought to gain those 8 superfluous bytes oO
Matthieu M.
A: 

I would recommend looking at libcurl given curl's popular usage.

Christopher Hunt
`libcurl` is a client-side HTTP library, I believe the OP is looking for a server-side library.
caf
Yes, I apologize for not being explicit.
harschware
+1  A: 

One way to do this is to write your servlet as an Apache module - Apache itself then acts as the HTTP server-side library.

caf
A: 

You may have some luck plugging into Mongrel2, although I've never tried.

Jack Kelly
+1  A: 

CppCMS and Wt both spring to mind, given your requirements.

The official FastCGI library can also operate in a "servlet" mode.

greyfade
A: 

Tntnet

pdb
A: 

I would recommend you to take a look on CppCMS web framework, it has all you ask for.

Artyom