diff options
author | Martin Cox <[email protected]> | 2017-05-02 21:24:04 +0100 |
---|---|---|
committer | Martin Cox <[email protected]> | 2017-05-02 21:24:04 +0100 |
commit | e2b0e1828957e53063a2fa8f39188017a44a2c32 (patch) | |
tree | 15b7d4dd5b611da8cfc08f45d81c429b01c86c76 /lib/inets | |
parent | ffd6bb83f541091d169a0fa556f4c6d307b9b043 (diff) | |
download | otp-e2b0e1828957e53063a2fa8f39188017a44a2c32.tar.gz otp-e2b0e1828957e53063a2fa8f39188017a44a2c32.tar.bz2 otp-e2b0e1828957e53063a2fa8f39188017a44a2c32.zip |
Added test in httpd_basic_SUTE to validate the correct handling of non-DST dates
in the httpd_util:rfc1123_date/1 function.
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/test/httpd_basic_SUITE.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl index f413248092..a0a38ca103 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 %%------------------------------------------------------------------------- |