[Rt-commit] [svn] r946 - in RT-Client: . lib/RT lib/RT/Client

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Tue May 25 13:05:25 EDT 2004


Author: autrijus
Date: Tue May 25 13:05:25 2004
New Revision: 946

Modified:
   RT-Client/   (props changed)
   RT-Client/lib/RT/Client.pm
   RT-Client/lib/RT/Client/Container.pm
Log:
 ----------------------------------------------------------------------
 r5196 at not:  autrijus | 2004-05-25T17:05:16.925117Z
 
 * chomp the trailing newline from text/plain error messages.
 ----------------------------------------------------------------------


Modified: RT-Client/lib/RT/Client.pm
==============================================================================
--- RT-Client/lib/RT/Client.pm	(original)
+++ RT-Client/lib/RT/Client.pm	Tue May 25 13:05:25 2004
@@ -244,7 +244,12 @@
                 }
             }
         }
-        $req = HTTP::Request::Common::POST($uri, \%args);
+        $req = HTTP::Request::Common::POST(
+	    $uri,
+	    \%args,
+#	    Content_Type => 'form-data',
+#	    Content => [ %args ],
+	);
     }
     else {
         $req = HTTP::Request::Common::_simple_req($method => $uri);
@@ -259,7 +264,8 @@
     print STDERR "<=== " . $res->as_string if $self->debug;
 
     if ($res->is_error) {
-        $self->errstr($res->content);
+	my $ref = $res->content_ref; chomp $$ref;
+        $self->errstr($$ref);
         $self->_handle_error;
         return;
     }

Modified: RT-Client/lib/RT/Client/Container.pm
==============================================================================
--- RT-Client/lib/RT/Client/Container.pm	(original)
+++ RT-Client/lib/RT/Client/Container.pm	Tue May 25 13:05:25 2004
@@ -22,8 +22,9 @@
 
     return 1 if $res->is_success;
 
-    $self->status(500);
-    $self->errstr($res->content);
+    my $ref = $res->content_ref; chomp $$ref;
+    $self->errstr($$ref);
+
     return undef;
 }
 


More information about the Rt-commit mailing list