PDA

View Full Version : [RESOLVED] Help Ext.Ajax.request has bad ContentType in header



seldon
7 Jun 2007, 1:06 PM
Hi,

Somehow after I have done a Ext.Ajax.request containing a form param, subsequent calls with Ext.Ajax.request somehow get a wrong Content-type, which causes the requests to fail. As if somehow to Ext.Ajax object doesnt reset the fact that it is no longer a form call.

These headers are suddenly in my normal requests: Content-Type: application/x-www-form-urlencoded

I really appreciate a quick :"> fix for this!!

Thanks already!

Seldon

tryanDLS
7 Jun 2007, 1:17 PM
Which adapter are you using? Looking at the ext-base code, the defaultPostHeader is 'application/x-www-urlencoded'. What do you expect it to be?

seldon
7 Jun 2007, 5:46 PM
Sorry I was, wrong, the header info is indeed unchanged. However the problem persists, the first (or perhaps more, im not entirely sure yet) request after a form request somehow doesnt return any values. It's very weird. Of course I might be doing something wrong, but it doesnt appear so. Anyone else encountering this problem ?

seldon
7 Jun 2007, 5:55 PM
Sorry, nevermind, this problem is fixed by the solution in a previous thread, where it is advised to include


Ext.Ajax.on('beforerequest', function(ajax, o){ o.autoAbort = false; });

Sorry and thanks,

Seldon

nyc
27 Jun 2007, 2:31 AM
Nice!