cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl and http server?

From: Tom Jerry <catod6_at_gmail.com>
Date: Fri, 29 Sep 2006 11:28:10 +0200

Thanks.
I'm using c++ and it is a software product for win/unix.
I need the part that retrieves the request, parse the http and gives me as
a developer the http request as a structure (hides from me the details
of chunks, gzip and all other protocol stuff).
Also, a very important feature is having the ability to return the
response asynchronously to the client.
This is because I'm sending the processed request to another server.
for example:

HttpLib::OnHttpRequest(req)
{
// do some stuff

// send req to another server asynchronously (non-blocking)
SendToAnotherServer(req, myCallbackFunc)

return WAIT_FOR_RESPONSE
}

myCallbackFunc(req, my_response)
{
// send the http response back to client.
req->response = my_response
HttpLib::SendResponse(req)
}

On 9/29/06, Kevin Carothers <kevindotcar_at_gmail.com> wrote:
>
>
>
> On 9/28/06, Tom Jerry <catod6_at_gmail.com> wrote:
> >
> > Hello,
> > I'm using libcurl in my project.
> > As I understand, libcurl can only be used as an HTTP client.
> > My project also requires me to implement an HTTP server. Can it be done
> > with libcurl?
> > If not, can you recommend such an open-source library (and not apache
> > httpd, which is too complicated and massive)?
> >
> > Thank you,
> > Ori.
> >
>
> You might want to research http://www.w3.org- I think the original CERN
> HTTP software is available there.
>
> There's all sorts of detail that you're not including that would be
> helpful; Are you building an embedded device? executable? languages?
>
> HTH
> KC
>
>
Received on 2006-09-29