diff options
author | Ingela Anderton Andin <[email protected]> | 2017-11-07 10:25:16 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-11-09 09:56:15 +0100 |
commit | 4dcabdcc5ab7f41189ec3937e84b323d80d6df57 (patch) | |
tree | 0d1b43faac84e28f2cabf4a1dbe020b84087cf72 /lib/inets/src | |
parent | 3e8c1ff94c0a73df71daadd4eb782c21c49f22d9 (diff) | |
download | otp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.tar.gz otp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.tar.bz2 otp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.zip |
inets: Add missing guard
Add test in the correct place which was the reason the guard became missing
without being noticed.
Diffstat (limited to 'lib/inets/src')
-rw-r--r-- | lib/inets/src/http_server/httpd_esi.erl | 2 | ||||
-rw-r--r-- | lib/inets/src/http_server/httpd_example.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/httpd_esi.erl b/lib/inets/src/http_server/httpd_esi.erl index fd50934d00..f5493f6fad 100644 --- a/lib/inets/src/http_server/httpd_esi.erl +++ b/lib/inets/src/http_server/httpd_esi.erl @@ -86,7 +86,7 @@ handle_headers([], NewHeaders, StatusCode, _) -> handle_headers([Header | Headers], NewHeaders, StatusCode, NoESIStatus) -> {FieldName, FieldValue} = httpd_response:split_header(Header, []), case FieldName of - "location" -> + "location" when NoESIStatus == true -> handle_headers(Headers, [{FieldName, FieldValue} | NewHeaders], 302, NoESIStatus); diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl index adbbf64685..47a8c48d01 100644 --- a/lib/inets/src/http_server/httpd_example.erl +++ b/lib/inets/src/http_server/httpd_example.erl @@ -91,7 +91,7 @@ yahoo(_Env,_Input) -> "Location: http://www.yahoo.com\r\n\r\n". new_status_and_location(_Env,_Input) -> - "status:201\r\n Location: http://www.yahoo.com\r\n\r\n". + "status:201 Created\r\n Location: http://www.yahoo.com\r\n\r\n". default(Env,Input) -> [header(), |