The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 16
META.yml 11
lib/URI/Fetch.pm 34
3 files changed (This is a version diff) 511
@@ -1,7 +1,12 @@
-# $Id: Changes 1943 2006-06-25 18:59:50Z btrott $
+# $Id: Changes 1952 2006-07-25 05:41:24Z btrott $
 
 Revision history for URI::Fetch
 
+0.08  2006.07.24
+    - Don't overwrite the User-Agent field if the caller has set it and
+      provided the UserAgent argument. Thanks to Tatsuhiko Miyagawa
+      for the patch.
+
 0.071 2006.06.25
     - Fixed broken is_error (broken in 0.07). Thanks to Tatsuhiko for the
       patch.
@@ -17,4 +17,4 @@ requires:
   LWP: 0
   Storable: 0
   URI: 0
-version: 0.071
+version: 0.08
@@ -1,4 +1,4 @@
-# $Id: Fetch.pm 1943 2006-06-25 18:59:50Z btrott $
+# $Id: Fetch.pm 1952 2006-07-25 05:41:24Z btrott $
 
 package URI::Fetch;
 use strict;
@@ -9,7 +9,7 @@ use Carp qw( croak );
 use URI;
 use URI::Fetch::Response;
 
-our $VERSION = '0.071';
+our $VERSION = '0.08';
 
 our $HAS_ZLIB;
 BEGIN {
@@ -68,7 +68,8 @@ sub fetch {
     }
 
     $ua ||= LWP::UserAgent->new;
-    $ua->agent(join '/', $class, $class->VERSION);
+    $ua->agent(join '/', $class, $class->VERSION)
+        if $ua->agent =~ /^libwww-perl/;
 
     my $req = HTTP::Request->new(GET => $uri);
     if ($HAS_ZLIB) {