Skip Menu |

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

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

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

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



Subject: Zero (and other false values) in query params are not recorded
--- Logger.pm.orig Thu Jul 8 14:50:53 2004 +++ lib/HTTP/Recorder/Logger.pm Thu Jul 8 14:49:27 2004 @@ -150,11 +150,11 @@ my $self = shift; my %args = ( name => undef, - value => undef, + value => '', @_ ); - return unless $args{name} && $args{value}; + return unless $args{name}; $self->Log("field", "\"$args{name}\", \"$args{value}\""); } --- Recorder.pm.orig Thu Jul 8 15:04:47 2004 +++ lib/HTTP/Recorder.pm Wed Jun 16 20:39:48 2004 @@ -255,7 +255,7 @@ if ($param =~ m/^$self->{prefix}-form-(\d+)-(.*?)$/) { my $temp = $param; $temp =~ s/^$self->{prefix}-form-(\d+)-//g; - $fields{$temp} = $values->{$temp} if $values->{$temp}; + $fields{$temp} = $values->{$temp} if exists $values->{$temp}; } } @@ -361,7 +361,7 @@ $val = (defined $val) ? uri_unescape($val) : ''; $key = uri_unescape($key); - $values->{$key} = $val if $val; + $values->{$key} = $val; } }
Do you have an example of a simple page that demonstrates this behavior? I'll take a look at it. Linda
I didn't use your patch, but I did add this change. We'll see if it actually now records too much...if so, I'll consider a preference to do differently.