From: John Richter 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 main() { printf("Content-type: text/html\n\n"); printf("

If you can read this, it finally works

\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