jquery getResponseHeader always returns 'undefined'?

I have a a form that I am submitting via ajax. I am using the jquery form plugin. What I am trying to do is get the 'Location' header which is returned from my server. I can see it in firebug. But whenever I call the getResponseHeader() function in my success callback, it always returns 'undefined'..

Code:

form.ajaxForm({
  dataType: 'xml',
  data: {format: 'xml'},
  resetForm: true,
  success: function(xml,status,xhr){
    var location = xhr.getResponseHeader('Location');
    alert(location);
  });

location is undefined. But I can see the 'Location' header in firebug. What am I missing? Even if I call getAllResponseHeaders() from the xhr object, it returns 'undefined'

16
задан demersus 6 December 2010 в 19:07
поделиться