Skip to content

Commit 8a23ea1

Browse files
committed
fixed ssl issue
1 parent 7c34305 commit 8a23ea1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

USPSBase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ protected function doRequest($ch=null) {
152152
$opts[CURLOPT_POSTFIELDS] = http_build_query($this->getPostData(), null, '&');
153153
$opts[CURLOPT_URL] = $this->getEndpoint();
154154

155+
// Replace 443 with 80 if it's not secured
156+
if(strpos($opts[CURLOPT_URL], 'https://')===false) {
157+
$opts[CURLOPT_PORT] = 80;
158+
}
159+
155160
// set options
156161
curl_setopt_array($ch, $opts);
157162

0 commit comments

Comments
 (0)