PDA

View Full Version : [CLOSED] Ext.Ajax.request messed up headers on iPhone/iPad



gh0zt
23 Mar 2011, 10:52 PM
Hi there,

i have noticed a strange behavior when using Ext.Ajax.request .
In my testing environment (Mac OS X + Safari) everything works well and as expected.
But if i run the sample on the iPhone/iPad, the headers i send with the request are totally messed up.

Ext.Ajax.request({
url: 'http://example.com',
method: 'GET',
headers: {
'MyHeader': 'This is my custom Header',
'Accept' : 'application/json'
},
success: function(response, opts) {
// do nothing
}
});

On Mac OS X + Safari headers look like:
X-Requested-With XMLHttpRequest
MyHeader This is my custom Header
Accept application/json

while on iPhone/iPad :
Access-Control-Request-Headers X-Key, X-Requested-With
Accept */*

Does anybody have a solution for this or can at least confirm this behaviour?

Thanks in advance,

Daniel

gh0zt
23 Mar 2011, 11:15 PM
Ok finally found the solution.. After digging around for quite some time yesterday it seems that sometimes a new day and a fresh mind are the best problem solvers.

The problem is a Cross-Domain request issue.