downthemall / anticontainer

DownThemAll! AntiContainer (Extension to a Firefox, Seamonkey extension)
Mozilla Public License 2.0
93 stars 41 forks source link

Writing sandbox plugin - response headers issue #91

Closed danie1k closed 10 years ago

danie1k commented 10 years ago

Is it possible to read response headers from Request/XMLHttpRequest or makeRequest() ?

I've tried methods: getAllResponseHeaders() and getResponseHeader() but without success.

My code examples:

makeRequest(url, function(r){ alert(r.getAllResponseHeaders()); finish(); }, function(request){ markGone(); finish(); });

or

var request = new XMLHttpRequest();
request.onload = function(){ alert(request.getAllResponseHeaders()); finish(); };
request.open('GET', url);
request.send();

In both cases, alert just didn't appear. Am I doing something wrong, or just reading response headers isn't possible?

nmaier commented 10 years ago

getAllResponseHeaders is not implemented and I do not intend to implement it. getResponseHeader is implemented, but you aren't allowed to get Cookie.