From b4e50d9800de7ad3ba4fe7f658cdadfb57c06144 Mon Sep 17 00:00:00 2001 From: Brian Arnold Date: Fri, 27 May 2016 10:58:46 -0400 Subject: [PATCH] add empty Expect header to cURL requests --- app/code/local/Litle/CreditCard/Model/Validatehttp.php | 2 +- app/code/local/Litle/LEcheck/Model/Validatehttp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/local/Litle/CreditCard/Model/Validatehttp.php b/app/code/local/Litle/CreditCard/Model/Validatehttp.php index 736571d..06b52b4 100644 --- a/app/code/local/Litle/CreditCard/Model/Validatehttp.php +++ b/app/code/local/Litle/CreditCard/Model/Validatehttp.php @@ -21,7 +21,7 @@ function save(){ $ch = curl_init(); curl_setopt($ch, CURLOPT_PROXY, $this->getFieldsetDataValue('proxy')); curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml')); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml', "Expect: ")); curl_setopt($ch, CURLOPT_POSTFIELDS, 'Test Connectivity'); curl_setopt($ch, CURLOPT_URL, $this->getFieldsetDataValue('url')); curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true); diff --git a/app/code/local/Litle/LEcheck/Model/Validatehttp.php b/app/code/local/Litle/LEcheck/Model/Validatehttp.php index fe7ff21..7f7a638 100644 --- a/app/code/local/Litle/LEcheck/Model/Validatehttp.php +++ b/app/code/local/Litle/LEcheck/Model/Validatehttp.php @@ -12,7 +12,7 @@ function save(){ $ch = curl_init(); curl_setopt($ch, CURLOPT_PROXY, $this->getFieldsetDataValue('proxy')); curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml')); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml','Expect: ')); curl_setopt($ch, CURLOPT_URL, $this->getFieldsetDataValue('url')); curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true); curl_setopt($ch,CURLOPT_TIMEOUT,'5');