diff --git a/proto/proto.go b/proto/proto.go index 1ef24492..0bd83dc3 100644 --- a/proto/proto.go +++ b/proto/proto.go @@ -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] }