diff options
author | Ingela Anderton Andin <[email protected]> | 2018-08-07 09:29:35 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-08-15 11:43:15 +0200 |
commit | 22be1754d1e97e802e01181570a34222767c1ed6 (patch) | |
tree | 5a8be2be5b0b9da2f9c20d910909c31f46aedbc6 /lib/inets/src | |
parent | 2a5951d47566fde2c82ac85088f9df77bd730bcf (diff) | |
download | otp-22be1754d1e97e802e01181570a34222767c1ed6.tar.gz otp-22be1754d1e97e802e01181570a34222767c1ed6.tar.bz2 otp-22be1754d1e97e802e01181570a34222767c1ed6.zip |
inets: Use status code 501 when no mod_* handles the request
Conflicts:
lib/inets/test/httpd_SUITE.erl
Diffstat (limited to 'lib/inets/src')
-rw-r--r-- | lib/inets/src/http_server/httpd_response.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/httpd_response.erl b/lib/inets/src/http_server/httpd_response.erl index 3ee8665a54..bb946664f9 100644 --- a/lib/inets/src/http_server/httpd_response.erl +++ b/lib/inets/src/http_server/httpd_response.erl @@ -61,8 +61,12 @@ generate_and_send_response(#mod{config_db = ConfigDB} = ModData) -> {StatusCode, Response} -> %% Old way send_response_old(ModData, StatusCode, Response), ok; - undefined -> - send_status(ModData, 500, none), + undefined -> + %% Happens when no mod_* + %% handles the request + send_status(ModData, 501, {ModData#mod.method, + ModData#mod.request_uri, + ModData#mod.http_version}), ok end end |