我写这只是返回的路径,Web客户端简单Go
Web服务器:为什么IE和Chrome显示不同的内容?
package main
import (
"net/http"
"log"
)
type httpServer struct {
}
func (server httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(r.URL.Path))
}
func main() {
var server httpServer
http.Handle("/", server)
log.Fatal(http.ListenAndServe("localhost:9000", nil))
}
我怀疑它是与代理。但为什么IE
还行,而Chrome
不是?我认为他们应该使用相同的代理。
您是否确定自己正在向Chrome浏览器输入相同的URL? –
@TimBiegeleisen:是的。 –
我不是Go专家,所以我可以给你的唯一建议是检查Go服务器访问日志。 –