Skip Menu |

This queue is for tickets about the HTTP-Recorder CPAN distribution.

Report information
The Basics
Id: 6711
Status: resolved
Priority: 0/
Queue: HTTP-Recorder

People
Owner: leira [...] cpan.org
Requestors: alex [...] kapranoff.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03_01
Fixed in: (no value)



Subject: [patch] HTTP::Recorder clutters log with favicon requests
--- Recorder.pm.1 Tue Jun 22 17:31:06 2004 +++ lib/HTTP/Recorder.pm Tue Jun 22 17:31:34 2004 @@ -90,6 +90,8 @@ $self->{control} = $args{control} || "http-recorder"; $self->{logger} = $args{logger} || new HTTP::Recorder::Logger(file => $args{file}); + $self->{ignore_favicon} = $args{ignore_favicon} + || 0; return $self; } @@ -133,6 +135,15 @@ sub logger { shift->_elem('logger', @_); } +=head2 B<$agent->ignore_favicon([$value])> + +Get or set ignore_favicon flag that causes L<HTTP::Recorder> to skip +logging requests which match /favicon\.ico$/. + +=cut + +sub ignore_favicon { shift->_elem('ignore_favicon', @_); } + =head2 B<$agent->file([$value])> Get or set the filename for generated scripts. The default is @@ -191,7 +202,9 @@ $content, ); } else { - $request = $self->modify_request ($request); + $request = $self->modify_request ($request) + unless $self->{ignore_favicon} + && $request->uri->path =~ /favicon\.ico$/; $response = $self->SUPER::send_request( $request );
I applied this patch, with one exception: I turned this option on by default. Thanks for the patch. It'll be in the next release. Linda