delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/02/19:38:47

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r DOT berber AT computer DOT org>
Subject: Re: gcc-compiled CGI + Windoze Apache = Error 500
Date: Sun, 02 Apr 2006 18:38:12 -0500
Lines: 33
Message-ID: <e0pn94$33j$1@sea.gmane.org>
References: <loom DOT 20060401T185645-466 AT post DOT gmane DOT org> <017b01c656ab$d36907b0$a501a8c0 AT CAM DOT ARTIMI DOT COM>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <017b01c656ab$d36907b0$a501a8c0@CAM.ARTIMI.COM>
OpenPGP: url=hkp://random.sks.keyserver.penguin.de
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave Korn wrote:
> On 01 April 2006 18:03, cshepard wrote:
>=20
>> I compile the following code thusly:  gcc -o hw.cgi hw.c
>>
>> #include <stdio.h>
>> int main(void) {
>> 	printf("Content-type: text/html\n\n");
>> 	printf("HW");
>> 	exit(0);
>> }
>=20
>   Gets you two genuine \ns.
>=20
>> #!c:/Python24/python.exe
>=20
>   The 'doze native version.
>=20
>> print "Content-type: text/html\n\n"
>=20
>   Gets you two CRLFs.  Which is what the HTTP spec requires.
>=20
>   That's guesswork on my part, I don't have an apache install myself.

It's 100% correct.

Under Unix, using perl, I had to do this:

print "Content-type: text/plain\r\n\r\n";

to get the required result.  Under Cygwin it should be the same.
--=20
Ren=E9 Berber


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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