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:
norris%netscape.com 1999-12-07 23:42:58 +00:00
Родитель d36f7cea02
Коммит 9aea6d6321
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;