Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Disabled transport encoding to okta to prevent EOF #148

Merged
merged 2 commits into from
Jun 19, 2019

Conversation

drewblas
Copy link
Contributor

@drewblas drewblas commented May 3, 2019

Our users would get constant "unexpected EOF" errors when trying to authenticate with 2FA against okta.

We traced the cause to trying to decode the transport encoding (gzip) on the chunked body stream in the response.

This causes ReadAll to return an io.EOF err even when it should not:

rawData, err = ioutil.ReadAll(res.Body)

The fix that has worked is to add a header to prevent okta from encoding the response.

@nickatsegment nickatsegment self-requested a review June 12, 2019 21:46
Copy link
Contributor

@nickatsegment nickatsegment left a comment

Choose a reason for hiding this comment

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

Made a quick comment edit. I'm going on faith that this does what it says and doesn't cause a performance impact.

@nickatsegment nickatsegment merged commit 474c56b into segmentio:master Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants