nsCOMPtr<nsIStreamConverterService> serv = do_GetService(kStreamConverterServiceCID, &rv); if (NS_SUCCEEDED(rv)) { rv = serv->AsyncConvertData(NS_LITERAL_STRING(MULTIPART_BYTERANGES).get(), NS_LITERAL_STRING("*/*").get(), mFinalPluginStreamListener, nsnull, getter_AddRefs(mStreamConverter)); if (NS_SUCCEEDED(rv)) { rv = mStreamConverter->OnStartRequest(request, ctxt); if (NS_SUCCEEDED(rv)) return rv; } mStreamConverter = 0;
if (mHaveFiredOnStartRequest) { return NS_OK;
nsPluginByteRangeStreamListener::OnStartRequest(nsIRequest *request, nsISupports *ctxt){  nsresult rv;  nsCOMPtr<nsIStreamConverterService> serv = do_GetService(kStreamConverterServiceCID, &rv);  if (NS_SUCCEEDED(rv)) {    rv = serv->AsyncConvertData(NS_LITERAL_STRING(MULTIPART_BYTERANGES).get(),                                NS_LITERAL_STRING("*/*").get(),                                mFinalPluginStreamListener,                                nsnull,                                getter_AddRefs(mStreamConverter));    if (NS_SUCCEEDED(rv)) {      rv = mStreamConverter->OnStartRequest(request, ctxt);      if (NS_SUCCEEDED(rv))        return rv;    }    mStreamConverter = 0;  }  // if server cannot continue with byte range (206 status) and sending us whole object (200 status)  // reset this seekable stream & try serve it to plugin instance as a file  rv = mFinalPluginStreamListener->ServeStreamAsFile(request, ctxt, rv);  // always use mFinalPluginStreamListener  mStreamConverter = mFinalPluginStreamListener;  return rv;}