Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/rpc: rpc.RegisterName can't contain "." character #5617

Closed
chai2010 opened this issue Jun 3, 2013 · 5 comments
Closed

net/rpc: rpc.RegisterName can't contain "." character #5617

chai2010 opened this issue Jun 3, 2013 · 5 comments

Comments

@chai2010
Copy link
Contributor

chai2010 commented Jun 3, 2013

rpc.RegisterName can't contain "." character

I create a rpctest.go, rpc.RegisterName with "mypkg.Arith".

go run rpctest.go
2013/06/03 13:46:57 rpc: rpc: service/method request ill-formed: mypkg.Arith.Multiply
2013/06/03 13:46:57 arith error:rpc: service/method request ill-formed:
mypkg.Arith.Multiply
exit status 1

I found the rpc use ServiceMethod format: "Service.Method"[1].
But the Service name don't disable the "." character.

So, I create a patch for the net/rpc/server.go[2] for this issue.

---
[1]
http://golang.org/pkg/net/rpc/#Request

[2]
http://golang.org/src/pkg/net/rpc/server.go?s=16428:16608#L546

Attachments:

  1. rpctest.go (1113 bytes)
  2. netrpc.diff (719 bytes)
@rsc
Copy link
Contributor

rsc commented Jun 3, 2013

Comment 1:

net/rpc: RegisterName rejects "." character
To send a patch, see http://golang.org/doc/contribute.html. Thanks.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Have you sent in your patch as described in http://golang.org/doc/contribute.html? 
Doing it that way lets us track copyright status.

Labels changed: added priority-later, packagechange, removed priority-triage.

Owner changed to @ianlancetaylor.

Status changed to WaitingForReply.

@minux
Copy link
Member

minux commented Jun 20, 2013

Comment 3:

the patch has been sent as https://golang.org/cl/10370043/

@ianlancetaylor
Copy link
Contributor

Comment 4:

Great, thanks.

Status changed to Started.

@robpike
Copy link
Contributor

robpike commented Jun 24, 2013

Comment 5:

This issue was closed by revision 3eaaed5.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants