mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 714631. Feed converter should check HTTP channel response status before proceeding. r=gavin
This commit is contained in:
parent
4ab724aabd
commit
bcce95e851
@ -315,6 +315,13 @@ FeedConverter.prototype = {
|
||||
// The value doesn't matter.
|
||||
try {
|
||||
var httpChannel = channel.QueryInterface(Ci.nsIHttpChannel);
|
||||
// Make sure to check requestSucceeded before the potentially-throwing
|
||||
// getResponseHeader.
|
||||
if (!httpChannel.requestSucceeded) {
|
||||
// Just give up, but don't forget to cancel the channel first!
|
||||
request.cancel(0x804b0002); // NS_BINDING_ABORTED
|
||||
return;
|
||||
}
|
||||
var noSniff = httpChannel.getResponseHeader("X-Moz-Is-Feed");
|
||||
}
|
||||
catch (ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user