Skip to content

http PATCH not responding #68404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ravinandans opened this issue Jul 12, 2024 · 2 comments
Closed

http PATCH not responding #68404

ravinandans opened this issue Jul 12, 2024 · 2 comments

Comments

@ravinandans
Copy link

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

@seankhliao
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants