Skip Menu |

This queue is for tickets about the RT-Client-REST CPAN distribution.

Report information
The Basics
Id: 38509
Status: rejected
Priority: 0/
Queue: RT-Client-REST

People
Owner: DMITRI [...] cpan.org
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.36
Fixed in: (no value)



Subject: Failure with module in a CGI
[Fri Aug 15 22:17:55 2008] [info]: Successful login for REST from 71.4.180.220 (/opt/rt3/share/html/autohandler:273) [Fri Aug 15 18:17:55 2008] [error] problem logging in: Apache2::RequestRec=SCALAR(0x10bd4f70) at /var/httpd/www/cgi-bin/REST.pl line 34.\n Dereferenceing the scalar just yields a random number.
Hello, based on the supplied information, it looks like the problem is on the server side. RT::Client::REST is a client library. - Dmitri.
Subject: Re: [rt.cpan.org #38509] Failure with module in a CGI
Date: Fri, 15 Aug 2008 18:55:03 -0400
To: bug-RT-Client-REST [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] MIT.EDU>
Yes, I understand it's a client library, but the user is able to logon to RT just fine... Here's the code I'm using to connect: my $rt = RT::Client::REST->new(timeout => 30, server => 'https://rt.cambenergy.org'); try { $rt->login(username=>'REST', password=>'secret'); } catch RT::Client::REST::Exception with { die "problem logging in: ", shift(); }; The RT server's access log just shows the following, and there're no errors 71.4.180.220 - - [15/Aug/2008:18:51:06 -0400] "POST /REST/1.0/ticket/1 HTTP/1.1" 200 481 P.S. Why does the sample code in RT::Client::REST catch such odd classes? -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Boomtime, the 8th of Bureaucracy, in the YOLD 3174: D'ec'ed'e, mort, fichu. C'est un ex-perroquet.
On Fri Aug 15 18:55:22 2008, belg4mit@MIT.EDU wrote: Show quoted text
> Yes, I understand it's a client library, > but the user is able to logon to RT just fine... > Here's the code I'm using to connect: > > my $rt = RT::Client::REST->new(timeout => 30, > server => 'https://rt.cambenergy.org'); > try { > $rt->login(username=>'REST', password=>'secret'); > } catch RT::Client::REST::Exception with { > die "problem logging in: ", shift(); > };
What version of RT are you connecting to? Is it using basic HTTP authentication? Show quoted text
> The RT server's access log just shows the following, and there're no > errors > 71.4.180.220 - - [15/Aug/2008:18:51:06 -0400] "POST /REST/1.0/ticket/1 > HTTP/1.1" 200 481
This is because of RT's server-side REST code is implemented: it does not report HTTP errors, however, it does report RT errors inside HTTP response body. You can have a look with ethereal. Show quoted text
> P.S. Why does the sample code in RT::Client::REST catch such odd > classes?
Not sure what you mean; which classes are "odd?"
Subject: Re: [rt.cpan.org #38509] Failure with module in a CGI
Date: Fri, 15 Aug 2008 19:51:44 -0400
To: bug-RT-Client-REST [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] MIT.EDU>
Show quoted text
>What version of RT are you connecting to?
Doh, sorry about that. 3.8 Show quoted text
>Is it using basic HTTP authentication?
Nope, just RT. Show quoted text
>This is because of RT's server-side REST code is implemented: it does >not report HTTP errors, however, it does report RT errors inside HTTP >response body. You can have a look with ethereal.
ungh, okay... it is over SSL. Show quoted text
>> P.S. Why does the sample code in RT::Client::REST catch such odd classes?
>Not sure what you mean; which classes are "odd?"
try { $rt->login(username => $user, password => $pass); } catch Exception::Class::Base with { die "problem logging in: ", shift->message; }; I am able to connect and intereact with the server as REST through the rt CLI -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Boomtime, the 8th of Bureaucracy, in the YOLD 3174: D'ec'ed'e, mort, fichu. C'est un ex-perroquet.
On Fri Aug 15 19:52:07 2008, belg4mit@MIT.EDU wrote: Show quoted text
> >What version of RT are you connecting to?
> Doh, sorry about that. 3.8
Didn't even know it was out. Do you know if there's a publicly available version somewhere I can play with (verify the issue)? Show quoted text
> >Not sure what you mean; which classes are "odd?"
> try { > $rt->login(username => $user, password => $pass); > } catch Exception::Class::Base with { > die "problem logging in: ", shift->message; > };
Exception::Class::Base is the base class for all exceptions thrown by RT::Client::REST. For a list of specific exceptions, check out RT::Client::REST::Exception. (You're right though, the synopsis should probably use RT::Client::REST::Exception). Show quoted text
> I am able to connect and intereact with the server as REST through the > rt CLI
Interesting. I wonder if they updated the rt command-line tool.
Subject: Re: [rt.cpan.org #38509] Failure with module in a CGI
Date: Fri, 15 Aug 2008 20:02:25 -0400
To: bug-RT-Client-REST [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] MIT.EDU>
Show quoted text
>Didn't even know it was out. Do you know if there's a publicly >available version somewhere I can play with (verify the issue)?
It's been out for a little while, and they're already working on 3.8.1 rt3.fsck.com is running 3.8.1rc4, and the public credentials are guest:guest -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Boomtime, the 8th of Bureaucracy, in the YOLD 3174: D'ec'ed'e, mort, fichu. C'est un ex-perroquet.
On Fri Aug 15 20:03:19 2008, belg4mit@MIT.EDU wrote: Show quoted text
> rt3.fsck.com is running 3.8.1rc4, and the public credentials are
guest:guest I checked out the latest version of RT::Client::REST [1] and was able to successfully run several scripts in the examples directory. For instance, set RTSERVER to http://rt3.fsck.com and try this: perl -Ilib examples/show_ticket.pl guest guest 7147 1. http://code.google.com/p/rt-client-rest/source/checkout
Subject: Re: [rt.cpan.org #38509] Failure with module in a CGI
Date: Fri, 15 Aug 2008 22:08:35 -0400
To: bug-RT-Client-REST [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] MIT.EDU>
Hmm, so I was able to do that with my existing install, as well as use that to show a ticket on my server... After much monkeying around, I was able to get it working. At least part of the problem was due to the fact that I did not use Error ':try'; which strict didn't even catch. -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Boomtime, the 8th of Bureaucracy, in the YOLD 3174: D'ec'ed'e, mort, fichu. C'est un ex-perroquet.
Setting the status to `rejected', as the problem was operator error.