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/http: http.ServeMux can't find registered handler for CONNECT requests #16045

fanyang01 opened this issue Jun 13, 2016 · 1 comment


Copy link

@fanyang01 fanyang01 commented Jun 13, 2016

  1. What version of Go are you using (go version)?
    go version devel +fee02d2 Fri Jun 10 04:12:50 2016 +0000 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    linux amd64
  3. What did you do?
    Register a CONNECT proxy handler to http.ServeMux:
  4. What did you expect to see?
    The proxy handler was called for CONNECT requests.
  5. What did you see instead?
    http.ServeMux can't find the registered handler. It uses http.NotFoundHandler() to handle the CONNECT request and Client.Get returns a Not Found error.

This issue has been reported in #9561 but it has been closed. I want to build a proxy using App Engine, but there is no way to register a proxy handler because only http.Handle(underly using http.ServeMux.Handle) is available for App Engine. Although it can be avoided by using http.ListenAndServe in a normal environment, I think small changes to http.ServeMux.Handler implementation can fix this problem.

@ianlancetaylor ianlancetaylor added this to the Go1.8 milestone Jun 13, 2016
Copy link

@adg adg commented Jun 14, 2016

What you want to do on App Engine is not possible. App Engine apps cannot accept CONNECT requests from anywhere. Sorry. 😢

The resolution of issue #9561 still applies, AFAICT.

@adg adg closed this Jun 14, 2016
@golang golang locked and limited conversation to collaborators Jun 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.