aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-08-15 09:44:04 +0200
committerIngela Anderton Andin <[email protected]>2018-08-15 09:44:04 +0200
commit240e1c58958ff0429b54f1e237ed989efe0adc49 (patch)
treefe3801eb80156491f562f08b1529b1845272c033 /lib/inets/src
parenta0820c62f32ce7ba49a0b90c1af314df99d0eb80 (diff)
parentdbfb70c1a15e6f4b012f3deb3cd993346f9e7f37 (diff)
downloadotp-240e1c58958ff0429b54f1e237ed989efe0adc49.tar.gz
otp-240e1c58958ff0429b54f1e237ed989efe0adc49.tar.bz2
otp-240e1c58958ff0429b54f1e237ed989efe0adc49.zip
Merge branch 'ingela/inets/status-501/ERIERL-218/OTP-15215' into maint
* ingela/inets/status-501/ERIERL-218/OTP-15215: 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