Explorar o código

测试输出路径2

wytfy hai 6 meses
pai
achega
a4a3aeeb15
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      transport/internet/websocket/hub.go

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

@@ -45,12 +45,12 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
 
 	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
 		}