aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/mod_dir.erl
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-01-29 17:44:07 +0100
committerZandra <[email protected]>2016-01-29 17:44:07 +0100
commite038cbe699acc19901e10b9569a3b783e900582d (patch)
treeb1167aedbaebb835e0a8a59be8528f43b4da3864 /lib/inets/src/http_server/mod_dir.erl
parent8a6abf9ac1ce0bae427e202b857d03b89086bb8d (diff)
parent57a928b4bc1076b169ecc95e38ab23cf79e03280 (diff)
downloadotp-e038cbe699acc19901e10b9569a3b783e900582d.tar.gz
otp-e038cbe699acc19901e10b9569a3b783e900582d.tar.bz2
otp-e038cbe699acc19901e10b9569a3b783e900582d.zip
Merge branch 'maint'
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/inets/src/http_server/mod_dir.erl')
-rw-r--r--lib/inets/src/http_server/mod_dir.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/inets/src/http_server/mod_dir.erl b/lib/inets/src/http_server/mod_dir.erl
index 9d848ac013..2d8f27af3c 100644
--- a/lib/inets/src/http_server/mod_dir.erl
+++ b/lib/inets/src/http_server/mod_dir.erl
@@ -125,12 +125,13 @@ header(Path,RequestURI) ->
RequestURI ++ "</H1>\n<PRE><IMG SRC=\"" ++ icon(blank) ++
"\" ALT=" "> Name Last modified "
"Size Description <HR>\n",
- case inets_regexp:sub(RequestURI,"[^/]*\$","") of
- {ok,"/",_} ->
+ case re:replace(RequestURI,"[^/]*\$","", [{return,list}]) of
+ "/" ->
Header;
- {ok,ParentRequestURI,_} ->
- {ok,ParentPath,_} =
- inets_regexp:sub(string:strip(Path,right,$/),"[^/]*\$",""),
+ ParentRequestURI ->
+ ParentPath =
+ re:replace(string:strip(Path,right,$/),"[^/]*\$","",
+ [{return,list}]),
Header++format(ParentPath,ParentRequestURI)
end.