diff options
author | friendica <info@friendica.com> | 2014-01-27 18:37:06 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-27 18:37:06 -0800 |
commit | eb21bbdd550e4d1efc9a4c6e506eb64ba2cf9842 (patch) | |
tree | 887fbfc6ba78c4c2e12d0361003b33c6e76926ac /library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php | |
parent | 3100b5d93e9f440a17b99d2856ee022b29d73f80 (diff) | |
download | volse-hubzilla-eb21bbdd550e4d1efc9a4c6e506eb64ba2cf9842.tar.gz volse-hubzilla-eb21bbdd550e4d1efc9a4c6e506eb64ba2cf9842.tar.bz2 volse-hubzilla-eb21bbdd550e4d1efc9a4c6e506eb64ba2cf9842.zip |
Ajaxchat package has way too many incompatible assumptions - after a lot of review, we can't work with it without re-writing huge chunks. Think I'll just start fresh. Ajax chat isn't that hard and we can do stuff with it that you just can't do with other chat clients because - well we've got zot.
Diffstat (limited to 'library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php')
-rw-r--r-- | library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php b/library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php deleted file mode 100644 index 7340bfcf0..000000000 --- a/library/ajaxchat/chat/lib/class/AJAXChatHTTPHeader.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/* - * @package AJAX_Chat - * @author Sebastian Tschan - * @copyright (c) Sebastian Tschan - * @license Modified MIT License - * @link https://blueimp.net/ajax/ - */ - -// Class to manage HTTP header -class AJAXChatHTTPHeader { - - var $_contentType; - var $_constant; - var $_noCache; - - function __construct($encoding='UTF-8', $contentType=null, $noCache=true) { - if($contentType) { - $this->_contentType = $contentType.'; charset='.$encoding; - $this->_constant = true; - } else { - if(isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') !== false)) { - $this->_contentType = 'application/xhtml+xml; charset='.$encoding; - } else { - $this->_contentType = 'text/html; charset='.$encoding; - } - $this->_constant = false; - } - $this->_noCache = $noCache; - } - - // Method to send the HTTP header: - function send() { - // Prevent caching: - if($this->_noCache) { - header('Cache-Control: no-cache, must-revalidate'); - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - } - - // Send the content-type-header: - header('Content-Type: '.$this->_contentType); - - // Send vary header if content-type varies (important for proxy-caches): - if(!$this->_constant) { - header('Vary: Accept'); - } - } - - // Method to return the content-type string: - function getContentType() { - // Return the content-type string: - return $this->_contentType; - } - -} -?>
\ No newline at end of file |