From f7bebe99a5809c0c32178a8c35ca9f0fe1ea652e Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Fri, 2 Jul 2021 03:48:04 -0400 Subject: [tests] use generated date in HTTP If conditionals replace hard-coded date in HTTP If conditional tests x-ref: "Make tests pass after 2035" https://github.com/lighttpd/lighttpd1.4/pull/106 github: closes #106 --- tests/request.t | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/request.t') diff --git a/tests/request.t b/tests/request.t index 432bb51e..ea4b1fb7 100755 --- a/tests/request.t +++ b/tests/request.t @@ -460,10 +460,12 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; ok($tf->handle_http($t) == 0, 'OPTIONS for RTSP'); +my $nextyr = (gmtime(time()))[5] + 1900 + 1; + $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; @@ -484,8 +486,8 @@ ok($tf->handle_http($t) == 0, 'broken If-Modified-Since'); $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; @@ -493,7 +495,7 @@ ok($tf->handle_http($t) == 0, 'Similar Headers (bug #1287)'); $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, 'Content-Type' => 'text/html' } ]; @@ -501,7 +503,7 @@ ok($tf->handle_http($t) == 0, 'If-Modified-Since'); $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, '-Content-Length' => '' } ]; -- cgit v1.2.1