More usage of wrapper functions
[mailer.git] / inc / http-functions.php
index 3b9a630eefbe48e362a17f109bf5d28c70dec282..9d179379d460f12868fa15a1813408f3f513779f 100644 (file)
@@ -69,7 +69,7 @@ function sendGetRequest ($baseUrl, $data = array(), $removeHeader = false) {
        // There should be data, else we don't need to extend $baseUrl with $body
        if (!empty($body)) {
                // Do we have a question-mark in the script?
-               if (strpos($baseUrl, '?') === false) {
+               if (!isInString('?', $baseUrl)) {
                        // No, so first char must be question mark
                        $body = '?' . $body;
                } else {
@@ -376,10 +376,10 @@ function unchunkHttpResponse ($response) {
        // Check if we have chunks
        foreach ($response as $line) {
                // Make lower-case and trim it
-               $line = trim(strtolower($line));
+               $line = trim($line);
 
                // Entry found?
-               if ((strpos($line, 'transfer-encoding') !== false) && (strpos($line, 'chunked') !== false)) {
+               if ((isInStringIgnoreCase('transfer-encoding', $line)) && (isInStringIgnoreCase('chunked', $line))) {
                        // Found!
                        $isChunked = true;
                        break;