No subject


Sun Feb 10 18:00:07 EST 2008


    # Then we send the request and parse the response.
    DEBUG(3, $req->as_string);
    my $res =3D $ua->request($req);
    DEBUG(3, $res->as_string);

    if ($res->is_success) {
        # 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) =3D split /\n\n/, $res->content, 2;
        my ($status, @headers) =3D split /\n/, $head;
        $text =3D~ s/\n*$/\n/ if ($text);

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

Looks like, the splitt of $head is not working.

Any Ideas? Suggestions????

Regards

Torsten

K=FChne + Nagel (AG & Co.) KG, Gesch=E4ftsleitung: Hans-Georg Brinkmann =
(Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), =
Alfred Manke, Christian Marnett=E9 (Stellv.),  Mark Reinhardt (Stellv.), =
Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA =
21928, USt-IdNr.: DE 812773878, Pers=F6nlich haftende Gesellschaft: =
K=FChne & Nagel A.G., Sitz: Contern/Luxemburg Gesch=E4ftsf=FChrender =
Verwaltungsrat: Klaus-Michael K=FChne





More information about the Rt-devel mailing list