From f9659c1a5bd38c66ef8c2e28bba79cf239d07412 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 28 Feb 2006 23:43:35 +0000 Subject: [PATCH] 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 --- mozilla/modules/libpr0n/src/imgRequest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mozilla/modules/libpr0n/src/imgRequest.cpp b/mozilla/modules/libpr0n/src/imgRequest.cpp index a57e7055e7b..8a3d222bf32 100644 --- a/mozilla/modules/libpr0n/src/imgRequest.cpp +++ b/mozilla/modules/libpr0n/src/imgRequest.cpp @@ -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 mpchan(do_QueryInterface(aRequest)); if (!mChannel) { - nsCOMPtr 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. */