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

Runtime panic handling http traffic in rpc #1598

Closed
gopherbot opened this issue Mar 9, 2011 · 3 comments
Closed

Runtime panic handling http traffic in rpc #1598

gopherbot opened this issue Mar 9, 2011 · 3 comments

Comments

@gopherbot
Copy link
Contributor

by phanna@google.com:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Create an rpc server that does not serve http.
2. Connect to the port using a browser
3. Program panics

What is the expected output?
404 or some other error.

What do you see instead?
runtime panic

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Linux

Which revision are you using?  (hg identify)
7570d405bc93

Please provide any additional information below.
Code snippet:

func main() {
  server := rpc.NewServer()
  server.Register(new(Service)) // Some trivial rpc class
  l, _ := net.Listen("tpc", ":8888")
  server.Accept(l)
}
@robpike
Copy link
Contributor

robpike commented Mar 9, 2011

Comment 1:

please provide a complete working example

@gopherbot
Copy link
Contributor Author

Comment 2 by phanna@google.com:

Attached a working example.

Attachments:

  1. server.go (290 bytes)

@robpike
Copy link
Contributor

robpike commented Mar 10, 2011

Comment 3:

This issue was closed by revision f8f3145.

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

2 participants