Skip to content

Missing surrogatepass in urllib3 handler #1212

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

Merged
merged 5 commits into from
Apr 23, 2020
Merged

Missing surrogatepass in urllib3 handler #1212

merged 5 commits into from
Apr 23, 2020

Conversation

vEpiphyte
Copy link
Contributor

A coworker of mine encountered an issue when retrieving a document, when using the scrollapis, causing a decoding issue in the urllib3 connection class.

This is similar to #612 and #629 .

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@vEpiphyte
Copy link
Contributor Author

Coworker has confirmed for me that this has resolved the issue he was seeing.

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

Seems fine, can we also add this to the RequestsHttpConnection? Can change response.text to response.content.decode("utf-8", "surrogatepass")

@sethmlarson
Copy link
Contributor

jenkins test this please

@vEpiphyte
Copy link
Contributor Author

@sethmlarson I'd be happy to add it to RequestsHttpConnection. I was initially a bit hesitant because of the use of response.text which does automatic decoding vs. decoding the raw response content; but it should be trivial to add.

@vEpiphyte vEpiphyte requested a review from sethmlarson April 21, 2020 19:22
Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

LGTM

@sethmlarson sethmlarson merged commit fef0728 into elastic:master Apr 23, 2020
@vEpiphyte vEpiphyte deleted the bug_surrogate_pass branch April 23, 2020 14:32
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.

3 participants