Talk:Hello world/Web server: Difference between revisions

 
(4 intermediate revisions by 2 users not shown)
Line 20:
"Multiple" means "simultaneously" or "sequentially"? I suggest leaving this up to the coders, but make it clear, since this task it self doesn't really need to involve forking or threads. --[[User:Ledrug|Ledrug]] 00:42, 2 July 2011 (UTC)
: Good point. For Hello World, I should think sequentially should be fine. —[[User:Sonia|Sonia]] 01:38, 2 July 2011 (UTC)
 
== does the task mandate HTTP/1.0 or above? ==
The task description should specify if the server should implement HTTP/1.0 or above, currently some examples implement a plain socket that returns one text line, which is possible in HTTP 0.9, but is not valid in current clients. E.g. in the Java server, curl and wget:
 
<pre>wget http://localhost:8080
--22:36:36-- http://localhost:8080/
=> `index.html.2'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:8080... connected.
HTTP request sent, awaiting response...
Read error (No such file or directory) in headers.
Retrying.
</pre>
<pre>curl -i localhost:8080
curl: (56) Failure when receiving data from the peer
</pre>
 
Regular browsers still handle HTTP 0.9 replies though.
:The task is supposed to be minimal, but by "browser" I was thinking a modern browser, and a solution that doesn't work with wget and curl does seem to be a stretch. Perhaps it would make sense to add a task requirement along the lines of "Use a modern browser or client program to test your server. Showing output is not neccessary, but state the relevant details of the program you used. (OS, version, browser, version, etc.)" &mdash;[[User:Sonia|Sonia]] 22:48, 28 October 2011 (UTC)
::my point is that the solutions neither process the request line (the reply is sent before the request is sent) nor provide the proper header (some solutions like C at least provide headers) --[[User:AlexLehm|AlexLehm]] 10:15, 30 October 2011 (UTC)
Anonymous user