Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Perl module HTTP::Parser
Perl
tree: 99b9d85aad

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
t
Changes
MANIFEST
Makefile.PL
Parser.pm
README

README

HTTP/Parser
===========

HTTP::Parser is a stateful HTTP request parsing module.

It accepts chunks of data passed to it and returns either a completion hint
or an HTTP::Request object when it has the entire request.  It was originally
written to be part of a simple Event.pm-based HTTP server.

e.g.

 my $parser = HTTP::Parser->new();
 my @lines = ('GET / HTTP/1.1','Host: localhost','Connection: close','','');

 my $result;
 while my $line(@lines) {
   $result = $parser->add("$line\x0d\x0a");
   print "passing '$line' got '$result'\n";
 }
 print $result->as_string();

gives:

 GET /
 Connection: close
 Host: localhost
 X-HTTP-Version: 1.1

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  perl 5.6.1

  HTTP::Request
  URI

COPYRIGHT AND LICENCE

Copyright (C) 2004 David B. Robins

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. 

Something went wrong with that request. Please try again.