Hi all,

I'm trying to figure out how to recognize when an HTTP redirect comes back from an Ajax request. Here is my submission code:

Code:
Ext.Ajax.request({
	url: base.url+'/export/foo',
	method:'GET',
	success:function(response) {
		console.log(response)
	}, 
	failure:function(response) {
		debug.popup(response.responseText);	//show the server response in a dialog
	}
})
On the serverside, a request to "whatever.com/export/foo'" generates a file and then returns an HTTP redirect to that file. Without Ajax, the browser follows the redirect and gives me an "open/save" dialog as you'd expect.

With Ajax, I was expecting the success function above to output an object with status=302 and a redirect URL which I could push to location.href. Actually what I get in the console is "Object tId=8 status=200 statusText=OK". Firebug also shows me that the browser does honor the redirect and actually downloads the file, but I get no "open/save" dialog.

What's the correct way of dealing with this situation? I really want my serverside code to remain the same for both Ajax and non-Ajax operation.

Many thanks,
Matt.