Skip to content
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

POST->OST,GET->ET??? #68537

Closed
skytangleisky opened this issue Jul 21, 2024 · 2 comments
Closed

POST->OST,GET->ET??? #68537

skytangleisky opened this issue Jul 21, 2024 · 2 comments

Comments

@skytangleisky
Copy link

Go version

go1.9.1 windows11/amd64

Output of go env in your module/workspace:

set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\tanglei\AppData\Local\go-build
set GOENV=C:\Users\tanglei\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\tanglei\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\tanglei\go
set GOPRIVATE=
set GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\tanglei\AppData\Local\Temp\go-build2589130561=/tmp/go-build -gno-record-gcc-switches

What did you do?

func (s *httpServer) handleTunneling(w http.ResponseWriter, r *http.Request){
//the first r.Method is expected,eg: POST,GET,...
fmt.Print(r.Method)
hijacker, ok := w.(http.Hijacker)
if ok {
c, _, err := hijacker.Hijack()
if err != nil {
http.Error(w, err.Error(), http.StatusServiceUnavailable)
return
}
//do something
...
//the second r.Method is not expected,eg: OST,ET,...
//what happend?
if r, err = http.ReadRequest(bufio.NewReader(c)); err != nil {
return
}
}
}

What did you see happen?

POST->OST
GET->ET
...

What did you expect to see?

POST->OST->POST
GET->ET
...

@seankhliao
Copy link
Member

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

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
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