diff options
author | Ingela Anderton Andin <[email protected]> | 2018-08-07 09:29:35 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-08-14 16:24:27 +0200 |
commit | c5f31c0a5231b587240b440ec07a7de02e5f2a27 (patch) | |
tree | e4a2d28eac59953ae521247fa07862611ce443ad /lib/inets/src | |
parent | aa490b13a7f98e54c48fea3537f02614f1145ffc (diff) | |
download | otp-c5f31c0a5231b587240b440ec07a7de02e5f2a27.tar.gz otp-c5f31c0a5231b587240b440ec07a7de02e5f2a27.tar.bz2 otp-c5f31c0a5231b587240b440ec07a7de02e5f2a27.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 6b9053fda6..0bcdee1e16 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 |