Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rjray/http-parser
Perl module HTTP::Parser
https://github.com/rjray/http-parser
Last synced: 26 days ago
JSON representation
Perl module HTTP::Parser
- Host: GitHub
- URL: https://github.com/rjray/http-parser
- Owner: rjray
- Created: 2009-09-12T19:19:11.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-09-13T19:06:38.000Z (over 15 years ago)
- Last Synced: 2023-04-13T08:26:46.526Z (over 1 year ago)
- Language: Perl
- Homepage: http://search.cpan.org/dist/HTTP-Parser
- Size: 82 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
HTTP/Parser
===========HTTP::Parser is a stateful HTTP request/response parsing module.
It accepts chunks of data passed to it and returns either a completion hint
or an HTTP::Request (or Response) 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.1INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make installDEPENDENCIES
This module requires these other modules and libraries:
perl 5.6.1
HTTP::Request
HTTP::Response (both part of libwww-perl)
URICOPYRIGHT AND LICENCE
Copyright (C) 2004-2007 David B. Robins
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.