Closed
Description
by cgmurray:
What steps will reproduce the problem? Run the following server app with "go run": package main import ( "fmt" "io" "net/http" ) type handler struct{} func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { r.Header.Set("Content-Type", "application/octet-stream") io.Copy(w, r.Body) } func main() { port := 9090 http.ListenAndServe(fmt.Sprintf(":%d", port), new(handler)) } create a text-file, "two_lines", with the following content: one two post the text-file using curl: curl -X POST -d@two_lines --header "Content-Type: application/octet-stream" http://localhost:9090 What is the expected output? one two What do you see instead? onetwo Which operating system are you using? OS X 10.8.3 Which version are you using? (run 'go version') go version go1.1 darwin/amd64