Jump to content

Talk:Hello world/Web server: Difference between revisions

nc test
(hmm, i got cheated out of headers?)
(nc test)
Line 5:
::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)
<pre>
> echo -n "GET / HTTP/1.0\r\n\r\n" | nc localhost 8080
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Date: Fri, 01 Jul 2011 01:59:50 GMT
 
Goodbye, World!
</pre>
Should there be more? &mdash;[[User:Sonia|Sonia]] 02:02, 1 July 2011 (UTC)
1,707

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.