logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Perlbal::XS::HTTPHeaders - Perlbal extension for processing HTTP headers.

Author

       Mark Smith, <junior@danga.com>

Description

       This module is used to read HTTP headers from a string and to parse them into an internal storage format
       for easy access and modification.  You can also ask the module to reconstitute the headers into one big
       string, useful if you're writing a proxy and need to read and write headers while maintaining the ability
       to modify individual parts of the whole.

       The goal is to be fast.  This is a lot faster than doing all of the text processing in Perl directly, and
       a lot of the flexibility of Perl is maintained by implementing the library in Perl and descending from
       Perlbal::HTTPHeaders.

   Exportableconstants
         H_REQUEST
         H_RESPONSE
         M_GET
         M_POST
         M_HEAD
         M_OPTIONS
         M_PUT
         M_DELETE

Known Bugs

       There are no known bugs at this time.  Please report any you find!

Name

       Perlbal::XS::HTTPHeaders - Perlbal extension for processing HTTP headers.

See Also

       Perlbal, and by extension this module, can be discussed by joining the Perlbal mailing list on
       http://lists.danga.com/.

       Please see the original HTTPHeaders module implemented entirely in Perl in the Perlbal source tree
       available at http://cvs.danga.com/ in the wcmtools repository perlbal/lib/Perlbal/ directory.

Synopsis

         use HTTPHeaders;

         my $hdr = Perlbal::XS::HTTPHeaders->new("GET / HTTP/1.0\r\nConnection: keep-alive\r\n\r\n");
         if ($hdr->getMethod == M_GET()) {
           print "GET: ", $hdr->getURI(), "\n";
           print "Connection: ", $hdr->getHeader('Connection'), "\n";
         }

See Also