we need to watch the error code of content type

git-svn-id: svn://10.0.0.236/trunk@37493 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
valeski%netscape.com
1999-06-29 23:26:11 +00:00
parent 759ec2937d
commit 00f19d472d
2 changed files with 8 additions and 2 deletions

View File

@@ -1058,7 +1058,10 @@ nsresult nsParser::OnStartBinding(nsIURI* aURL, const char *aSourceType)
rv = aContext->QueryInterface(nsIChannel::GetIID(), (void**)&channel);
if (NS_SUCCEEDED(rv)) {
char* contentType;
(void)channel->GetContentType(&contentType); // XXX ignore error?
rv = channel->GetContentType(&contentType);
if (NS_FAILED(rv)) {
NS_ASSERTION(contentType, "parser needs a content type to find a dtd");
}
mParserContext->mSourceType = contentType;
nsCRT::free(contentType);
NS_RELEASE(channel);