зеркало из https://github.com/mozilla/pjs.git
Backing out the patch for bug #120113. To clear smoketest blocker...
This commit is contained in:
Родитель
4f59844fd0
Коммит
a9eaecd703
|
@ -43,7 +43,6 @@ REQUIRES = xpcom \
|
|||
intl \
|
||||
webshell \
|
||||
xpconnect \
|
||||
mimetype \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
|
|
@ -35,7 +35,6 @@ REQUIRES = xpcom \
|
|||
xpconnect \
|
||||
content \
|
||||
gfx \
|
||||
mimetype \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
|
|
@ -55,9 +55,6 @@
|
|||
#include "nsWeakReference.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsIMIMEService.h"
|
||||
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
|
@ -277,43 +274,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
|||
rv = aChannel->GetContentType(getter_Copies(contentType));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
//
|
||||
// Step zero: If the content-type is unknown (ie. either
|
||||
// application/x-unknown-content-type or */* then try to
|
||||
// find a better one from the MIME Service...
|
||||
//
|
||||
if (!nsCRT::strcasecmp(contentType, UNKNOWN_CONTENT_TYPE) ||
|
||||
!nsCRT::strcasecmp(contentType, "*/*"))
|
||||
{
|
||||
nsCOMPtr<nsIMIMEService> mimeService;
|
||||
mimeService = do_GetService(NS_MIMESERVICE_CONTRACTID, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
|
||||
rv = aChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mimeService->GetTypeFromURI(uri, getter_Copies(contentType));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aChannel->SetContentType(contentType);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv) && !nsCRT::strcasecmp(contentType, "*/*")) {
|
||||
//
|
||||
// If something with the MimeService failed, and the content type is
|
||||
// "*/*" then change it to "application/x-unknown-content-type" so
|
||||
// the buffer sniffer will be called later... At least that is
|
||||
// better than nothing!
|
||||
//
|
||||
rv = aChannel->SetContentType(UNKNOWN_CONTENT_TYPE);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
contentType.Assign(UNKNOWN_CONTENT_TYPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// go to the uri dispatcher and give them our stuff...
|
||||
nsCOMPtr<nsIURILoader> uriLoader;
|
||||
uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID, &rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче