소스 검색

Revert "check request.Host instead of request.URL.Host. fix #681"

This reverts commit ba16987a07a1ecae330d5e7bcc19f8f613e9c070.
Darien Raymond 8 년 전
부모
커밋
fde421ac58
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      proxy/http/server.go

+ 1 - 1
proxy/http/server.go

@@ -217,7 +217,7 @@ func StripHopByHopHeaders(header http.Header) {
 var errWaitAnother = newError("keep alive")
 
 func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, reader io.Reader, writer io.Writer, dest net.Destination, dispatcher dispatcher.Interface) error {
-	if len(request.Host) <= 0 {
+	if len(request.URL.Host) <= 0 {
 		response := &http.Response{
 			Status:        "Bad Request",
 			StatusCode:    400,