Talk:Hello world/Web server: Difference between revisions

From Rosetta Code
Content added Content deleted
(more questions)
(hmm, i got cheated out of headers?)
Line 2: Line 2:
: CGI is fine for producing the text, but starting a server program cannot be done outside of the task. A valid solution must show how to get a server process running. I was hoping a number of languages would be able to show off easy built-in or library support for this, but I didn't want to exclude languages where the easiest solution was to launch a copy of some existing server program. In this case, a valid solution must both generate the text to serve (writing it to a static text file would be fine) and start a server that will serve the text. —[[User:Sonia|Sonia]] 01:10, 1 July 2011 (UTC)
: CGI is fine for producing the text, but starting a server program cannot be done outside of the task. A valid solution must show how to get a server process running. I was hoping a number of languages would be able to show off easy built-in or library support for this, but I didn't want to exclude languages where the easiest solution was to launch a copy of some existing server program. In this case, a valid solution must both generate the text to serve (writing it to a static text file would be fine) and start a server that will serve the text. —[[User:Sonia|Sonia]] 01:10, 1 July 2011 (UTC)
:: Ok. Though if launching Apache is allowed, there's really no meaningful limit left—
:: Ok. Though if launching Apache is allowed, there's really no meaningful limit left—
: Limit--to languages that can solve the task? I didn't want to task to be especially limiting, but there will certainly be a few languages where solution is difficult or impossible.
::BTW, the Go code didn't seem to server HTTP headers. Is it handled by the package, or is it not part of the requirement? --[[User:Ledrug|Ledrug]] 01:24, 1 July 2011 (UTC)
::BTW, the Go code didn't seem to server HTTP headers. Is it handled by the package, or is it not part of the requirement? --[[User:Ledrug|Ledrug]] 01:24, 1 July 2011 (UTC)
: Interesting! This isn't an area where I know a lot, but I'll look into it. I would expecte an HTTP server to serve whatever headers are standard for the protocol. (I confess, I just hacked up a couple of lines of code, saw that Chrome displayed the text, and called it done.) —[[User:Sonia|Sonia]] 01:49, 1 July 2011 (UTC)

Revision as of 01:49, 1 July 2011

Is this supposed to be a server that does its own HTTP protocol, or just a CGI will do? --Ledrug 21:49, 30 June 2011 (UTC)

CGI is fine for producing the text, but starting a server program cannot be done outside of the task. A valid solution must show how to get a server process running. I was hoping a number of languages would be able to show off easy built-in or library support for this, but I didn't want to exclude languages where the easiest solution was to launch a copy of some existing server program. In this case, a valid solution must both generate the text to serve (writing it to a static text file would be fine) and start a server that will serve the text. —Sonia 01:10, 1 July 2011 (UTC)
Ok. Though if launching Apache is allowed, there's really no meaningful limit left—
Limit--to languages that can solve the task? I didn't want to task to be especially limiting, but there will certainly be a few languages where solution is difficult or impossible.
BTW, the Go code didn't seem to server HTTP headers. Is it handled by the package, or is it not part of the requirement? --Ledrug 01:24, 1 July 2011 (UTC)
Interesting! This isn't an area where I know a lot, but I'll look into it. I would expecte an HTTP server to serve whatever headers are standard for the protocol. (I confess, I just hacked up a couple of lines of code, saw that Chrome displayed the text, and called it done.) —Sonia 01:49, 1 July 2011 (UTC)