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

Normalize URIs #2213

Merged
merged 1 commit into from May 11, 2016
Merged

Normalize URIs #2213

merged 1 commit into from May 11, 2016

Conversation

@edmundoa
Copy link
Member

@edmundoa edmundoa commented May 10, 2016

In some situations, the gl2ServerUrl configuration option may end in a slash. As we can't predict when that will happen, this commit is normalizing the path of generated URIs, avoiding URIs with duplicated slashes in their path (you can see an example in #2200).

I was able to reproduce the double slash issue in URIs by setting rest_listen_uri and rest_transport_uri to http://127.0.0.1:12900/. The most visible place to see them is the export CSV URL. Other URIs are also affected, but they are normalized by one of the network libraries we use.

In some situations, the `gl2ServerUrl` configuration option may end in
a slash. As we can't predict when that will happen, this commit is
normalizing the path of the generated URI, avoiding URIs with duplicated
slashes in their path, as one of the issues described in #2200.
@joschi
Copy link
Contributor

@joschi joschi commented May 11, 2016

LGTM. 👍

@joschi joschi self-assigned this May 11, 2016
@joschi joschi merged commit 70198f2 into 2.0 May 11, 2016
4 checks passed
4 checks passed
@garybot2
ci-server-integration Jenkins build graylog2-server-integration-pr 900 has succeeded
Details
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 388 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@joschi joschi deleted the normalize-uris branch May 11, 2016
joschi pushed a commit that referenced this pull request May 11, 2016
In some situations, the `gl2ServerUrl` configuration option may end in
a slash. As we can't predict when that will happen, this change is
normalizing the path of the generated URI, avoiding URIs with duplicated
slashes in their path, as one of the issues described in #2200.
(cherry picked from commit 70198f2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants