From 1208b8c21fb65382f758f2b7ace556fa13b6df46 Mon Sep 17 00:00:00 2001 From: Gaurang Rajvir Date: Tue, 13 Feb 2018 17:55:41 +0530 Subject: [PATCH] Added condition to ignore extra header I have added condition to ignore extra header which dont have colon ( : ) I am currently facing issue in my project and I am taking paypal sdk from composer.. is it the right source to update or any other ? --- lib/PayPal/Core/PayPalHttpConnection.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/PayPal/Core/PayPalHttpConnection.php b/lib/PayPal/Core/PayPalHttpConnection.php index 4b28d16..cf5253c 100644 --- a/lib/PayPal/Core/PayPalHttpConnection.php +++ b/lib/PayPal/Core/PayPalHttpConnection.php @@ -83,6 +83,11 @@ class PayPalHttpConnection return strlen($data); } + // Added condition to ignore extra header which dont have colon ( : ) + if (strpos($trimmedData, ":") == false) { + return strlen($data); + } + list($key, $value) = explode(":", $trimmedData, 2); $key = trim($key);