fix for #131153, PDF plugin doesn't work, it expects file extension for stream type == StreamType_AsFile; r=peterl, sr=beard
git-svn-id: svn://10.0.0.236/trunk@119526 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2483,6 +2483,21 @@ nsresult nsPluginStreamListenerPeer::SetUpStreamListener(nsIRequest *request,
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mPStreamListener->GetStreamType(&mStreamType);
|
||||
// if plugin requests stream type StreamType_AsFile or StreamType_AsFileOnly
|
||||
// most likely it'll try to check file extension,
|
||||
// but our cache does nor support it yet.
|
||||
// temp fix is to copy the file+ext into temp location
|
||||
// all this code should be deleted when bug 90558 got fixed
|
||||
#if !defined(CACHE_SUPPOPTS_FILE_EXTENSION)
|
||||
if (mStreamType >= nsPluginStreamType_AsFile && httpChannel) {
|
||||
// check out if we already set output stream for this channel
|
||||
nsCOMPtr<nsIOutputStream> outStream;
|
||||
mPluginStreamInfo->GetLocalCachedFileStream(getter_AddRefs(outStream));
|
||||
if (!outStream) {
|
||||
SetupPluginCacheFile(httpChannel);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
Reference in New Issue
Block a user