aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-11-10 15:38:03 +0100
committerIngela Anderton Andin <[email protected]>2017-11-10 15:38:03 +0100
commit3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f (patch)
tree33825e3233f32dc1916aaf1504b6cdcca0cf33ca /lib/inets
parentcca58959662d473bb329e41a84b5b260bf96a26b (diff)
parent84f29ab803e8f36ef058a47f4c2b224f4dd58220 (diff)
downloadotp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.tar.gz
otp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.tar.bz2
otp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.zip
Merge branch 'maint-20' into maint
* maint-20: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Stop assuming that all schedulers are managed when updating msacc
Diffstat (limited to 'lib/inets')
-rw-r--r--lib/inets/doc/src/notes.xml21
-rw-r--r--lib/inets/src/http_server/httpd_esi.erl2
-rw-r--r--lib/inets/src/http_server/httpd_example.erl2
-rw-r--r--lib/inets/src/inets_app/inets.appup.src4
-rw-r--r--lib/inets/test/http_format_SUITE.erl5
-rw-r--r--lib/inets/test/httpd_SUITE.erl7
-rw-r--r--lib/inets/vsn.mk2
7 files changed, 36 insertions, 7 deletions
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index 1ff6aefaa7..07e29b5542 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -33,7 +33,26 @@
<file>notes.xml</file>
</header>
- <section><title>Inets 6.4.3</title>
+ <section><title>Inets 6.4.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Correct the handling of location headers so that the
+ status code is not hard coded. This should have been
+ fixed by commit 2cc5ba70cbbc6b3ace81a2a0324417c3b65265bb
+ but unfortunately was broken during a code refactoring
+ and unnoticed due to a faulty placed test case.</p>
+ <p>
+ Own Id: OTP-14761</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 6.4.3</title>
<section><title>Improvements and New Features</title>
<list>
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(),
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index a86413147c..fdf4cc6e07 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -18,10 +18,14 @@
%% %CopyrightEnd%
{"%VSN%",
[
+ {<<"6.4.3">>, [{load_module, httpd_esi,
+ soft_purge, soft_purge, []}]},
{<<"6\\..*">>,[{restart_application, inets}]},
{<<"5\\..*">>,[{restart_application, inets}]}
],
[
+ {<<"6.4.3">>, [{load_module, httpd_esi,
+ soft_purge, soft_purge, []}]},
{<<"6\\..*">>,[{restart_application, inets}]},
{<<"5\\..*">>,[{restart_application, inets}]}
]
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index 9a13ed3d17..647eff4f7c 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -536,7 +536,10 @@ esi_parse_headers(Config) when is_list(Config) ->
httpd_esi:handle_headers(Headers2),
{ok,[{"location","/foo/bar.html"}], 302} =
- httpd_esi:handle_headers("location:/foo/bar.html\r\n").
+ httpd_esi:handle_headers("location:/foo/bar.html\r\n"),
+
+ {ok,[{"location","http://foo/bar.html"}],201} =
+ httpd_esi:handle_headers("status:201 Created\r\nlocation:http://foo/bar.html\r\n").
%%--------------------------------------------------------------------
cgi_parse_headers() ->
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 0c649d9abf..9a85c51d24 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -923,8 +923,11 @@ esi(Config) when is_list(Config) ->
{no_header, "cache-control"}]),
ok = http_status("GET /cgi-bin/erl/httpd_example:peer ",
Config, [{statuscode, 200},
- {header, "peer-cert-exist", peer(Config)}]).
-
+ {header, "peer-cert-exist", peer(Config)}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:new_status_and_location ",
+ Config, [{statuscode, 201},
+ {header, "location"}]).
+
%%-------------------------------------------------------------------------
esi_put() ->
[{doc, "Test mod_esi PUT"}].
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 108d259823..560d524bac 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -19,6 +19,6 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 6.4.3
+INETS_VSN = 6.4.4
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"