HTTP-HeaderParser-XS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - fixed so you can't enable XS module twice in a row with weird behavior
    - fixed last call to delete to be a Safefree call
    - removed extraneous printfs and comments from XS code

0.11  Tue Jan 11 10:41:40 PST 2005
    - removed some unused variables
    - removed and cleaned up extraneous comments

0.10  Mon Jan 10 10:39:05 PST 2005
    - fixed a memory leak in header replacement code
    - updated res_keep_alive function to fix bug in 1.1 keep-alive handling
    - revamped getReconstructed function to be more paranoid about inputs

0.09  Fri Jan  7 17:47:53 PST 2005
    - fixed bug causing incorrect parsing of empty header strings

0.08  Thu Nov  4 17:16:10 PST 2004
    - implemented header combining (comma separated header values)
    - fixed a bunch of calls to C functions in Perl code for compatibility
    - added a few more test cases

0.07  Wed Nov  3 17:51:56 PST 2004
    - fixed segfault with returning NULL instead of Perl's undef
    - implemented set_version, req_keep_alive, res_keep_alive, etc
    - made XS interface for Perlbal to enable/disable XS headers
    - modified object blesser so we always bless into Perlbal::XS::HTTPHeaders

0.06  Tue Oct 26 13:26:30 PDT 2004
    - fixed bug where calling setHeader to create a header failed
    - converted to_string_ref from Perl module to XS module
    - made constructor take SV * instead of char *
    - updated findHeader to use strncasecmp (thanks Brad)
    - made parseHeaders get called by XS, not automatically by new
    - firstLine is now an SV *

lib/HTTP/HeaderParser/XS.pm  view on Meta::CPAN

__END__

=head1 NAME

HTTP::HeaderParser::XS - an XS extension for processing HTTP headers.

=head1 SYNOPSIS

  use HTTP::HeaderParser::XS;

  my $hdr = HTTP::HeaderParser::XS->new( \"GET / HTTP/1.0\r\nConnection: keep-alive\r\nHost: www.bar.com\r\n\r\n" );

  if ( $hdr->isResponse ) {
    # this is not a response in this simple demo, but it could be
    print "Response code: " . $hdr->getStatusCode . "\n";
    print "Connection header: " . $hdr->getHeader( 'Connection' ) . "\n";

  } else {
    # see if it's a GET request
    if ( $hdr->getMethod == M_GET ) {
      print "GET: " . $hdr->getURI() . "\n";



( run in 1.272 second using v1.01-cache-2.11-cpan-71847e10f99 )