]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Fix for registration, logic went wrong...
[mailer.git] / inc / functions.php
index 5b30f4f795174e15a0dd36501aa36651104efcd9..b56975ac61db9bcb3363abeb9040fef5b690466b 100644 (file)
@@ -1793,7 +1793,7 @@ function sendPostRequest ($script, $postData) {
        // Extract host name from script
        $host = extractHostnameFromUrl($script);
 
-       // Construct request
+       // Construct request body
        $body = http_build_query($postData, '', '&');
 
        // Generate POST request header
@@ -1801,8 +1801,11 @@ function sendPostRequest ($script, $postData) {
        $request .= 'Host: ' . $host . getConfig('HTTP_EOL');
        $request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL');
        $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL');
+       $request .= 'Accept: text/plain;q=0.8' . getConfig('HTTP_EOL');
+       $request .= 'Accept-Charset: UTF-8,*' . getConfig('HTTP_EOL');
        $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL');
        $request .= 'Content-Type: application/x-www-form-urlencoded' . getConfig('HTTP_EOL');
+       $request .= 'Content-Length: ' . strlen($body) . getConfig('HTTP_EOL');
        $request .= 'Connection: close' . getConfig('HTTP_EOL');
        $request .= getConfig('HTTP_EOL');
 
@@ -1950,6 +1953,7 @@ function sendRawRequest ($host, $request) {
                }
        } // END - foreach
 
+       //* DEBUG: */ print('<strong>Request:</strong><pre>'.print_r($request, true).'</pre>');
        //* DEBUG: */ print('<strong>Response:</strong><pre>'.print_r($response, true).'</pre>');
 
        // Proxy agent found or something went wrong?
@@ -2238,6 +2242,7 @@ function encodeHashForCookie ($passHash) {
                //* DEBUG: */ outputHtml(__FUNCTION__.':'.strlen($passHash).'/'.strlen(getConfig('secret_key')).'<br />');
                if ((strlen($passHash) != 49) || (strlen(getConfig('secret_key')) != 40)) {
                        // Both keys must have same length so return unencrypted
+                       logDebugMessage(__FUNCTION__, __LINE__, strlen($passHash).'!=49/'.strlen(getConfig('secret_key')).'!=40');
                        return $ret;
                } // END - if
 
@@ -2291,11 +2296,8 @@ function app_die ($F, $L, $message) {
                // Make sure, that the script realy realy diese here and now
                $GLOBALS['app_died'] = true;
 
-               // Set content type if not set
-               if (!isContentTypeSet()) {
-                       // text/html is the right one
-                       setContentType('text/html');
-               } // END - if
+               // Set content type as text/html
+               setContentType('text/html');
 
                // Load header
                loadIncludeOnce('inc/header.php');