Revision
631
Author
jeichorn
Date
2008-06-16 11:44:57 -0700 (Mon, 16 Jun 2008)

Log Message

updated built js files

Modified Paths

Diff

Modified: trunk/js/HTML_AJAX.js (630 => 631)


--- trunk/js/HTML_AJAX.js	2008-06-16 18:36:39 UTC (rev 630)
+++ trunk/js/HTML_AJAX.js	2008-06-16 18:44:57 UTC (rev 631)
@@ -314,7 +314,7 @@
 		'Error':		'application/error',
 		'PHP':			'application/php-serialized',
 		'HA' :			'application/html_ajax_action',
-		'Urlencoded':	'application/x-www-form-urlencoded'
+		'Urlencoded':		'application/x-www-form-urlencoded'
 	},
 	// used internally to make queues work, override Load or onError to perform custom events when a request is complete
 	// fires on success and error
@@ -1772,16 +1772,11 @@
 			}
 			if (this.request.customHeaders && !this.request.customHeaders['Content-Type']) {
 				var content = this.request.getContentType();
-				//opera is stupid for anything but plain text or xml!!
-				if(window.opera && content != 'application/xml')
-				{
-					this.xmlhttp.setRequestHeader('Content-Type','text/plain; charset=utf-8');
-					this.xmlhttp.setRequestHeader('x-Content-Type', content + '; charset=utf-8');
+				var charsetIndex = content.indexOf('; charset=UTF-8');
+				if (charsetIndex == -1) {
+					content += '; charset=UTF-8';
 				}
-				else
-				{
-					this.xmlhttp.setRequestHeader('Content-Type', content +  '; charset=utf-8');
-				}
+				this.xmlhttp.setRequestHeader('Content-Type', content);
 			}
 
 			if (this.request.isAsync) {
@@ -1915,7 +1910,7 @@
 			content = content.substring(0, content.indexOf(';'));
 		}
 		// hook for xml, it doesn't need to be unserialized
-		if(content == 'application/xml')
+		if(content == 'application/xml' || content == 'text/xml')
 		{
 			return this.xmlhttp.responseXML;
 		}
@@ -2890,7 +2885,7 @@
 			}
 			node.innerHTML = '';
 		}
-		var good_browser = (window.opera || navigator.product == 'Gecko');
+		var good_browser = (navigator.product == 'Gecko');
 		var regex = /^([\s\S]*?)<script([\s\S]*?)>([\s\S]*?)<\/script>([\s\S]*)$/i;
 		var regex_src = /src=["'](.*?)["']/i;
 		var matches, id, script, output = '', subject = innerHTML;

Modified: trunk/js/HTML_AJAX_lite.js (630 => 631)


--- trunk/js/HTML_AJAX_lite.js	2008-06-16 18:36:39 UTC (rev 630)
+++ trunk/js/HTML_AJAX_lite.js	2008-06-16 18:44:57 UTC (rev 631)
@@ -295,7 +295,7 @@
 'Error':		'application/error',
 'PHP':			'application/php-serialized',
 'HA' :			'application/html_ajax_action',
-'Urlencoded':	'application/x-www-form-urlencoded'
+'Urlencoded':		'application/x-www-form-urlencoded'
 },
 requestComplete: function(request,error) {
 for(var i in HTML_AJAX.queues) {
@@ -1587,16 +1587,12 @@
 }
 if (this.request.customHeaders && !this.request.customHeaders['Content-Type']) {
 var content = this.request.getContentType();
-if(window.opera && content != 'application/xml')
-{
-this.xmlhttp.setRequestHeader('Content-Type','text/plain; charset=utf-8');
-this.xmlhttp.setRequestHeader('x-Content-Type', content + '; charset=utf-8');
+var charsetIndex = content.indexOf('; charset=UTF-8');
+if (charsetIndex == -1) {
+content += '; charset=UTF-8';
 }
-else
-{
-this.xmlhttp.setRequestHeader('Content-Type', content +  '; charset=utf-8');
+this.xmlhttp.setRequestHeader('Content-Type', content);
 }
-}
 if (this.request.isAsync) {
 if (this.request.callback) {
 this.callbackComplete = false;
@@ -1709,7 +1705,7 @@
 {
 content = content.substring(0, content.indexOf(';'));
 }
-if(content == 'application/xml')
+if(content == 'application/xml' || content == 'text/xml')
 {
 return this.xmlhttp.responseXML;
 }
@@ -2607,7 +2603,7 @@
 }
 node.innerHTML = '';
 }
-var good_browser = (window.opera || navigator.product == 'Gecko');
+var good_browser = (navigator.product == 'Gecko');
 var regex = /^([\s\S]*?)<script([\s\S]*?)>([\s\S]*?)<\/script>([\s\S]*)$/i;
 var regex_src = /src=["'](.*?)["']/i;
 var matches, id, script, output = '', subject = innerHTML;