cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl and C CGI question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 Aug 2002 20:36:59 +0200 (MET DST)

On Thu, 22 Aug 2002, Cameron Guill wrote:

> I am writing a c cgi wrapper for remote web page reading.
> I compile fine with the lib-curl options and when I run the application
> command line, I get back the data correctly.
> (cc htmtest.c -o
> htmtest.exe -I/home/cguill/include -L/home/cguill/lib -lcurl)
> When I try to run it as a cgi I get a server error. The logs show
> "htmtest.exe produced invalid headers".

This is usually because you didn't output a proper Content-Type: header so
the web server doesn't like your CGI.

> Now I checked for problems with the web server. I compiled with straight
> gcc (cc htmtest2.c -o htmtest2.exe) on another c cgi that does a simple
> display to browser and it ran fine.
> I then compiled it with the lib-curl libs and it produced the same core
> dumps as the htmtest.exe

core dumps?

> This leads me to believe that the problem I am getting is a result of the
> lib-curl libraries.

I fail to see in which way libcurl can fail if it gets called by your web
server but work when you call it from a command line. libcurl is but a
library. It kind of sounds like the problem is related to other things.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-08-22