Skip to content

Commit

Permalink
A more readable version of trailing slash stripping
Browse files Browse the repository at this point in the history
  • Loading branch information
b committed Jun 7, 2011
1 parent 76d09eb commit b8afa6a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/webmachine_decision_core.erl
Expand Up @@ -432,9 +432,8 @@ decision(v3n11) ->
BaseUri = case resource_call(base_uri) of
undefined -> wrcall(base_uri);
Any ->
case lists:last(Any) of
% 47 is "/"
47 -> lists:sublist(Any, erlang:length(Any) - 1);
case [lists:last(Any)] of
"/" -> lists:sublist(Any, erlang:length(Any) - 1);
_ -> Any
end
end,
Expand Down

0 comments on commit b8afa6a

Please sign in to comment.