• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

t/H06-Mar-2011-8465

ChangesH A D06-Mar-20111.8 KiB4133

MANIFESTH A D08-Feb-2010131 87

META.ymlH A D06-Mar-2011656 2625

Makefile.PLH A D06-Mar-2011733 1916

Parser.pmH A D06-Mar-201111.1 KiB428168

READMEH A D06-Mar-20111.2 KiB5938

README

1HTTP/Parser
2===========
3
4HTTP::Parser is a stateful HTTP request/response parsing module.
5
6It accepts chunks of data passed to it and returns either a completion hint
7or an HTTP::Request (or Response) object when it has the entire request.  It
8was originally written to be part of a simple Event.pm-based HTTP server.
9
10e.g.
11
12 use HTTP::Parser;
13
14 my $parser = HTTP::Parser->new();
15 my @lines = ('GET / HTTP/1.1','Host: localhost','Connection: close','','');
16
17 my $result;
18 foreach my $line (@lines) {
19   $result = $parser->add("$line\x0d\x0a");
20   print "passing '$line' got '$result'\n";
21 }
22 print $parser->object->as_string();
23
24
25gives:
26
27 GET /
28 Connection: close
29 Host: localhost
30 X-HTTP-Version: 1.1
31
32INSTALLATION
33
34To install this module type the following:
35
36   perl Makefile.PL
37   make
38   make test
39   make install
40
41DEPENDENCIES
42
43This module requires these other modules and libraries:
44
45  perl 5.6.1
46
47  HTTP::Request
48  HTTP::Response (both part of libwww-perl)
49  URI
50
51COPYRIGHT AND LICENCE
52
53Copyright (C) 2004-2007 David B. Robins
54Some fixes for 0.05 supplied by David Cannings
55
56This library is free software; you can redistribute it and/or modify
57it under the same terms as Perl itself.
58
59