File 0122-Added-test-in-httpd_basic_SUTE-to-validate-the-corre.patch of Package erlang

From e2b0e1828957e53063a2fa8f39188017a44a2c32 Mon Sep 17 00:00:00 2001
From: Martin Cox <me@mar.tin.cx>
Date: Tue, 2 May 2017 21:24:04 +0100
Subject: [PATCH 2/2] Added test in httpd_basic_SUTE to validate the correct
 handling of non-DST dates in the httpd_util:rfc1123_date/1 function.

---
 lib/inets/test/httpd_basic_SUITE.erl | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index f41324809..a0a38ca10 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -42,7 +42,8 @@ all() ->
      escaped_url_in_error_body,
      script_timeout,
      slowdose,
-     keep_alive_timeout
+     keep_alive_timeout,
+     invalid_rfc1123_date
     ].
 
 groups() -> 
@@ -383,6 +384,16 @@ slowdose(Config) when is_list(Config) ->
     end.
 
 %%-------------------------------------------------------------------------
+
+invalid_rfc1123_date() ->
+    [{doc, "Test that a non-DST date is handled correcly"}].
+invalid_rfc1123_date(Config) when is_list(Config) ->
+    Rfc1123FormattedDate = "Sun, 26 Mar 2017 01:00:00 GMT",
+    NonDSTDateTime = {{2017, 03, 26},{1, 0, 0}},
+    Rfc1123FormattedDate =:= httpd_util:rfc1123_date(NonDSTDateTime).
+
+
+%%-------------------------------------------------------------------------
 %% Internal functions
 %%-------------------------------------------------------------------------
 
-- 
2.12.2

openSUSE Build Service is sponsored by