fix proto.Path

This commit is contained in:
Leonid Bugaev
2017-06-30 15:58:45 +02:00
parent 5aa1696680
commit 652e589e2b
+1 -1
View File
@@ -346,7 +346,7 @@ func Path(payload []byte) []byte {
eol := bytes.IndexByte(payload[start:], '\r')
end := bytes.IndexByte(payload[start:], ' ')
if eol < end {
if eol > 0 && eol < end {
return payload[start : start + eol]
}