delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/13/12:22:30

From: John Richter <john DOT richter AT yale DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP & CGI Problem
Date: Tue, 13 Oct 1998 12:04:59 -0400
Organization: Yale University
Lines: 30
Message-ID: <36237A2B.3CB6B84D@yale.edu>
NNTP-Posting-Host: jacksons.med.yale.edu
Mime-Version: 1.0
X-Mailer: Mozilla 4.04 [en] (WinNT; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm trying to write a CGI for Microsoft Internet Information Server to
run (doesn't make much sense, does it?). When I try to run

    /* ------ Program Start ---------*/
    #include <stdio.h>

    main()
    {
        printf("Content-type: text/html\n\n");
        printf("<H1>If you can read this, it finally works</H1>\n");
    }
    /* ------- Program End ---------*/

IIS reports

    CGI Error

    The specified CGI application misbehaved by not returning a complete
set of
    HTTP headers. The headers it did return are:

Note that this same code works perfectly when I compile it using
CodeWarrior. This leads me to believe that there's something about
CodeWarrior's idea of printf is different from djgpp's idea of printf,
and IIS agrees with CodeWarrior. It could also be that the two compilers
have different notions of stdout.
    Does anyone have any clue about what's going on here?

    -John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019