Permalink
Browse files

A more readable version of trailing slash stripping

  • Loading branch information...
1 parent 76d09eb commit b8afa6a07d97bf81cdae3c69d80dd8c0969fe931 @b b committed Jun 7, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/webmachine_decision_core.erl
View
5 src/webmachine_decision_core.erl
@@ -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,

0 comments on commit b8afa6a

Please sign in to comment.