HTTP-Parser

 view release on metacpan or  search on metacpan

t/1.t  view on Meta::CPAN

  $result = $parser->add("$line\x0d\x0a");
  is($result,shift @ok,"Passing '$line'");
}

# <3>
if($result) {
  skip "Didn't get response object", 3;
} else {
  my $res = $parser->object;
  isa_ok($res, 'HTTP::Response');
  is($res->header('content-type'), 'text/plain', 'content type is correct');
  is($res->content, "Some content!\x0d\x0a", 'content is correct');
}

# <1>
$parser = HTTP::Parser->new(request => 1);
$parser->add("GET //foo///bar/baz HTTP/1.1\x0d\x0a\x0d\x0a");
is $parser->request->uri->path, '//foo///bar/baz';



( run in 1.825 second using v1.01-cache-2.11-cpan-524268b4103 )