IO-Stream-HTTP-Persistent

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

README
cpanfile
dist.ini
lib/IO/Stream/HTTP/Persistent.pm
t/00.load.t
t/01.export.t
t/author-perlcritic.t
t/author-pod-syntax.t
t/release-distribution.t
t/share.pm
t/uc-1.0-keepalive.t
t/uc-1.0.t
t/uc-1.1-pipelining.t
t/uc-1.1.t

t/uc-1.0-keepalive.t  view on Meta::CPAN

use warnings;
use strict;
use lib 't';
use share;

# Use case: HTTP/1.0 Keep-Alive: GET without EOF
my $request = "GET / HTTP/1.0\nHost: localhost\nConnection: Keep-Alive\n\n";
my $response = "HTTP/1.1 200 OK\nContent-Length: 3\nConnection: keep-alive\n\nok\n";

@CheckPoint = (
    [ 'client', HTTP_SENT,  undef   ], 'client: got HTTP_SENT',
    [ 'client', HTTP_RECV,  undef   ], 'client: got HTTP_RECV',
    [ 'timeout',                    ], 'timeout: no EOF',
);
plan tests => 1 + @CheckPoint/2;


my ($srv_w, $port) = start_server($request, $response);

t/uc-1.0.t  view on Meta::CPAN

use warnings;
use strict;
use lib 't';
use share;

# Use case: HTTP/1.0: GET until EOF
my $request = "GET / HTTP/1.0\nHost: localhost\n\n";
my $response = "HTTP/1.1 200 OK\nContent-Length: 3\nConnection: keep-alive\n\nok\n";

@CheckPoint = (
    [ 'client', HTTP_SENT,  undef   ], 'client: got HTTP_SENT',
    [ 'client', HTTP_RECV,  undef   ], 'client: got HTTP_RECV',
    [ 'client', EOF,        undef   ], 'client: got eof',
);
plan tests => 1 + @CheckPoint/2;


my ($srv_w, $port) = start_server($request, $response);

t/uc-1.1-pipelining.t  view on Meta::CPAN

use warnings;
use strict;
use lib 't';
use share;

# Use case: HTTP/1.1 Pipelining: GET all without EOF
my $request = "GET / HTTP/1.1\nHost: localhost\n\n";
my $response = "HTTP/1.1 200 OK\nContent-Length: 3\nConnection: keep-alive\n\nok\n";

@CheckPoint = (
    [ 'client', HTTP_SENT,  undef, 3], 'client: got HTTP_SENT (3 requests)',
    [ 'client', HTTP_RECV,  undef, 3], 'client: got HTTP_RECV',
    [ 'timeout',                    ], 'timeout: no EOF',
);
plan tests => 1 + @CheckPoint/2;


my ($srv_w, $port) = start_server($request, $response);

t/uc-1.1.t  view on Meta::CPAN

use warnings;
use strict;
use lib 't';
use share;

# Use case: HTTP/1.1: GET without EOF
my $request = "GET / HTTP/1.1\nHost: localhost\n\n";
my $response = "HTTP/1.1 200 OK\nContent-Length: 3\nConnection: keep-alive\n\nok\n";

@CheckPoint = (
    [ 'client', HTTP_SENT,  undef   ], 'client: got HTTP_SENT',
    [ 'client', HTTP_RECV,  undef   ], 'client: got HTTP_RECV',
    [ 'timeout',                    ], 'timeout: no EOF',
);
plan tests => 1 + @CheckPoint/2;


my ($srv_w, $port) = start_server($request, $response);



( run in 0.751 second using v1.01-cache-2.11-cpan-39bf76dae61 )