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

Improve websocket support #112

Merged
merged 2 commits into from Mar 25, 2019

Conversation

gyson
Copy link
Contributor

@gyson gyson commented Mar 22, 2019

Description

When using it with Apache Zeppelin (it requires websocket), it got 500 error with "WebSocket handshake: Unexpected response code: 500".

With some investigation, it's caused by lack support of http.Hijacker, it raised 500 error from here.

This PR added http.Hijacker support to responseLogger to resolve above issue.

There is one more nice to have change, which is to support value case insensitive for header Connection because nginx documented to use proxy_set_header Connection "upgrade" from here. The current implementation only accept Upgrade.

Motivation and Context

go version: v1.12

Using it with Apache Zeppelin, it got 500 error with "WebSocket handshake: Unexpected response code: 500".

How Has This Been Tested?

  • added unit test
  • tested change in my Apache Zeppelin setup, webscoket works properly after this change.

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.

@gyson gyson requested a review from a team March 22, 2019 21:40
@gyson gyson mentioned this pull request Mar 22, 2019
@ploxiln
Copy link
Contributor

ploxiln commented Mar 24, 2019

looks good to me

@JoelSpeed
Copy link
Member

This is great, thanks! 😄

@JoelSpeed JoelSpeed merged commit a38b0dc into oauth2-proxy:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants