Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support metrics with url specials characteres #4

Open
wants to merge 1 commit into from

2 participants

@artefactop

I just add a url decode of name of metric

@joewilliams
Collaborator

Please rebase on master this and include a test and I will merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 23, 2012
  1. @artefactop
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/folsom_cowboy_metrics_handler.erl
View
2  src/folsom_cowboy_metrics_handler.erl
@@ -40,7 +40,7 @@ terminate(_Req, _State) ->
ok.
get_request(Path, Req) ->
- Id = lists:last(binary:split(Path, [<<"/">>], [trim,global])),
+ Id = cowboy_http:urldecode(lists:last(binary:split(Path, [<<"/">>], [trim,global]))),
case metric_exists(Id) of
{true, Id1} ->
cowboy_req:reply(200, [], mochijson2:encode(get_metric_data(Id1)), Req);
Something went wrong with that request. Please try again.