]> git.mxchange.org Git - mailer.git/blobdiff - inc/http-functions.php
Better encapsulate this a little ...
[mailer.git] / inc / http-functions.php
index 9398678b10d3ec170bf7e798b1508ddf25a3e39e..bc100696a93a571a8824d8b218f04552e188ec96 100644 (file)
@@ -54,7 +54,13 @@ function sendHttpHeaders () {
        addHttpHeader('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
        addHttpHeader('Pragma: no-cache'); // HTTP/1.0
        addHttpHeader('Connection: Close');
-       addHttpHeader('Content-Type: ' . getContentType() . '; charset=UTF-8');
+       // There shall be no output mode in raw/AJAX mode
+       if ((!isRawOutputMode()) && (!isAjaxOutputMode())) {
+               // Send content-type only in CSS/HTML mode
+               addHttpHeader('Content-Type: ' . getContentType() . '; charset=UTF-8');
+       } else {
+               //
+       } // END - if
        addHttpHeader('Content-Language: ' . getLanguage());
 }