Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Simple CPAN distribution.

Report information
The Basics
Id: 2371
Status: resolved
Priority: 0/
Queue: Email-Simple

People
Owner: Nobody in particular
Requestors: richardc [...] unixbeard.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Wed, 9 Apr 2003 22:26:58 +0100
From: Richard Clamp <richardc [...] unixbeard.net>
To: bug-Email-Simple [...] rt.cpan.org
Subject: header_set and case sensitivity
Found this one accidentally: use Email::Simple; my $m = Email::Simple->new("Foo-Bar: Baz\n\ntest\n"); $m->header_set("Foo-bar", "quux"); print $m->as_string; Outputs Foo-Bar: Baz Foo-bar: quux test This is a fix: --- Email-Simple/Simple.pm 2003-04-07 17:31:54.000000000 +0100 +++ Email-Simple_richardc/Simple.pm 2003-04-09 22:24:44.000000000 +0100 @@ -146,7 +146,7 @@ unless $field =~ /^[\w-]+$/; } - if (!exists $self->{header_names}->{$field}) { + if (!exists $self->{header_names}->{lc $field}) { $self->{header_names}->{lc $field} = $field; # New fields are added to the end. push @{$self->{order}}, $field; -- Richard Clamp <richardc@unixbeard.net>
Fixed in 1.3. Thanks very much! Simon