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

sso_proxy: don't set timeout when flush interval is set #200

Merged
merged 1 commit into from
May 28, 2019

Conversation

Jusshersmith
Copy link
Contributor

Problem

http.TimeoutHandler doesn't support request flushing, resulting in any flush interval set being ignored if a timeout is also set (we set a default timeout, but not flush interval, so right now this problem always occurs if a flush interval is set).

https://golang.org/src/net/http/server.go?s=98830:98898#L3129

Solution

If a flush interval is set in the upstream config, return the handler without setting a timeout.

jphines
jphines previously approved these changes May 23, 2019
Copy link
Contributor

@jphines jphines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests aren't testing what we think they are unfortunately.

internal/proxy/reverse_proxy_test.go Outdated Show resolved Hide resolved
add test for flush interval vs timeout logic
@Jusshersmith Jusshersmith force-pushed the jusshersmith-fix-request-flushing branch from 91e348d to d7f1780 Compare May 28, 2019 14:12
@Jusshersmith Jusshersmith merged commit 5ab9574 into master May 28, 2019
@Jusshersmith Jusshersmith deleted the jusshersmith-fix-request-flushing branch May 28, 2019 16:56
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.

2 participants