瀏覽代碼

specify protocol in http inbound

Darien Raymond 7 年之前
父節點
當前提交
39835e8da2
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      proxy/http/server.go

+ 4 - 0
proxy/http/server.go

@@ -239,6 +239,10 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, wri
 		request.Header.Set("User-Agent", "")
 	}
 
+	ctx = session.ContextWithContent(ctx, &session.Content{
+		Protocol: "http/1.1",
+	})
+
 	link, err := dispatcher.Dispatch(ctx, dest)
 	if err != nil {
 		return err