File: apache-http10.t

package info (click to toggle)
libwww-perl 6.81-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,028 kB
  • sloc: perl: 4,148; makefile: 10; sh: 6
file content (18 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Test::More;
use Test::RequiresInternet ('www.google.com' => 80);

use HTTP::Request ();
use LWP::UserAgent ();

plan tests => 2;

my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(HEAD => "http://www.google.com/");

$req->protocol("HTTP/1.0");

my $res = $ua->simple_request($req);
isa_ok($res, 'HTTP::Response', 'simple_request: Got a proper response');
is($res->protocol, 'HTTP/1.0', 'Request to google.com: Got an HTTP 1.0 response');