[librole-rest-client-perl] 01/02: Add patch from upstream Git repo that ensures that Content-Type is set in responses

gregor herrmann gregoa at debian.org
Sun Feb 4 23:11:13 UTC 2018


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository librole-rest-client-perl.

commit f711e35ac219b7168c40962e01fb6bca495b339e
Author: gregor herrmann <gregoa at debian.org>
Date:   Sun Feb 4 23:51:11 2018 +0100

    Add patch from upstream Git repo that ensures that Content-Type is set in responses
    
    before using it.
    
    Otherwise we get a warning about an "Uninitialized variable ...", e.g. from
    GitLab::API::v4.
---
 ...esponse-has-a-content-type-before-checkin.patch | 26 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/0001-Make-sure-response-has-a-content-type-before-checkin.patch b/debian/patches/0001-Make-sure-response-has-a-content-type-before-checkin.patch
new file mode 100644
index 0000000..78b35b9
--- /dev/null
+++ b/debian/patches/0001-Make-sure-response-has-a-content-type-before-checkin.patch
@@ -0,0 +1,26 @@
+From 255ac823208a95f4380e7046031e7f8cd7540cd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Joaqu=C3=ADn=20Atria?= <jjatria at gmail.com>
+Date: Sat, 3 Feb 2018 17:29:26 +0000
+Subject: [PATCH] Make sure response has a content type before checking
+
+---
+ lib/Role/REST/Client.pm | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Role/REST/Client.pm b/lib/Role/REST/Client.pm
+index a7a0ec8..9f8e72f 100644
+--- a/lib/Role/REST/Client.pm
++++ b/lib/Role/REST/Client.pm
+@@ -168,7 +168,8 @@ sub _call {
+ 
+ 	my $use_serializer = exists $args->{deserializer}
+ 		? defined $args->{deserializer} ? 1 : 0
+-		: $res->header('Content-Type') !~ m{(?:text/(?:plain|html)|application/octet-stream)};
++		: ($res->header('Content-Type')
++		  and $res->header('Content-Type') !~ m{(?:text/(?:plain|html)|application/octet-stream)});
+ 
+ 	my $deserializer_cb = sub {
+ 		# Try to find a serializer for the result content
+-- 
+2.15.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 065a8f5..7535003 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 manpage-has-bad-whatis-entry.patch
+0001-Make-sure-response-has-a-content-type-before-checkin.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/librole-rest-client-perl.git



More information about the Pkg-perl-cvs-commits mailing list