Go version
go version go1.22.5 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/myusername/Library/Caches/go-build'
GOENV='/Users/myusername/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/myusername/go/pkg/mod'
GONOPROXY='github.com/my-company-name/*'
GONOSUMDB='github.com/my-company-name/*'
GOOS='darwin'
GOPATH='/Users/myusername/go'
GOPRIVATE='github.com/my-company-name/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.5'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/2m/7lxh9w5j38s61227jk_lh3yc0000gn/T/go-build1031578136=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
I Ran a basic web server to test http PATCH call
type User struct {
ID int json:"id"
}
func main() { http.HandleFunc("/users/", patchUserHandler) http.ListenAndServe(":8080", nil) }
func patchUserHandler(w http.ResponseWriter, r *http.Request) { ... .. json.NewEncoder(w).Encode(User{}) }
What did you see happen?
NO response when run from curl or postman or go client code curl --location --request PATCH 'http://localhost:8080/users/'
GET/POST/DELETE/PUT is working When monitored from wireshark I can see the response in http packet
When run directly run within ubuntu VM (in microk8s) on same go version, getting response for PATCH call.
What did you expect to see?
Expecting any "response" either 200+ or 400+ http status
Comment From: gabyhelp
Related Issues and Documentation
- affected/package: #62521 (closed)
- net/http: Http Server (request) is not working with enabled Proxy Protocol #64365 (closed)
- net/http: server will drop tcp connections after a certain number of concurrent connections are made #61924 (closed)
- net/http: Content-Length: 0 is not set for PATCH requests with empty body #40978 (closed)
- net/http: Listening on localhost at port 8080 on Darwin #16676 (closed)
- net/http: enhanced ServerMux routing #65231 (closed)
- net/http header not being set as expected #50587 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: seankhliao
Sounds like a problem with your client software if you can see the http response sent over the wire.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions