NAME
Net::FastCGI::Header - Object representation of a FCGI_Header
SYNOPSIS
# Constructors
$header = Net::FastCGI::Header->new($type, $request_id);
$header = Net::FastCGI::Header->new($type, $request_id, $content_length);
$header = Net::FastCGI::Header->new($type, $request_id, $content_length, $padding_length);
$header = Net::FastCGI::Header->parse($octets);
# Methods
$octets = $header->build;
$type = $header->get_type;
$request_id = $header->get_request_id;
$content_length = $header->get_content_length;
$padding_length = $header->get_padding_length;
$boolean = $header->has_content;
$boolean = $header->has_padding;
$string = $header->to_string;
DESCRIPTION
CONSTRUCTORS
new
Constructs an instance of Net::FastCGI::Header
.
Usage
$header = Net::FastCGI::Header->new($type, $request_id);
$header = Net::FastCGI::Header->new($type, $request_id, $content_length);
$header = Net::FastCGI::Header->new($type, $request_id, $content_length, $padding_length);
Arguments
$type
-
An unsigned 8-bit integer.
$request_id
-
An unsigned 16-bit integer.
$content_length
(optional)-
An unsigned 16-bit integer. Defaults to
0
. $padding_length
(optional)-
An unsigned 8-bit integer. Defaults to
compute_padding_length($content_length)
.
Returns
parse
Parses a FCGI_Header
.
Usage
$header = Net::FastCGI::Header->parse($octets);
Arguments
$octets
-
A string of octets containing the header, must be greater than or equal to 8 octets in length.
Returns
METHODS
build
Usage
$octets = $header->build;
Returns
get_type
Usage
$type = $header->get_type;
Returns
get_request_id
Usage
$request_id = $header->get_request_id;
Returns
get_content_length
Usage
$content_length = $header->get_content_length;
Returns
get_padding_length
Usage
$padding_length = $header->get_padding_length;
Returns
has_content
Usage
$boolean = $header->has_content;
Returns
has_padding
Usage
$boolean = $header->has_padding;
Returns
to_string
Usage
$string = $header->to_string;
Returns
EXPORTS
None.
SEE ALSO
- http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S3.3
- "build_header" in Net::FastCGI::Protocol
- "parse_header" in Net::FastCGI::Protocol
AUTHOR
Christian Hansen chansen@cpan.org
COPYRIGHT
Copyright (c) 2008 Christian Hansen. All rights reserved.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.