busybox-http-app serves HTTP headers in the body of its response
wallrj opened this issue · comments
busybox-http-app is a useful little container; we are using it in our functional tests to check that our wrappers correctly configure and call geard
.
But we notice that the index.html
served by busybox httpd actually contains HTTP header lines....which seems like a mistake.
It results in the following confusing HTTP conversation.
GET / HTTP/1.1
Connection: close
Host: 127.0.0.1:4040
Accept-Encoding: gzip
HTTP/1.0 200 OK
Content-type: text/html
Date: Mon, 23 Jun 2014 14:26:00 GMT
Connection: close
Last-Modified: Wed, 11 Jun 2014 18:35:13 GMT
Content-length: 88
HTTP/1.1 200 OK
Content-Type: text/plain;charset=utf-8
Content-Length: 12
Hello world!
Perhaps those headers should have been removed from the html file in #144 and perhaps the file should be renamed index.txt
so that busybox httpd
serves it with the correct content-type. May also have to configure busybox httpd
to treat index.txt
as an index file.
Thanks - @mfojtik can you tweak this?
@smarterclayton @wallrj sure thing. I think I add those headers to make Go http client happy as without headers just a raw HTML is returned from netcat instead of a proper HTTP response.
Marking as fixed