зеркало из https://github.com/mozilla/gecko-dev.git
The data protocol doesn't seem to be working. The problem appears to be that a nsStdURL is used to hold the data URI.
Unfortunately, using nsStdURL parses the data URI so that a URI like "data:text/html,<html>hi</html>" gets parsed with a host of "text". When the rest of the data URI processing calls GetSpec, it then gets "//text/html,<html>hi</html>", which confuses the content type parsing so no data is displayed. This checkin changes to use a nsSimpleURI instead. r=valeski
This commit is contained in:
Родитель
d36f7cea02
Коммит
9aea6d6321
|
@ -30,7 +30,7 @@
|
|||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
||||
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -81,7 +81,7 @@ nsDataHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
|||
NS_ASSERTION(!aBaseURI, "base url passed into data protocol handler");
|
||||
|
||||
nsIURI* url;
|
||||
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull,
|
||||
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
|
||||
NS_GET_IID(nsIURI),
|
||||
(void**)&url);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче