2006-08-20

 

[mod_perl] Looping through request headers

After a lot of experimenting, I found the following code snippet to work best:


my $headers = $r->headers_in();

$r->content_type( 'text/plain' );
print "Debug Dump\n\n";

$headers->do("my_filter");
return "Apache2\:\:Const\:\:OK";

sub my_filter {

my ($key, $value) = @_;
print "$key => $value\n";
return 1;

}


Resources:


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?