You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Sorry for the invalid bug-report. It works with --data-binary.
The background is that I can't get git-http-backend to work with go/http. The issue is
probably related to something else.
by cgmurray:
The text was updated successfully, but these errors were encountered: