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

enhanced the getGraphiteURLKey function to replace additional characters #679

Merged
merged 1 commit into from
Jun 5, 2015

Conversation

EikeDawid
Copy link
Contributor

Fixes #651

I run into some issues with certain characters on URI that where clashing with graphite functionality or caused parsing issues for grafana when trying to retrieve data from graphite

The characters are:

  • pipe (|)
  • comma (,)
  • plus (+)

... they are replaced by a _ (as the others are)

… characters

the were causing me issues on nasty urls.

The characters are:

* pipe (|)
* comma (,)
* plus (+)

See also here:
sitespeedio#651 (comment)
soulgalore added a commit that referenced this pull request Jun 5, 2015
enhanced the getGraphiteURLKey function to replace additional characters
@soulgalore soulgalore merged commit 53175c4 into sitespeedio:master Jun 5, 2015
soulgalore added a commit that referenced this pull request Jun 5, 2015
@soulgalore
Copy link
Member

Hello @EikeDawid , I've changed so we use pipe char instead of %7C , I think the URL should already be decoded or have you seen that it don't work in your case?

Best
Peter

@EikeDawid
Copy link
Contributor Author

@soulgalore: I had to do it cause url.parse(theUrl); returns the | encoded on my node version.

However i just checked the build (on travis) and i see the encoded version is failing on node 0.10, while the un-encoded fails on 0.12.

So that means that url.parse(theUrl); behaves differently on both.

That's a bit of a bummer - there are some other changes too:
nodejs/node-v0.x-archive#8332

Sorry, that i did not check on an older node version ....

I think the fastest way to make it work consistently would be to add both versions (encode and unencoded). Shall i send another pull request with that?

@soulgalore
Copy link
Member

@EikeDawid I'll fix it now, that's no problem. When I checked your test, I didn't see you added two different tests for pipe, that's nice. I'll check it in now and see if it works :)

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.

2 participants