parse_result = parseURIReference url
-
add_trailing_slash :: URL -> URL
add_trailing_slash url =
case parse_result of
Nothing -> url -- Shrug?
Just uri ->
let old_path = uriPath uri in
- if isSuffixOf "/" old_path then
- url -- It already had a trailing slash
+ if (isSuffixOf "/" old_path) || (isSuffixOf "bigpage" old_path) then
+ -- It already had a trailing slash, or it's a 'bigpage' URL.
+ -- Trailing slashes after 'bigpage' don't work.
+ url
else
show $ uri { uriPath = old_path ++ "/" }
where
make_absolute_url :: URL -> Maybe URL
-make_absolute_url relative_url =
+make_absolute_url relative_url =
case parse_result of
Nothing -> Nothing
Just relative_uri ->