Go Hijack黑科技
最近在看Go标准库里面的rpc源码,发现了下面一段代码: // ServeHTTP implements an http.Handler that answers RPC requests. func (server *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { if req.Method != CONNECT { w.Header().Set(Content-Type, text/plain; charset=utf-8) w.WriteHeader(http.StatusMethodNot
用户评论