APR-HTTP-Headers-Compat

 view release on metacpan or  search on metacpan

t/compat/base/headers.t  view on Meta::CPAN

is( j( $h->clone->remove_header( "Baz" ) ),                "2|3" );
is( j( $h->clone->remove_header( qw(Foo Bar Baz Not-There) ) ),
  "1|2|2|3" );
is( j( $h->clone->remove_header( "Not-There" ) ), "" );

$h = mk(
  allow            => "GET",
  content          => "none",
  content_type     => "text/html",
  content_md5      => "dummy",
  content_encoding => "gzip",
  content_foo      => "bar",
  last_modified    => "yesterday",
  expires          => "tomorrow",
  etag             => "abc",
  date             => "today",
  user_agent       => "libwww-perl",
  zoo              => "foo",
);
is( $h->as_string, <<EOT);
Date: today

t/compat/base/headers.t  view on Meta::CPAN

ok( $h->content_is_html );
ok( !$h->content_is_xhtml );
ok( !$h->content_is_xml );
$h->content_type( "application/xhtml+xml" );
ok( $h->content_is_html );
ok( $h->content_is_xhtml );
ok( $h->content_is_xml );
is( $h->content_type( "text/html;\n charSet = \"ISO-8859-1\"; Foo=1 " ),
  "application/xhtml+xml" );

is( $h->content_encoding,           undef );
is( $h->content_encoding( "gzip" ), undef );
is( $h->content_encoding,           "gzip" );
is( j( $h->header_field_names ),    "Content-Encoding|Content-Type" );

is( $h->content_language,         undef );
is( $h->content_language( "no" ), undef );
is( $h->content_language,         "no" );

is( $h->title,                     undef );
is( $h->title( "This is a test" ), undef );
is( $h->title,                     "This is a test" );



( run in 0.263 second using v1.01-cache-2.11-cpan-4d50c553e7e )