Get and send plugin MIME type, fix for bug 54205 r=sfraser a=buster

This commit is contained in:
peterlubczynski@netscape.com
2000-10-17 20:57:36 +00:00
parent 61e007fb03
commit 4a226e748f
2 changed files with 20 additions and 0 deletions

View File

@@ -1284,6 +1284,14 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIChannel* channel,
nsCRT::free(urlString);
}
// Set the content type to ensure we don't pass null to the plugin
char* aContentType = nsnull;
rv = channel->GetContentType(&aContentType);
if (NS_FAILED(rv)) return rv;
if (nsnull != aContentType)
mPluginStreamInfo->SetContentType(aContentType);
if (mStartBinding)
{
// On start binding has been called
@@ -1295,6 +1303,8 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIChannel* channel,
mPStreamListener->OnStartBinding((nsIPluginStreamInfo*)mPluginStreamInfo);
mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus);
}
if (aContentType)
nsCRT::free(aContentType);
}
return rv;