소스 검색

feature: v4.45.2版本改造

wytfy 6 달 전
부모
커밋
eec43e8744
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      transport/internet/websocket/hub.go

+ 2 - 2
transport/internet/websocket/hub.go

@@ -43,12 +43,12 @@ var upgrader = &websocket.Upgrader{
 func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
 	var earlyData io.Reader
 	if !h.earlyDataEnabled { // nolint: gocritic
-		if request.URL.Path != h.path {
+		if !strings.HasPrefix(request.URL.Path, h.path) {
 			writer.WriteHeader(http.StatusNotFound)
 			return
 		}
 	} else if h.earlyDataHeaderName != "" {
-		if request.URL.Path != h.path {
+		if strings.HasPrefix(request.URL.Path, h.path) {
 			writer.WriteHeader(http.StatusNotFound)
 			return
 		}