Hi Daniel, 
 
the logic is when fastcgi server receive the request from client, it will use 
curl library send a http request out to another web site. Based on response 
fastcgi server received, the fastcgi serevr will generate a response to client.
 
when I did test on my lab, it seems works: I mean that the function 
curl_to_string works well. But when I deployed this into production server 
which means high volume requests, the client always get 500 error which 
generated by my fastcgi server.
 
I guess: since fastcgi server is a web server, does the server will be broken 
if the curl be called from inside? but I really has no idea about it.
         
 
Thanks.
 

Cheng Liang



 
> Date: Sun, 23 Jan 2011 15:48:34 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: use libcurl in fastcgi/lighttpd
> 
> On Sat, 22 Jan 2011, CHENG LIANG wrote:
> 
> > I am creating a server using fastcgi and lighttpd based on linux. I am 
> > using 
> > c. inside the server, I need send out a http request and store response to 
> > a 
> > string. I write a function int curl_to_string(char *s_http_req, char* 
> > s_http_res) which follow the code in the example getinmemory.c and I got 
> > many many 500(Internal server error) errors. If fastcgi does not call this 
> > function curl_to_string(), things goes well.
> 
> I'm sorry but I don't understand. Who gets the 500 errors? In what way does 
> libcurl change anything that would cause or generate 500 errors?
> 
> -- 
> 
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
                                          
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to