Sniffer::Connection::HTTP - Callbacks for a HTTP connection


Sniffer-HTTP documentation  | view source Contained in the Sniffer-HTTP distribution.

Index


NAME

Top

Sniffer::Connection::HTTP - Callbacks for a HTTP connection

SYNOPSIS

Top

You shouldn't use this directly but via Sniffer::HTTP which encapsulates most of this.

  my $sniffer = Sniffer::Connection::HTTP->new(
    callbacks => {
      request  => sub { my ($req,$conn) = @_; print $req->uri,"\n" if $req },
      response => sub { my ($res,$req,$conn) = @_; print $res->code,"\n" },
    }
  );

  # retrieve TCP packet in $tcp, for example via Net::Pcap
  my $tcp = sniff_tcp_packet;

  $sniffer->handle_packet($tcp);

TODO

Top

BUGS

Top

The whole module suite has almost no tests.

If you experience problems, please supply me with a complete, relevant packet dump as the included dump-raw.pl creates. Even better, supply me with (failing) tests.

AUTHOR

Top

Max Maischein (corion@cpan.org)

COPYRIGHT

Top


Sniffer-HTTP documentation  | view source Contained in the Sniffer-HTTP distribution.