[dw-free] Add user-agent information to xposter and content importer, requested by LiveJournal.
[commit: http://hg.dwscoalition.org/dw-free/rev/0f75400b09e0]
Add user-agent information to xposter and content importer, requested by
LiveJournal.
Patch by
mark.
Files modified:
Add user-agent information to xposter and content importer, requested by
LiveJournal.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
- cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
-------------------------------------------------------------------------------- diff -r 03ac3ce3a905 -r 0f75400b09e0 cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm --- a/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Fri Oct 16 15:33:54 2009 +0000 +++ b/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Fri Oct 16 20:19:27 2009 +0000 @@ -109,7 +109,10 @@ sub call_xmlrpc { sub call_xmlrpc { my ($self, $proxyurl, $mode, $req, $auth) = @_; - my $xmlrpc = eval { XMLRPC::Lite->proxy($proxyurl); }; + my $xmlrpc = eval { + XMLRPC::Lite->proxy( $proxyurl, agent => "$LJ::SITENAME XPoster ($LJ::ADMIN_EMAIL)" ); + }; + # connection error if no proxy return { success => 0, diff -r 03ac3ce3a905 -r 0f75400b09e0 cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm --- a/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Fri Oct 16 15:33:54 2009 +0000 +++ b/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Fri Oct 16 20:19:27 2009 +0000 @@ -369,7 +369,8 @@ sub call_xmlrpc { my ( $class, $opts, $mode, $hash, $depth ) = @_; my $xmlrpc = XMLRPC::Lite->new; - $xmlrpc->proxy( "http://" . ( $opts->{server} || $opts->{hostname} ) . "/interface/xmlrpc" ); + $xmlrpc->proxy( "http://" . ( $opts->{server} || $opts->{hostname} ) . "/interface/xmlrpc", + agent => "$LJ::SITENAME Content Importer ($LJ::ADMIN_EMAIL)" ); my $chal; while ( ! $chal ) { --------------------------------------------------------------------------------