mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
backport Bug 1502599: XHR should allow just "GET" method for blob URLs, r=smaug
This commit is contained in:
parent
eb0082ecaa
commit
6477ec9b56
1 changed files with 6 additions and 0 deletions
|
|
@ -86,6 +86,7 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "private/pprio.h"
|
||||
#include "XMLHttpRequestUpload.h"
|
||||
#include "nsHostObjectProtocolHandler.h"
|
||||
|
||||
using namespace mozilla::net;
|
||||
|
||||
|
|
@ -2880,6 +2881,11 @@ XMLHttpRequestMainThread::SendInternal(const RequestBodyBase* aBody)
|
|||
return NS_ERROR_DOM_NETWORK_ERR;
|
||||
}
|
||||
|
||||
// non-GET requests aren't allowed for blob.
|
||||
if (IsBlobURI(mRequestURL) && !mRequestMethod.EqualsLiteral("GET")) {
|
||||
return NS_ERROR_DOM_NETWORK_ERR;
|
||||
}
|
||||
|
||||
PopulateNetworkInterfaceId();
|
||||
|
||||
// XXX We should probably send a warning to the JS console
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue