# HG changeset patch # User Maxim Dounin # Date 1403469110 -14400 # Node ID 1bdd58f388f64c8650fe0f73feb474d6bb6e17ac # Parent 5c25acbc870ad9b9f0c028ea84e72b54a94e9d86 Tests: weak etag tests. diff --git a/not_modified.t b/not_modified.t --- a/not_modified.t +++ b/not_modified.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has('http')->plan(12) +my $t = Test::Nginx->new()->has('http')->plan(14) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -80,11 +80,19 @@ like(http_get_inm('/t', '"foo", "bar", ' 'if-none-match with complex list'); like(http_get_inm('/t', '*'), qr/304/, 'if-none-match all'); +TODO: { +local $TODO = 'not yet'; + +like(http_get_inm('/t', 'W/' . $etag), qr/304/, 'if-none-match weak'); + +} + like(http_get_im('/t', $etag), qr/200/, 'if-match'); like(http_get_im('/t', '"foo"'), qr/412/, 'if-match fail'); like(http_get_im('/t', '"foo", "bar", ' . "\t" . $etag . ' , "baz"'), qr/200/, 'if-match with complex list'); like(http_get_im('/t', '*'), qr/200/, 'if-match all'); +like(http_get_im('/t', 'W/' . $etag), qr/412/, 'if-match weak fail'); ###############################################################################