[rt-users] CLI - rt: Malformed RT response

Ben Allen benjamin at oitsec.umn.edu
Tue Jan 6 10:50:32 EST 2004


I'm seeing "Malformed RT response" errors when using the CLI

FreeBSD 5.1-p10, RT-3.0.8, Apache 1.3.29+mod_ssl 2.8.16, MySQL 4.0.17

When running with RTDEBUG=3, as the warning requests, I see all of the 
content I expect for my queries, with 2 blank lines instead of one as 
stated in the script (snippet below).

=====================================================================
v3.0.8 /usr/local/rt3/bin/rt	line 730

         # The content of the response we get from the RT server consists
         # of an HTTP-like status line followed by optional header lines,
         # a blank line, and arbitrary text.

         my ($head, $text) = split /\n\n/, $res->content, 2;
         my ($status, @headers) = split /\n/, $head;
         $text =~ s/\n*$/\n/;

         # "RT/3.0.1 401 Credentials required"
         if ($status !~ m#^RT/\d+(?:\.\d+)+(?:-?\w+)? (\d+) ([\w\s]+)$#) {
             warn "rt: Malformed RT response from $config{server}.\n";
             warn "(Rerun with RTDEBUG=3 for details.)\n" if 
$config{debug} < 3;
             exit -1;
         }
=====================================================================


When I add a junk collection variable to eat up the extra line, 
everything works fine (diff -u   below).

--- rt  Mon Jan  5 15:22:26 2004
+++ rt-fixed    Tue Jan  6 09:36:01 2004
@@ -732,7 +732,7 @@
          # a blank line, and arbitrary text.

          my ($head, $text) = split /\n\n/, $res->content, 2;
-        my ($status, @headers) = split /\n/, $head;
+        my ($junk, $status, @headers) = split /\n/, $head;
          $text =~ s/\n*$/\n/;

          # "RT/3.0.1 401 Credentials required"


Is my webserver misconfigured?  Are others seeing this?  Is this likely 
to break other things with the CLI?

I'm connecting to the localhost over clear text to use the CLI.

Thanks

-- 
======================================================================
Benjamin Allen                                 benjamin at oitsec.umn.edu
U of MN - OIT                                             612-625-7885

      I try to take one day at a time, but sometimes several
         days attack me at once.  -- Ashleigh Brilliant





More information about the rt-users mailing list