CGI-Debug

 view release on metacpan or  search on metacpan

Debug.pm  view on Meta::CPAN

	my $pos = pos($$ofr);
	$lcrlf = $3;

	while()
	{
	    if( $$ofr =~ m/\G[ \t]+($nctl)$lcrlf/gmco )
	    {
		$val .= $1;
		next;
	    }
	    if( $name =~ m/content-type/i )
	    {
		$content = 'text/html' if $val=~ m/\btext\/html\b/sio;
		$content = 'text/plain' if $val=~ m/\btext\/plain\b/sio;
	    }

	    $$ofr =~ m/\G($token):($nctl)$lcrlf/gmco;
	    $name = $1; $val = $2;

	    last if $pos == pos($$ofr);
	    $pos = pos($$ofr);

Debug.pm  view on Meta::CPAN


=head2 header control

  Cookie / ENV: CGI-Debug-header=control

  Import: header => 'control'

Controls that the HTTP-header is correct.

This control will follow the HTTP RFC to the point. It reports if the
header is ok, if the content-type is text/html, and the length of the
HTTP-body. That information will be used by other parts of
CGI::Debug.  This is done by redirecting STDOUT to a temporary file.
This is the only control that must be set in the beginning of the
program.  All other controls can be changed during before the end of
the program.

=head2 header ignore

  Cookie / ENV: CGI-Debug-header=ignore



( run in 1.850 second using v1.01-cache-2.11-cpan-524268b4103 )