File: flickr-api-urls.patch

package info (click to toggle)
libflickr-api-perl 1.01-3%2Bdeb7u2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 76 kB
  • sloc: perl: 211; makefile: 16
file content (54 lines) | stat: -rw-r--r-- 1,830 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Description: Update Flickr API URLs.
Origin: vendor
Bug-Debian: https://bugs.debian.org/753522
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+bug/1317464
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2014-07-04
Applied-Upstream: fixed in 1.09

--- a/lib/Flickr/API.pm
+++ b/lib/Flickr/API.pm
@@ -18,8 +18,8 @@
 	my $self = new LWP::UserAgent;
 	$self->{api_key}	= $options->{key};
 	$self->{api_secret}	= $options->{secret};
-	$self->{rest_uri}	= $options->{rest_uri} || 'http://www.flickr.com/services/rest/';
-	$self->{auth_uri}	= $options->{auth_uri} || 'http://www.flickr.com/services/auth/';
+	$self->{rest_uri}	= $options->{rest_uri} || 'https://api.flickr.com/services/rest/';
+	$self->{auth_uri}	= $options->{auth_uri} || 'https://api.flickr.com/services/auth/';
 
 	eval {
 		require Compress::Zlib;
--- a/test.pl
+++ b/test.pl
@@ -81,8 +81,8 @@
 }
 
 ok($uri->path eq '/services/auth/', "Checking correct return path");
-ok($uri->host eq 'www.flickr.com', "Checking return domain");
-ok($uri->scheme eq 'http', "Checking return protocol");
+ok($uri->host eq 'api.flickr.com', "Checking return domain");
+ok($uri->scheme eq 'https', "Checking return protocol");
 
 
 ##################################################
--- a/lib/Flickr/API/Request.pm
+++ b/lib/Flickr/API/Request.pm
@@ -14,7 +14,7 @@
 	my $self = new HTTP::Request;
 	$self->{api_method}	= $options->{method};
 	$self->{api_args}	= $options->{args};
-	$self->{rest_uri}	= $options->{rest_uri} || 'http://www.flickr.com/services/rest/';
+	$self->{rest_uri}	= $options->{rest_uri} || 'https://api.flickr.com/services/rest/';
 
 	bless $self, $class;
 
@@ -27,7 +27,7 @@
 sub encode_args {
 	my ($self) = @_;
 
-	my $url = URI->new('http:');
+	my $url = URI->new('https:');
 	$url->query_form(%{$self->{api_args}});
 	my $content = $url->query;