[Rt-commit] rt branch, 4.2/rt-mailgate-agent, created. rt-4.2.3-85-g59b2209

Alex Vandiver alexmv at bestpractical.com
Wed Apr 16 16:28:57 EDT 2014


The branch, 4.2/rt-mailgate-agent has been created
        at  59b2209d4731856a459f6ea7fc5293b76f9647b1 (commit)

- Log -----------------------------------------------------------------
commit 59b2209d4731856a459f6ea7fc5293b76f9647b1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Apr 16 16:27:32 2014 -0400

    Provide the RT version in mailgate user-agent, in addition to LWP's
    
    Setting ->agent with a trailing space causes LWP to _also_ append its
    own version, as it did previously.  This commit thus merely causes us to
    include additional information.
    
    Fixes I#18420.

diff --git a/bin/rt-mailgate.in b/bin/rt-mailgate.in
index b270c4c..3c5bd0a 100644
--- a/bin/rt-mailgate.in
+++ b/bin/rt-mailgate.in
@@ -151,6 +151,7 @@ sub get_useragent {
     my $self = shift;
     my $opts = shift;
     my $ua   = LWP::UserAgent->new();
+    $ua->agent("rt-mailgate/@RT_VERSION_MAJOR at .@RT_VERSION_MINOR at .@RT_VERSION_PATCH@ ");
     $ua->cookie_jar( { file => $opts->{'jar'} } ) if $opts->{'jar'};
 
     $ua->ssl_opts( verify_hostname => $opts->{'verify-ssl'} );

-----------------------------------------------------------------------


More information about the rt-commit mailing list