diff options
author | Henrik Nord <[email protected]> | 2016-06-14 10:21:38 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2016-06-14 10:21:38 +0200 |
commit | 0c8357d15dd2573331056a308e3744927ce406ad (patch) | |
tree | 6b119202c4c879c797d7a792ae1dedab183a5d73 /lib/inets/src/http_server/httpd_conf.erl | |
parent | 64515dcead288dacf4876eb0502c755f08427977 (diff) | |
parent | 53e7743216647d810d529e397bd3ea7278c6047c (diff) | |
download | otp-0c8357d15dd2573331056a308e3744927ce406ad.tar.gz otp-0c8357d15dd2573331056a308e3744927ce406ad.tar.bz2 otp-0c8357d15dd2573331056a308e3744927ce406ad.zip |
Merge branch 'maint'
Conflicts:
OTP_VERSION
lib/inets/vsn.mk
lib/ssl/test/ssl_basic_SUITE.erl
lib/ssl/vsn.mk
Diffstat (limited to 'lib/inets/src/http_server/httpd_conf.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_conf.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl index 6a801c973d..e5182ca23c 100644 --- a/lib/inets/src/http_server/httpd_conf.erl +++ b/lib/inets/src/http_server/httpd_conf.erl @@ -1004,7 +1004,8 @@ read_config_file(Stream, SoFar) -> %% Ignore commented lines for efficiency later .. read_config_file(Stream, SoFar); Line -> - NewLine = re:replace(clean(Line),"[\t\r\f ]"," ", [{return,list}]), + NewLine = re:replace(white_space_clean(Line), + "[\t\r\f ]"," ", [{return,list}, global]), case NewLine of [] -> %% Also ignore empty lines .. @@ -1020,7 +1021,7 @@ parse_mime_types(Stream,MimeTypesList) -> eof -> eof; String -> - white_space_clean(String) + re:replace(white_space_clean(String), "[\t\r\f ]"," ", [{return,list}, global]) end, parse_mime_types(Stream, MimeTypesList, Line). parse_mime_types(Stream, MimeTypesList, eof) -> @@ -1042,6 +1043,8 @@ parse_mime_types(Stream, MimeTypesList, Line) -> suffixes(_MimeType,[]) -> []; +suffixes(MimeType,[""|Rest]) -> + suffixes(MimeType, Rest); suffixes(MimeType,[Suffix|Rest]) -> [{Suffix,MimeType}|suffixes(MimeType,Rest)]. |