[Rt-commit] rt branch, 4.2/newlines-in-mailgate-debug, created. rt-4.1.8-303-ga3c236b

Alex Vandiver alexmv at bestpractical.com
Wed May 15 15:38:55 EDT 2013


The branch, 4.2/newlines-in-mailgate-debug has been created
        at  a3c236b1e398f39200e125fb24197a1ef4772061 (commit)

- Log -----------------------------------------------------------------
commit a3c236b1e398f39200e125fb24197a1ef4772061
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 5 15:37:19 2012 -0500

    Add newlines into debug output from mail-gateway, and thus rt-mailgate
    
    These newlines were unintentionally and silently removed in a2b50db, and
    cause the output from rt-mailgate to be jumbled together on one line.
    Insert newlines to make understanding them simpler.

diff --git a/share/html/REST/1.0/NoAuth/mail-gateway b/share/html/REST/1.0/NoAuth/mail-gateway
index dec5ce7..d8c7f41 100644
--- a/share/html/REST/1.0/NoAuth/mail-gateway
+++ b/share/html/REST/1.0/NoAuth/mail-gateway
@@ -60,24 +60,24 @@ $r->content_type('text/plain; charset=utf-8');
 $m->error_format('text');
 my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
 if ( $status == 1 ) {
-  $m->out('ok');
+  $m->out("ok\n");
   if ( $Ticket && $Ticket->Id ) {
-    $m->out( 'Ticket: '  . ($Ticket->Id             || '') );
-    $m->out( 'Queue: '   . ($Ticket->QueueObj->Name || '') );
-    $m->out( 'Owner: '   . ($Ticket->OwnerObj->Name || '') );
-    $m->out( 'Status: '  . ($Ticket->Status         || '') );
-    $m->out( 'Subject: ' . ($Ticket->Subject        || '') );
+    $m->out( 'Ticket: '  . ($Ticket->Id             || '') . "\n" );
+    $m->out( 'Queue: '   . ($Ticket->QueueObj->Name || '') . "\n" );
+    $m->out( 'Owner: '   . ($Ticket->OwnerObj->Name || '') . "\n" );
+    $m->out( 'Status: '  . ($Ticket->Status         || '') . "\n" );
+    $m->out( 'Subject: ' . ($Ticket->Subject        || '') . "\n" );
     $m->out(
-      'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || '') );
+      'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || '') . "\n" );
   }
 }
 else {
   $RT::Logger->error( "Could not record email: " . $error );
   if ( $status == -75 ) {
-    $m->out( "temporary failure - " . $error );
+    $m->out( "temporary failure - $error\n" );
   }
   else {
-    $m->out( 'not ok - ' . $error );
+    $m->out( "not ok - $error\n" );
   }
 }
 $m->abort();

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


More information about the Rt-commit mailing list