diff options
author | Erlang/OTP <[email protected]> | 2016-06-13 13:21:25 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-06-13 13:21:25 +0200 |
commit | f49147853a4bfa1ef5629639ab740a4e87c4a509 (patch) | |
tree | ef5c23407366c007a4393ac60bf63be9022a6af6 /lib/inets/src/http_server/httpd_conf.erl | |
parent | 2f9546b5c1eeacad9011f23ca4d03d6585d4280a (diff) | |
parent | 26dae7637ddf42419aef0744a2f5bd57d17f6416 (diff) | |
download | otp-f49147853a4bfa1ef5629639ab740a4e87c4a509.tar.gz otp-f49147853a4bfa1ef5629639ab740a4e87c4a509.tar.bz2 otp-f49147853a4bfa1ef5629639ab740a4e87c4a509.zip |
Merge branch 'ingela/inets/clean-white-space/OTP-13663' into maint-18
* ingela/inets/clean-white-space/OTP-13663:
inets: Prepare for release
inets: Handle multiple \t in mime types file
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 a7783bc1e9..132e1b5b7a 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)]. |