aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/mod_dir.erl
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-01-29 17:43:37 +0100
committerZandra <[email protected]>2016-01-29 17:43:37 +0100
commit57a928b4bc1076b169ecc95e38ab23cf79e03280 (patch)
treeb6edbc2d2238d742772239f7dd64556067071b2f /lib/inets/src/http_server/mod_dir.erl
parent3eb54b2053f76d3d47eed8774153be0f7a5016c3 (diff)
parentd96471b3f404f7341279d8598dd74d92fb1a923c (diff)
downloadotp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.gz
otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.bz2
otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.zip
Merge branch 'maint-18' into maint
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.