You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/05/09 09:51:00 UTC
svn commit: r1335964 -
/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
Author: werpu
Date: Wed May 9 07:51:00 2012
New Revision: 1335964
URL: http://svn.apache.org/viewvc?rev=1335964&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3543
Modified:
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js?rev=1335964&r1=1335963&r2=1335964&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js Wed May 9 07:51:00 2012
@@ -114,6 +114,7 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
send : function() {
var _Lang = this._Lang;
+ var _RT = this._RT;
try {
@@ -152,6 +153,11 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
xhr.setRequestHeader(this._CONTENT_TYPE, contentType);
xhr.setRequestHeader(this._HEAD_FACES_REQ, this._VAL_AJAX);
+ //some webkit based mobile browsers do not follow the w3c spec of
+ // setting the accept headers automatically
+ if(this._RT.browser.isWebKit) {
+ xhr.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
+ }
this._sendEvent("BEGIN");
//Check if it is a custom form data object
//if yes we use makefinal for the final handling