Skip to content

Commit

Permalink
fix: Change break to continue for invalid bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
prepaser committed Dec 13, 2024
1 parent 1c9a91e commit 419d178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion header.go
Original file line number Diff line number Diff line change
Expand Up @@ -3016,7 +3016,7 @@ func (h *ResponseHeader) parseHeaders(buf []byte) (int, error) {
if !validHeaderFieldByte(ch) {
if ch == ' ' {
spaceIncluded = true
break
continue
}
h.connectionClose = true
return 0, fmt.Errorf("invalid header key %q", s.key)
Expand Down

0 comments on commit 419d178

Please sign in to comment.