Skip to content

[connectors/http] prevent errors caused by multi-byte characters in paths #756

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 3 commits into from
Jan 23, 2019
Merged

[connectors/http] prevent errors caused by multi-byte characters in paths #756

merged 3 commits into from
Jan 23, 2019

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Jan 23, 2019

Since nodejs/node@b961d9fd83, http.request() will throw an error if multi-byte characters are used in the URL path, which is not currently being caught and passed back to the callback.

This may be true in a lot of places, but such is the nature of callbacks.

@LeeDr
Copy link

LeeDr commented Jan 23, 2019

@spalger does this PR fix it just so Kibana doesn't crash on multi-byte chars but it still fails?
Or does this fix it so we can successfully use multi-byte chars in index pattern names?

@spalger
Copy link
Contributor Author

spalger commented Jan 23, 2019

@LeeDr this does not allow us to use multi-byte chars in Kibana, but it will properly forward the errors to the callback rather than crashing the process. See elastic/kibana#29210 for the other part of the solution.

@spalger spalger changed the title [connectors/http] catch errors caused by multi-byte paths [connectors/http] prevent errors caused by multi-byte characters in paths Jan 23, 2019
@spalger
Copy link
Contributor Author

spalger commented Jan 23, 2019

Ran the unit tests locally ✅

@spalger spalger merged commit 0d07233 into elastic:master Jan 23, 2019
spalger pushed a commit that referenced this pull request Jan 23, 2019
…aths (#756)

* [connectors/http] catch errors caused by multi-byte paths

* Check url validity before to run the request

* Updated test

(cherry picked from commit 0d07233)
@spalger spalger deleted the fix/multi-byte-path-error branch January 23, 2019 21:40
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