Stop at '?' when reading HTTP PATH before shunting

This commit is contained in:
RPRX 2021-03-12 11:50:59 +00:00 committed by GitHub
parent 819717d278
commit 100edc370b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -458,7 +458,7 @@ func (s *Server) fallback(ctx context.Context, sid errors.ExportOption, err erro
if k == '\r' || k == '\n' { // avoid logging \r or \n
break
}
if k == ' ' {
if k == '?' || k == ' ' {
path = string(firstBytes[i:j])
newError("realPath = " + path).AtInfo().WriteToLog(sid)
if pfb[path] == nil {

View File

@ -293,7 +293,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
if k == '\r' || k == '\n' { // avoid logging \r or \n
break
}
if k == ' ' {
if k == '?' || k == ' ' {
path = string(firstBytes[i:j])
newError("realPath = " + path).AtInfo().WriteToLog(sid)
if pfb[path] == nil {