diff --git a/README.md b/README.md index 8449b45..bf3e26e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/dotcloud/go-redis-server.png)](https://travis-ci.org/dotcloud/go-redis-server) +[![Build Status](https://travis-ci.org/docker/go-redis-server.png)](https://travis-ci.org/dotcloud/go-redis-server) Redis server protocol library ============================= diff --git a/parser.go b/parser.go index caaf49c..2ebfeb7 100644 --- a/parser.go +++ b/parser.go @@ -21,7 +21,7 @@ func parseRequest(conn io.ReadCloser) (*Request, error) { // Multiline request: if line[0] == '*' { - if _, err := fmt.Sscanf(line, "*%d\r", &argsCount); err != nil { + if _, err := fmt.Sscanf(line, "*%d\r\n", &argsCount); err != nil { return nil, malformed("*", line) } // All next lines are pairs of: @@ -71,7 +71,7 @@ func readArgument(r *bufio.Reader) ([]byte, error) { return nil, malformed("$", line) } var argSize int - if _, err := fmt.Sscanf(line, "$%d\r", &argSize); err != nil { + if _, err := fmt.Sscanf(line, "$%d\r\n", &argSize); err != nil { return nil, malformed("$", line) }