From eebfa937b9c08a25b195909581274c7753bc77ef Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 17 Jul 2018 11:54:43 +0200 Subject: inets: Improve error handling --- lib/inets/src/http_server/httpd_file.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/inets/src/http_server') diff --git a/lib/inets/src/http_server/httpd_file.erl b/lib/inets/src/http_server/httpd_file.erl index 4d419172d0..fb71834e95 100644 --- a/lib/inets/src/http_server/httpd_file.erl +++ b/lib/inets/src/http_server/httpd_file.erl @@ -33,6 +33,9 @@ handle_error(enoent, Op, ModData, Path) -> handle_error(enotdir, Op, ModData, Path) -> handle_error(404, Op, ModData, Path, ": A component of the file name is not a directory"); +handle_error(eisdir, Op, ModData, Path) -> + handle_error(403, Op, ModData, Path, + ":Ilegal operation expected a file not a directory"); handle_error(emfile, Op, _ModData, Path) -> handle_error(500, Op, none, Path, ": Too many open files"); handle_error({enfile,_}, Op, _ModData, Path) -> -- cgit v1.2.3