X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r.berber@computer.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.20060401T185645-466@post.gmane.org> <017b01c656ab$d36907b0$a501a8c0@CAM.ARTIMI.COM>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1
Content-Transfer-Encoding:  quoted-printable
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@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

