aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-08-07 09:29:35 +0200
committerIngela Anderton Andin <[email protected]>2018-08-14 15:40:51 +0200
commitdbfb70c1a15e6f4b012f3deb3cd993346f9e7f37 (patch)
treefffeb0f6732ef894b4823dad4ed319d546a4328b /lib/inets/src
parente030c276981d19de5d02dd84265a292516bb7df7 (diff)
downloadotp-dbfb70c1a15e6f4b012f3deb3cd993346f9e7f37.tar.gz
otp-dbfb70c1a15e6f4b012f3deb3cd993346f9e7f37.tar.bz2
otp-dbfb70c1a15e6f4b012f3deb3cd993346f9e7f37.zip
inets: Use status code 501 when no mod_* handles the request
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_server/httpd_response.erl8
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