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

Conversation

Projects
None yet
2 participants
@edmundoa
Member

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.

Normalize paths by default
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.

@edmundoa edmundoa added this to the 2.0.1 milestone May 10, 2016

@joschi

This comment has been minimized.

Contributor

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

ci-server-integration Jenkins build graylog2-server-integration-pr 900 has succeeded
Details
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 added a commit that referenced this pull request May 11, 2016

Normalize paths by default (#2213)
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