Bug 1153484 - Fetch should ignore invalid headers, but still process later headers. r=nsm
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "nsDataHandler.h"
|
||||
#include "nsHostObjectProtocolHandler.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "nsStringStream.h"
|
||||
|
||||
@@ -629,7 +630,13 @@ public:
|
||||
{
|
||||
ErrorResult result;
|
||||
mResponse->Headers()->Append(aHeader, aValue, result);
|
||||
return result.ErrorCode();
|
||||
if (result.Failed()) {
|
||||
NS_WARNING(nsPrintfCString("Fetch ignoring illegal header - '%s': '%s'",
|
||||
PromiseFlatCString(aHeader).get(),
|
||||
PromiseFlatCString(aValue).get()).get());
|
||||
result.ClearMessage();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user