Commit 20eba215 authored by roc+%cs.cmu.edu's avatar roc+%cs.cmu.edu
Browse files

Bug 328684. Detect multipart channel by QI'ing the request object instead of...

Bug 328684. Detect multipart channel by QI'ing the request object instead of peeking at the MIME type. r+sr=darin
parent 7986d13c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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.
   */
  if (!mChannel) {
  nsCOMPtr<nsIMultiPartChannel> mpchan(do_QueryInterface(aRequest));
  if (!mChannel) {
    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. */