mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev https://golang.org/cl/1704044
This commit is contained in:
parent
285312a05c
commit
38f1231f3e
24 changed files with 123 additions and 98 deletions
|
|
@ -352,7 +352,7 @@ func (server *serverType) input(codec ServerCodec) {
|
|||
sendResponse(sending, req, invalidRequest, codec, s)
|
||||
break
|
||||
}
|
||||
serviceMethod := strings.Split(req.ServiceMethod, ".", 0)
|
||||
serviceMethod := strings.Split(req.ServiceMethod, ".", -1)
|
||||
if len(serviceMethod) != 2 {
|
||||
s := "rpc: service/method request ill-formed: " + req.ServiceMethod
|
||||
sendResponse(sending, req, invalidRequest, codec, s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue