Przeglądaj źródła

feature: v4.45.2版本改造

wytfy 5 miesięcy temu
rodzic
commit
be49f66a28
1 zmienionych plików z 2 dodań i 2 usunięć
  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
 		}