Bug#502312: libflickr-api-perl: Flickr API calls fail with 'API returned an invalid response' (line 111)
Gunnar Wolf
gwolf at gwolf.org
Wed Oct 15 18:31:37 UTC 2008
Seems like I doo need a test case for you reproducing this problem. I
tried with:
------------------------------------------------------------
#!/usr/bin/perl
use YAML;
use Flickr::API;
use Flickr::API::Request;
my ($key, $username, $api, $req, $res);
$key = "this_is_not_my_real_key";
$username = 'gunnarwolf';
$api = Flickr::API->new({key => $key});
$req = Flickr::API::Request->new({method => "flickr.people.findByUsername",
args => {username => $username}});
$res = $api->execute_request($req);
print YAML::Dump $res;
------------------------------------------------------------
And... The code failed to fail:
--- !!perl/hash:Flickr::API::Response
_content: "\x1f\x08\0\0\0\0\0\0\x03³±¯ÃÃQ(K-*ÃÃϳU2Ã3PRHÃKÃOÃÃK·U*-IÓµPR°·ã²)*.P(.I,±UÃÃV\x02òKS\x142SlÌ-ÃÃ-L\x1dü\f*óÑ
ì¸8Ãjó\x12sSÃÃKóò\x12ÃósÃlôá\\\x106\x06ZbÃ\x05\0\x1dSxZ\0\0\0"
_headers: !!perl/hash:HTTP::Headers
cache-control: private
client-date: 'Wed, 15 Oct 2008 18:25:05 GMT'
client-peer: 68.142.214.24:80
client-response-num: 1
connection: close
content-encoding: gzip
content-length: 133
content-type: text/xml; charset=utf-8
date: 'Wed, 15 Oct 2008 18:25:05 GMT'
p3p: 'policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"'
set-cookie:
- 'cookie_l10n=es-us%3Bmx; expires=Saturday, 15-Oct-11 18:25:05 GMT; path=/; domain=flickr.com'
- 'cookie_intl=deleted; expires=Tuesday, 16-Oct-07 18:25:04 GMT; path=/; domain=flickr.com'
vary: Accept-Encoding
_msg: OK
_protocol: HTTP/1.1
_rc: 200
_request: !!perl/hash:Flickr::API::Request
_content: method=flickr.people.findByUsername&api_key=43106481b5ba08f10437b9324ae83680&username=gunnarwolf
_headers: !!perl/hash:HTTP::Headers
accept-encoding: gzip
content-length: 96
content-type: application/x-www-form-urlencoded
user-agent: libwww-perl/5.813
_method: POST
_uri: !!perl/scalar:URI::http http://www.flickr.com/services/rest/
api_args:
api_key: 43106481b5ba08f10437b9324ae83680
method: flickr.people.findByUsername
username: gunnarwolf
api_method: flickr.people.findByUsername
error_code: 0
error_message: ''
success: 1
tree:
attributes:
stat: ok
children:
- content: "\n"
type: data
- attributes:
id: 7387785 at N08
nsid: 7387785 at N08
children:
- content: "\n\t"
type: data
- attributes: {}
children:
- content: gunnarwolf
type: data
name: username
type: tag
- content: "\n"
type: data
name: user
type: tag
- content: "\n"
type: data
name: rsp
type: tag
--
Gunnar Wolf - gwolf at gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
More information about the pkg-perl-maintainers
mailing list