-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
存在err被覆盖导致无法触发的bug #85
Comments
cs-charles
pushed a commit
to cs-charles/gev
that referenced
this issue
Jun 5, 2021
Merged
cs-charles
pushed a commit
to cs-charles/gev
that referenced
this issue
Jun 7, 2021
Allenxuxu
pushed a commit
that referenced
this issue
Jun 7, 2021
cs-charles
pushed a commit
to cs-charles/gev
that referenced
this issue
Jun 7, 2021
Allenxuxu
pushed a commit
that referenced
this issue
Jun 7, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gev/plugins/websocket/ws/ws.go
Line 305 in 631f725
由于在遍历请求头时,触发对请求头Connection校验的错误,之后触发onHost或者onHeader方法,但是由于onHost或者onHeader方法返回nil,导致原本err=ErrHandshakeBadConnection被nil覆盖。建议用临时变量接收onHost和onHeader返回的错误,只有错误不为空才赋值给err变量。
if onHost := u.OnHost; onHost != nil {
if e := onHost(c, v);e != nil; {
err = e
}
}
if onHeader := u.OnHeader; onHeader != nil {
if e := onHeader(c, k, v);e != nil {
err = e
}
}
The text was updated successfully, but these errors were encountered: