cURL / Mailing Lists / curl-library / Single Mail

curl-library

Server Response Confusing ??

From: Ram <weshriram_at_yahoo.com>
Date: Wed, 22 Sep 2004 01:46:36 -0700 (PDT)

Hi,

    I am writing a small httpd. which communicates with a client using libcurl.

 

   Server :

     After dup (ing) the sockd to stdin, stdout and stderr.

    I will read the data into buf. After reading the data.

   I dont want the client to wait. so, i close all the descriptors.

  after saying 200 OK.

  After which i will work on the data read.

  I just want to execute some commands in the remote machine.

I am not interested in thier returned values.

 

But easy_perform () is returning error.

and curl_easy_getinfo returns response code = 0 ;

 

What is the problem with my httpd.

please advice.

 

{

   close (0) ; dup (sockd) ;

  close (1) ; dup (sockd) ;

  close (2) ; dup (sockd) ;

 close (sockd) ;

buf = readData ( ) ;

 printf ("HTTP/1.1 200 OK\n") ;

printf ("Content-Type: text/plain\n\n") ;

close (0) ; close (1) ; close (2) ;

/* do work */

}

 

 

Regards,

Ram

                
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
Received on 2004-09-22