mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
node: fix wrong status code in ws (#35111)
Fixes an issue where we would falsely return 400 when we should return 200 because the request was served successfully --------- Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
43b7b4e8d9
commit
11f0a8318b
1 changed files with 2 additions and 0 deletions
|
|
@ -209,7 +209,9 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
if ws != nil && isWebsocket(r) {
|
if ws != nil && isWebsocket(r) {
|
||||||
if checkPath(r, ws.prefix) {
|
if checkPath(r, ws.prefix) {
|
||||||
ws.ServeHTTP(w, r)
|
ws.ServeHTTP(w, r)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
http.Error(w, "not found", http.StatusNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue