login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
openbsd-misc
»
2010
»
December
»
13
Re: C++ CGI script
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [author]
[view in full thread]
From: Francesco Vollero
Subject:
Re: C++ CGI script
Date: Monday, December 13, 2010 - 4:51 pm
Il 14/12/10 00.44, Francesco Vollero ha scritto:
quoted text
> Il 13/12/10 22.56, Gerhard Hoffmann ha scritto: >> endl is a so-called manipulator in C++. It outputs '\n' >> and flushes the output buffer (using the flush method in the stream). >> >> So, I would change the order: >> >> cout<< "Content-type: text/plain"<< endl<< endl<< "Hello, >> World!"<< endl; > > Since the most smart way to do is *following* HTTP Protocol [1]: > "HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all > protocol elements except the entity-body (see appendix 19.3 for > tolerant applications)." > > That mean, the most common way is to use my function or just: > cout << "Content-Type: text/plain\r\n\r\n"<<"Hello World, it's me"<<endl; > > And i can use endl on the last line, because hello world message is an > entity-body. > > Regards, > Francesco
Sorry i forgot to paste the link [1]
http://www.ietf.org/rfc/rfc2616.txt
quoted text
>> Don't know if that solves it. >> >> Regards >> >> >> On Mon, Dec 13, 2010 at 10:18:58PM +0100, Jean-Francois 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
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [author]
Messages in current thread:
C++ CGI script
, Jean-Francois
, (Mon Dec 13, 2:18 pm)
Re: C++ CGI script
, Francesco Vollero
, (Mon Dec 13, 2:31 pm)
Re: C++ CGI script
, Ted Unangst
, (Mon Dec 13, 2:44 pm)
Re: C++ CGI script
, Gerhard Hoffmann
, (Mon Dec 13, 2:56 pm)
Re: C++ CGI script
, Francesco Vollero
, (Mon Dec 13, 4:44 pm)
Re: C++ CGI script
, Francesco Vollero
, (Mon Dec 13, 4:51 pm)
Re: C++ CGI script
, a.velichinsky
, (Tue Dec 14, 2:56 am)
Re: C++ CGI script
, Ivan Nudzik
, (Wed Dec 15, 2:34 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Wink Saville
How-to combine several separate git repos?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
Steven Grimm
Re: Git User's Survey 2007 unfinished summary continued
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
Linux 2.6.26-rc3
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
Colocation donated by:
Syndicate