From 652e589e2b71d5dfa4d2a70431d21b108a5e471e Mon Sep 17 00:00:00 2001 From: Leonid Bugaev Date: Fri, 30 Jun 2017 15:58:45 +0200 Subject: [PATCH] fix proto.Path --- proto/proto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] }