APR-HTTP-Headers-Compat

 view release on metacpan or  search on metacpan

lib/APR/HTTP/Headers/Compat/MagicArray.pm  view on Meta::CPAN

  return $val;
}

sub UNSHIFT {
  my ( $self, @list ) = @_;
  unshift @{ $self->{a} }, @list;
  $self->_sync;
}

sub SPLICE {
  my ( $self, $offset, $length, @list ) = @_;
  splice @{ $self->{a} }, $offset, $length, @list;
  $self->_sync;
}

sub EXISTS {
  my ( $self, $key ) = @_;
  return $key < @{ $self->{a} };
}

sub EXTEND  { }
sub DESTROY { }

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

  skip "Namespace collision; can't be helped" => 1;
  is( $h->header( ':Content_Type' ), undef );
}
is( $h->header( ':content_type' ), "text/html" );
is( $h->as_string,                 <<EOT);
Content-Type: text/plain
content_type: text/html
foo_bar: 1
EOT

# [RT#30579] IE6 appens "; length = NNNN" on If-Modified-Since (can we handle it)
$h = mk(
  if_modified_since => "Sat, 29 Oct 1994 19:43:31 GMT; length=34343" );
is( gmtime( $h->if_modified_since ), "Sat Oct 29 19:43:31 1994" );



( run in 0.427 second using v1.01-cache-2.11-cpan-65fba6d93b7 )