akilichen opened a new issue, #12616: URL: https://github.com/apache/skywalking/issues/12616
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues. ### Apache SkyWalking Component Go Agent (apache/skywalking-go) ### What happened I am using the standard package named `httputil` with its `NewSingleHostReverseProxy` function, here is the error messages encountered. ``` panic: interface conversion: *mux.skywalking_operatorTypeMuxwriterWrapper is not http.Flusher: missing method Flush goroutine 62 [running]: github.com/gin-gonic/gin.(*responseWriter).Flush(0xc0001a2500?) /app/go-project/ms-gateway/vendor/github.com/gin-gonic/gin/response_writer.go:118 +0x59 net/http/httputil.(*maxLatencyWriter).delayedFlush(0xc0006939b0) /usr/local/go/src/net/http/httputil/reverseproxy.go:546 +0x95 created by time.goFunc /usr/local/go/src/time/sleep.go:176 +0x32 ``` here is my code. ``` proxy := httputil.NewSingleHostReverseProxy(remote) // remote mean target host. //Define the director func urlPath := c.Param("proxyPath") proxy.Director = func(req *orginHttp.Request) { req.Header = c.Request.Header req.Host = remote.Host req.URL.Scheme = remote.Scheme req.URL.Host = remote.Host req.URL.Path = c.Request.URL.Path // some code operation here ...... } proxy.ServeHTTP(c.Writer, c.Request) ``` something else: the sw-agent version is `v0.3.0` with `go1.19`. ### What you expected to happen fix the bug! Is the httputil reverse proxy not supported by SW, or something I did wrong? What should I do? ### How to reproduce see `What happened` ### Anything else If anything I do not explain clearly, leave me a message. Thanks! ### Are you willing to submit a pull request to fix on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
