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

Martini ResponseWriter that implements http.Hijack #45

Closed
mattyhall opened this issue Nov 15, 2013 · 1 comment · Fixed by #64
Closed

Martini ResponseWriter that implements http.Hijack #45

mattyhall opened this issue Nov 15, 2013 · 1 comment · Fixed by #64

Comments

@mattyhall
Copy link

I'm quite new to Go, so please excuse me if this is just nonesense.

Would it be possible for your responseWriter type to implement http.Hijack? This would allow libraries like this websockets one to work with martini.

I'm not sure if this is something that should be done, I was just trying to write something really quick, came up with an error and found out this was the reason. If this is a silly way to do it feel free to tell me 😄

@codegangsta
Copy link
Contributor

Yup. The wrapped handler needs to to implement http.Hijackerinterface. It currently does not. Below is a relevant thread on Golang-nuts:

https://groups.google.com/forum/#!topic/golang-nuts/zq_i3Hf7Nbs

I definitely want to see this in Martini. It will add a lot of value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants