On Mon, Dec 13, 2010 at 04:44:30PM -0500, Ted Unangst wrote:
> endl is "\n", you want "\r\n".

no. the httpd server is supposed to do that conversion.

that should work. the OP probably messed up something
(renamed the c++ source instead of the executable to .cgi?)

> On Mon, Dec 13, 2010 at 4:18 PM, Jean-Francois <jfsimon1...@gmail.com> wrote:
> > Hello,
> >
> > Sorry for posting basic question here, would you please let me know why such
> > script does'nt work (error with "Premature end of script headers") ?
> >
> >
> > #include <iostream>
> > using namespace std;
> >
> > int main()
> > {
> > cout << "Content-type: text/plain" << endl << endl << "Hello, World!";
> > }
> >
> >
> > It actually shows flush needed on google but I'm not able to do a hello 
> > world
> > CGI in C++.
> >
> > Thjanks for your help,
> >
> > Reagrds

Reply via email to