Bug 328684. Detect multipart channel by QI'ing the request object instead of peeking at the MIME type. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@191446 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4ddaaa29c2
commit
f9659c1a5b
@ -617,18 +617,15 @@ NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt
|
||||
Cancel() gets called, we have a channel to cancel and we don't leave the channel
|
||||
open forever.
|
||||
*/
|
||||
nsCOMPtr<nsIMultiPartChannel> mpchan(do_QueryInterface(aRequest));
|
||||
if (!mChannel) {
|
||||
nsCOMPtr<nsIMultiPartChannel> mpchan(do_QueryInterface(aRequest));
|
||||
if (mpchan)
|
||||
mpchan->GetBaseChannel(getter_AddRefs(mChannel));
|
||||
else
|
||||
mChannel = do_QueryInterface(aRequest);
|
||||
}
|
||||
|
||||
nsCAutoString contentType;
|
||||
mChannel->GetContentType(contentType);
|
||||
if (contentType.Equals(NS_LITERAL_CSTRING("multipart/x-mixed-replace"),
|
||||
nsCaseInsensitiveCStringComparator()))
|
||||
if (mpchan)
|
||||
mIsMultiPartChannel = PR_TRUE;
|
||||
|
||||
/* set our state variables to their initial values. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user