gecko/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
Mitchell Field 7763512029 Bug 542222 - Reduce recursion in netwerk makefiles.
--HG--
rename : netwerk/cache/src/nsCache.cpp => netwerk/cache/nsCache.cpp
rename : netwerk/cache/src/nsCache.h => netwerk/cache/nsCache.h
rename : netwerk/cache/src/nsCacheDevice.h => netwerk/cache/nsCacheDevice.h
rename : netwerk/cache/src/nsCacheEntry.cpp => netwerk/cache/nsCacheEntry.cpp
rename : netwerk/cache/src/nsCacheEntry.h => netwerk/cache/nsCacheEntry.h
rename : netwerk/cache/src/nsCacheEntryDescriptor.cpp => netwerk/cache/nsCacheEntryDescriptor.cpp
rename : netwerk/cache/src/nsCacheEntryDescriptor.h => netwerk/cache/nsCacheEntryDescriptor.h
rename : netwerk/cache/src/nsCacheMetaData.cpp => netwerk/cache/nsCacheMetaData.cpp
rename : netwerk/cache/src/nsCacheMetaData.h => netwerk/cache/nsCacheMetaData.h
rename : netwerk/cache/src/nsCacheRequest.h => netwerk/cache/nsCacheRequest.h
rename : netwerk/cache/src/nsCacheService.cpp => netwerk/cache/nsCacheService.cpp
rename : netwerk/cache/src/nsCacheService.h => netwerk/cache/nsCacheService.h
rename : netwerk/cache/src/nsCacheSession.cpp => netwerk/cache/nsCacheSession.cpp
rename : netwerk/cache/src/nsCacheSession.h => netwerk/cache/nsCacheSession.h
rename : netwerk/cache/src/nsDeleteDir.cpp => netwerk/cache/nsDeleteDir.cpp
rename : netwerk/cache/src/nsDeleteDir.h => netwerk/cache/nsDeleteDir.h
rename : netwerk/cache/src/nsDiskCache.h => netwerk/cache/nsDiskCache.h
rename : netwerk/cache/src/nsDiskCacheBinding.cpp => netwerk/cache/nsDiskCacheBinding.cpp
rename : netwerk/cache/src/nsDiskCacheBinding.h => netwerk/cache/nsDiskCacheBinding.h
rename : netwerk/cache/src/nsDiskCacheBlockFile.cpp => netwerk/cache/nsDiskCacheBlockFile.cpp
rename : netwerk/cache/src/nsDiskCacheBlockFile.h => netwerk/cache/nsDiskCacheBlockFile.h
rename : netwerk/cache/src/nsDiskCacheDevice.cpp => netwerk/cache/nsDiskCacheDevice.cpp
rename : netwerk/cache/src/nsDiskCacheDevice.h => netwerk/cache/nsDiskCacheDevice.h
rename : netwerk/cache/src/nsDiskCacheDeviceSQL.cpp => netwerk/cache/nsDiskCacheDeviceSQL.cpp
rename : netwerk/cache/src/nsDiskCacheDeviceSQL.h => netwerk/cache/nsDiskCacheDeviceSQL.h
rename : netwerk/cache/src/nsDiskCacheEntry.cpp => netwerk/cache/nsDiskCacheEntry.cpp
rename : netwerk/cache/src/nsDiskCacheEntry.h => netwerk/cache/nsDiskCacheEntry.h
rename : netwerk/cache/src/nsDiskCacheMap.cpp => netwerk/cache/nsDiskCacheMap.cpp
rename : netwerk/cache/src/nsDiskCacheMap.h => netwerk/cache/nsDiskCacheMap.h
rename : netwerk/cache/src/nsDiskCacheStreams.cpp => netwerk/cache/nsDiskCacheStreams.cpp
rename : netwerk/cache/src/nsDiskCacheStreams.h => netwerk/cache/nsDiskCacheStreams.h
rename : netwerk/cache/public/nsICache.idl => netwerk/cache/nsICache.idl
rename : netwerk/cache/public/nsICacheEntryDescriptor.idl => netwerk/cache/nsICacheEntryDescriptor.idl
rename : netwerk/cache/public/nsICacheListener.idl => netwerk/cache/nsICacheListener.idl
rename : netwerk/cache/public/nsICacheService.idl => netwerk/cache/nsICacheService.idl
rename : netwerk/cache/public/nsICacheSession.idl => netwerk/cache/nsICacheSession.idl
rename : netwerk/cache/public/nsICacheVisitor.idl => netwerk/cache/nsICacheVisitor.idl
rename : netwerk/cache/src/nsMemoryCacheDevice.cpp => netwerk/cache/nsMemoryCacheDevice.cpp
rename : netwerk/cache/src/nsMemoryCacheDevice.h => netwerk/cache/nsMemoryCacheDevice.h
rename : netwerk/cookie/src/nsCookie.cpp => netwerk/cookie/nsCookie.cpp
rename : netwerk/cookie/src/nsCookie.h => netwerk/cookie/nsCookie.h
rename : netwerk/cookie/src/nsCookieService.cpp => netwerk/cookie/nsCookieService.cpp
rename : netwerk/cookie/src/nsCookieService.h => netwerk/cookie/nsCookieService.h
rename : netwerk/cookie/public/nsICookie.idl => netwerk/cookie/nsICookie.idl
rename : netwerk/cookie/public/nsICookie2.idl => netwerk/cookie/nsICookie2.idl
rename : netwerk/cookie/public/nsICookieManager.idl => netwerk/cookie/nsICookieManager.idl
rename : netwerk/cookie/public/nsICookieManager2.idl => netwerk/cookie/nsICookieManager2.idl
rename : netwerk/cookie/public/nsICookiePermission.idl => netwerk/cookie/nsICookiePermission.idl
rename : netwerk/cookie/public/nsICookieService.idl => netwerk/cookie/nsICookieService.idl
rename : netwerk/dns/src/effective_tld_names.dat => netwerk/dns/effective_tld_names.dat
rename : netwerk/dns/src/nameprep.c => netwerk/dns/nameprep.c
rename : netwerk/dns/src/nameprep_template.c => netwerk/dns/nameprep_template.c
rename : netwerk/dns/src/nameprepdata.c => netwerk/dns/nameprepdata.c
rename : netwerk/dns/src/nsDNSService2.cpp => netwerk/dns/nsDNSService2.cpp
rename : netwerk/dns/src/nsDNSService2.h => netwerk/dns/nsDNSService2.h
rename : netwerk/dns/src/nsEffectiveTLDService.cpp => netwerk/dns/nsEffectiveTLDService.cpp
rename : netwerk/dns/src/nsEffectiveTLDService.h => netwerk/dns/nsEffectiveTLDService.h
rename : netwerk/dns/src/nsHostResolver.cpp => netwerk/dns/nsHostResolver.cpp
rename : netwerk/dns/src/nsHostResolver.h => netwerk/dns/nsHostResolver.h
rename : netwerk/dns/src/nsIDNKitInterface.h => netwerk/dns/nsIDNKitInterface.h
rename : netwerk/dns/public/nsIDNSListener.idl => netwerk/dns/nsIDNSListener.idl
rename : netwerk/dns/public/nsIDNSRecord.idl => netwerk/dns/nsIDNSRecord.idl
rename : netwerk/dns/public/nsIDNSRequest.idl => netwerk/dns/nsIDNSRequest.idl
rename : netwerk/dns/public/nsIDNSService.idl => netwerk/dns/nsIDNSService.idl
rename : netwerk/dns/src/nsIDNService.cpp => netwerk/dns/nsIDNService.cpp
rename : netwerk/dns/src/nsIDNService.h => netwerk/dns/nsIDNService.h
rename : netwerk/dns/public/nsIEffectiveTLDService.idl => netwerk/dns/nsIEffectiveTLDService.idl
rename : netwerk/dns/public/nsIIDNService.idl => netwerk/dns/nsIIDNService.idl
rename : netwerk/dns/public/nsPIDNSService.idl => netwerk/dns/nsPIDNSService.idl
rename : netwerk/dns/src/prepare_tlds.py => netwerk/dns/prepare_tlds.py
rename : netwerk/dns/src/punycode.c => netwerk/dns/punycode.c
rename : netwerk/dns/src/punycode.h => netwerk/dns/punycode.h
rename : netwerk/dns/src/race.c => netwerk/dns/race.c
rename : netwerk/mime/public/nsIMIMEHeaderParam.idl => netwerk/mime/nsIMIMEHeaderParam.idl
rename : netwerk/mime/public/nsIMIMEInfo.idl => netwerk/mime/nsIMIMEInfo.idl
rename : netwerk/mime/public/nsIMIMEService.idl => netwerk/mime/nsIMIMEService.idl
rename : netwerk/mime/src/nsMIMEHeaderParamImpl.cpp => netwerk/mime/nsMIMEHeaderParamImpl.cpp
rename : netwerk/mime/src/nsMIMEHeaderParamImpl.h => netwerk/mime/nsMIMEHeaderParamImpl.h
rename : netwerk/mime/public/nsMimeTypes.h => netwerk/mime/nsMimeTypes.h
rename : netwerk/protocol/about/src/nsAboutBlank.cpp => netwerk/protocol/about/nsAboutBlank.cpp
rename : netwerk/protocol/about/src/nsAboutBlank.h => netwerk/protocol/about/nsAboutBlank.h
rename : netwerk/protocol/about/src/nsAboutBloat.cpp => netwerk/protocol/about/nsAboutBloat.cpp
rename : netwerk/protocol/about/src/nsAboutBloat.h => netwerk/protocol/about/nsAboutBloat.h
rename : netwerk/protocol/about/src/nsAboutCache.cpp => netwerk/protocol/about/nsAboutCache.cpp
rename : netwerk/protocol/about/src/nsAboutCache.h => netwerk/protocol/about/nsAboutCache.h
rename : netwerk/protocol/about/src/nsAboutCacheEntry.cpp => netwerk/protocol/about/nsAboutCacheEntry.cpp
rename : netwerk/protocol/about/src/nsAboutCacheEntry.h => netwerk/protocol/about/nsAboutCacheEntry.h
rename : netwerk/protocol/about/src/nsAboutProtocolHandler.cpp => netwerk/protocol/about/nsAboutProtocolHandler.cpp
rename : netwerk/protocol/about/src/nsAboutProtocolHandler.h => netwerk/protocol/about/nsAboutProtocolHandler.h
rename : netwerk/protocol/about/public/nsAboutProtocolUtils.h => netwerk/protocol/about/nsAboutProtocolUtils.h
rename : netwerk/protocol/about/public/nsIAboutModule.idl => netwerk/protocol/about/nsIAboutModule.idl
rename : netwerk/protocol/data/src/nsDataChannel.cpp => netwerk/protocol/data/nsDataChannel.cpp
rename : netwerk/protocol/data/src/nsDataChannel.h => netwerk/protocol/data/nsDataChannel.h
rename : netwerk/protocol/data/src/nsDataHandler.cpp => netwerk/protocol/data/nsDataHandler.cpp
rename : netwerk/protocol/data/src/nsDataHandler.h => netwerk/protocol/data/nsDataHandler.h
rename : netwerk/protocol/data/src/nsDataModule.cpp => netwerk/protocol/data/nsDataModule.cpp
rename : netwerk/protocol/file/src/nsFileChannel.cpp => netwerk/protocol/file/nsFileChannel.cpp
rename : netwerk/protocol/file/src/nsFileChannel.h => netwerk/protocol/file/nsFileChannel.h
rename : netwerk/protocol/file/src/nsFileProtocolHandler.cpp => netwerk/protocol/file/nsFileProtocolHandler.cpp
rename : netwerk/protocol/file/src/nsFileProtocolHandler.h => netwerk/protocol/file/nsFileProtocolHandler.h
rename : netwerk/protocol/file/public/nsIFileChannel.idl => netwerk/protocol/file/nsIFileChannel.idl
rename : netwerk/protocol/file/public/nsIFileProtocolHandler.idl => netwerk/protocol/file/nsIFileProtocolHandler.idl
rename : netwerk/protocol/ftp/public/ftpCore.h => netwerk/protocol/ftp/ftpCore.h
rename : netwerk/protocol/ftp/src/nsFTPChannel.cpp => netwerk/protocol/ftp/nsFTPChannel.cpp
rename : netwerk/protocol/ftp/src/nsFTPChannel.h => netwerk/protocol/ftp/nsFTPChannel.h
rename : netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp => netwerk/protocol/ftp/nsFtpConnectionThread.cpp
rename : netwerk/protocol/ftp/src/nsFtpConnectionThread.h => netwerk/protocol/ftp/nsFtpConnectionThread.h
rename : netwerk/protocol/ftp/src/nsFtpControlConnection.cpp => netwerk/protocol/ftp/nsFtpControlConnection.cpp
rename : netwerk/protocol/ftp/src/nsFtpControlConnection.h => netwerk/protocol/ftp/nsFtpControlConnection.h
rename : netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp => netwerk/protocol/ftp/nsFtpProtocolHandler.cpp
rename : netwerk/protocol/ftp/src/nsFtpProtocolHandler.h => netwerk/protocol/ftp/nsFtpProtocolHandler.h
rename : netwerk/protocol/ftp/public/nsIFTPChannel.idl => netwerk/protocol/ftp/nsIFTPChannel.idl
rename : netwerk/protocol/gopher/src/nsGopherChannel.cpp => netwerk/protocol/gopher/nsGopherChannel.cpp
rename : netwerk/protocol/gopher/src/nsGopherChannel.h => netwerk/protocol/gopher/nsGopherChannel.h
rename : netwerk/protocol/gopher/src/nsGopherHandler.cpp => netwerk/protocol/gopher/nsGopherHandler.cpp
rename : netwerk/protocol/gopher/src/nsGopherHandler.h => netwerk/protocol/gopher/nsGopherHandler.h
rename : netwerk/protocol/http/src/README => netwerk/protocol/http/README
rename : netwerk/protocol/http/src/nsAHttpConnection.h => netwerk/protocol/http/nsAHttpConnection.h
rename : netwerk/protocol/http/src/nsAHttpTransaction.h => netwerk/protocol/http/nsAHttpTransaction.h
rename : netwerk/protocol/http/src/nsHttp.cpp => netwerk/protocol/http/nsHttp.cpp
rename : netwerk/protocol/http/src/nsHttp.h => netwerk/protocol/http/nsHttp.h
rename : netwerk/protocol/http/src/nsHttpActivityDistributor.cpp => netwerk/protocol/http/nsHttpActivityDistributor.cpp
rename : netwerk/protocol/http/src/nsHttpActivityDistributor.h => netwerk/protocol/http/nsHttpActivityDistributor.h
rename : netwerk/protocol/http/src/nsHttpAtomList.h => netwerk/protocol/http/nsHttpAtomList.h
rename : netwerk/protocol/http/src/nsHttpAuthCache.cpp => netwerk/protocol/http/nsHttpAuthCache.cpp
rename : netwerk/protocol/http/src/nsHttpAuthCache.h => netwerk/protocol/http/nsHttpAuthCache.h
rename : netwerk/protocol/http/src/nsHttpAuthManager.cpp => netwerk/protocol/http/nsHttpAuthManager.cpp
rename : netwerk/protocol/http/src/nsHttpAuthManager.h => netwerk/protocol/http/nsHttpAuthManager.h
rename : netwerk/protocol/http/src/nsHttpBasicAuth.cpp => netwerk/protocol/http/nsHttpBasicAuth.cpp
rename : netwerk/protocol/http/src/nsHttpBasicAuth.h => netwerk/protocol/http/nsHttpBasicAuth.h
rename : netwerk/protocol/http/src/nsHttpChannel.cpp => netwerk/protocol/http/nsHttpChannel.cpp
rename : netwerk/protocol/http/src/nsHttpChannel.h => netwerk/protocol/http/nsHttpChannel.h
rename : netwerk/protocol/http/src/nsHttpChunkedDecoder.cpp => netwerk/protocol/http/nsHttpChunkedDecoder.cpp
rename : netwerk/protocol/http/src/nsHttpChunkedDecoder.h => netwerk/protocol/http/nsHttpChunkedDecoder.h
rename : netwerk/protocol/http/src/nsHttpConnection.cpp => netwerk/protocol/http/nsHttpConnection.cpp
rename : netwerk/protocol/http/src/nsHttpConnection.h => netwerk/protocol/http/nsHttpConnection.h
rename : netwerk/protocol/http/src/nsHttpConnectionInfo.cpp => netwerk/protocol/http/nsHttpConnectionInfo.cpp
rename : netwerk/protocol/http/src/nsHttpConnectionInfo.h => netwerk/protocol/http/nsHttpConnectionInfo.h
rename : netwerk/protocol/http/src/nsHttpConnectionMgr.cpp => netwerk/protocol/http/nsHttpConnectionMgr.cpp
rename : netwerk/protocol/http/src/nsHttpConnectionMgr.h => netwerk/protocol/http/nsHttpConnectionMgr.h
rename : netwerk/protocol/http/src/nsHttpDigestAuth.cpp => netwerk/protocol/http/nsHttpDigestAuth.cpp
rename : netwerk/protocol/http/src/nsHttpDigestAuth.h => netwerk/protocol/http/nsHttpDigestAuth.h
rename : netwerk/protocol/http/src/nsHttpHandler.cpp => netwerk/protocol/http/nsHttpHandler.cpp
rename : netwerk/protocol/http/src/nsHttpHandler.h => netwerk/protocol/http/nsHttpHandler.h
rename : netwerk/protocol/http/src/nsHttpHeaderArray.cpp => netwerk/protocol/http/nsHttpHeaderArray.cpp
rename : netwerk/protocol/http/src/nsHttpHeaderArray.h => netwerk/protocol/http/nsHttpHeaderArray.h
rename : netwerk/protocol/http/src/nsHttpNTLMAuth.cpp => netwerk/protocol/http/nsHttpNTLMAuth.cpp
rename : netwerk/protocol/http/src/nsHttpNTLMAuth.h => netwerk/protocol/http/nsHttpNTLMAuth.h
rename : netwerk/protocol/http/src/nsHttpPipeline.cpp => netwerk/protocol/http/nsHttpPipeline.cpp
rename : netwerk/protocol/http/src/nsHttpPipeline.h => netwerk/protocol/http/nsHttpPipeline.h
rename : netwerk/protocol/http/src/nsHttpRequestHead.cpp => netwerk/protocol/http/nsHttpRequestHead.cpp
rename : netwerk/protocol/http/src/nsHttpRequestHead.h => netwerk/protocol/http/nsHttpRequestHead.h
rename : netwerk/protocol/http/src/nsHttpResponseHead.cpp => netwerk/protocol/http/nsHttpResponseHead.cpp
rename : netwerk/protocol/http/src/nsHttpResponseHead.h => netwerk/protocol/http/nsHttpResponseHead.h
rename : netwerk/protocol/http/src/nsHttpTransaction.cpp => netwerk/protocol/http/nsHttpTransaction.cpp
rename : netwerk/protocol/http/src/nsHttpTransaction.h => netwerk/protocol/http/nsHttpTransaction.h
rename : netwerk/protocol/http/public/nsIHttpActivityObserver.idl => netwerk/protocol/http/nsIHttpActivityObserver.idl
rename : netwerk/protocol/http/public/nsIHttpAuthManager.idl => netwerk/protocol/http/nsIHttpAuthManager.idl
rename : netwerk/protocol/http/public/nsIHttpAuthenticator.idl => netwerk/protocol/http/nsIHttpAuthenticator.idl
rename : netwerk/protocol/http/public/nsIHttpChannel.idl => netwerk/protocol/http/nsIHttpChannel.idl
rename : netwerk/protocol/http/public/nsIHttpChannelInternal.idl => netwerk/protocol/http/nsIHttpChannelInternal.idl
rename : netwerk/protocol/http/public/nsIHttpEventSink.idl => netwerk/protocol/http/nsIHttpEventSink.idl
rename : netwerk/protocol/http/public/nsIHttpHeaderVisitor.idl => netwerk/protocol/http/nsIHttpHeaderVisitor.idl
rename : netwerk/protocol/http/public/nsIHttpProtocolHandler.idl => netwerk/protocol/http/nsIHttpProtocolHandler.idl
rename : netwerk/protocol/res/public/nsIResProtocolHandler.idl => netwerk/protocol/res/nsIResProtocolHandler.idl
rename : netwerk/protocol/res/src/nsResProtocolHandler.cpp => netwerk/protocol/res/nsResProtocolHandler.cpp
rename : netwerk/protocol/res/src/nsResProtocolHandler.h => netwerk/protocol/res/nsResProtocolHandler.h
rename : netwerk/protocol/viewsource/public/nsIViewSourceChannel.idl => netwerk/protocol/viewsource/nsIViewSourceChannel.idl
rename : netwerk/protocol/viewsource/src/nsViewSourceChannel.cpp => netwerk/protocol/viewsource/nsViewSourceChannel.cpp
rename : netwerk/protocol/viewsource/src/nsViewSourceChannel.h => netwerk/protocol/viewsource/nsViewSourceChannel.h
rename : netwerk/protocol/viewsource/src/nsViewSourceHandler.cpp => netwerk/protocol/viewsource/nsViewSourceHandler.cpp
rename : netwerk/protocol/viewsource/src/nsViewSourceHandler.h => netwerk/protocol/viewsource/nsViewSourceHandler.h
rename : netwerk/socket/base/nsISOCKSSocketInfo.idl => netwerk/socket/nsISOCKSSocketInfo.idl
rename : netwerk/socket/base/nsISSLSocketControl.idl => netwerk/socket/nsISSLSocketControl.idl
rename : netwerk/socket/base/nsISocketProvider.idl => netwerk/socket/nsISocketProvider.idl
rename : netwerk/socket/base/nsISocketProviderService.idl => netwerk/socket/nsISocketProviderService.idl
rename : netwerk/socket/base/nsITransportSecurityInfo.idl => netwerk/socket/nsITransportSecurityInfo.idl
rename : netwerk/socket/base/nsSOCKS4SocketProvider.h => netwerk/socket/nsSOCKS4SocketProvider.h
rename : netwerk/socket/base/nsSOCKSIOLayer.cpp => netwerk/socket/nsSOCKSIOLayer.cpp
rename : netwerk/socket/base/nsSOCKSIOLayer.h => netwerk/socket/nsSOCKSIOLayer.h
rename : netwerk/socket/base/nsSOCKSSocketProvider.cpp => netwerk/socket/nsSOCKSSocketProvider.cpp
rename : netwerk/socket/base/nsSOCKSSocketProvider.h => netwerk/socket/nsSOCKSSocketProvider.h
rename : netwerk/socket/base/nsSocketProviderService.cpp => netwerk/socket/nsSocketProviderService.cpp
rename : netwerk/socket/base/nsSocketProviderService.h => netwerk/socket/nsSocketProviderService.h
rename : netwerk/socket/base/nsUDPSocketProvider.cpp => netwerk/socket/nsUDPSocketProvider.cpp
rename : netwerk/socket/base/nsUDPSocketProvider.h => netwerk/socket/nsUDPSocketProvider.h
rename : netwerk/wifi/public/nsIWifiAccessPoint.idl => netwerk/wifi/nsIWifiAccessPoint.idl
rename : netwerk/wifi/public/nsIWifiListener.idl => netwerk/wifi/nsIWifiListener.idl
rename : netwerk/wifi/public/nsIWifiMonitor.idl => netwerk/wifi/nsIWifiMonitor.idl
rename : netwerk/wifi/src/nsWifiAccessPoint.cpp => netwerk/wifi/nsWifiAccessPoint.cpp
rename : netwerk/wifi/src/nsWifiAccessPoint.h => netwerk/wifi/nsWifiAccessPoint.h
rename : netwerk/wifi/src/nsWifiMonitor.cpp => netwerk/wifi/nsWifiMonitor.cpp
rename : netwerk/wifi/src/nsWifiMonitor.h => netwerk/wifi/nsWifiMonitor.h
rename : netwerk/wifi/src/nsWifiScannerMac.cpp => netwerk/wifi/nsWifiScannerMac.cpp
rename : netwerk/wifi/src/nsWifiScannerSolaris.cpp => netwerk/wifi/nsWifiScannerSolaris.cpp
rename : netwerk/wifi/src/nsWifiScannerUnix.cpp => netwerk/wifi/nsWifiScannerUnix.cpp
rename : netwerk/wifi/src/nsWifiScannerWin.cpp => netwerk/wifi/nsWifiScannerWin.cpp
rename : netwerk/wifi/src/osx_corewlan.mm => netwerk/wifi/osx_corewlan.mm
rename : netwerk/wifi/src/osx_wifi.h => netwerk/wifi/osx_wifi.h
rename : netwerk/wifi/src/wlanapi.h => netwerk/wifi/wlanapi.h
2010-06-05 21:18:12 -04:00

675 lines
20 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:set ts=4 sw=4 sts=4 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Chak Nanga <chak@netscape.com>
* Darin Fisher <darin@meer.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsViewSourceChannel.h"
#include "nsIIOService.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsMimeTypes.h"
#include "nsNetUtil.h"
#include "nsIHttpHeaderVisitor.h"
NS_IMPL_ADDREF(nsViewSourceChannel)
NS_IMPL_RELEASE(nsViewSourceChannel)
/*
This QI uses NS_INTERFACE_MAP_ENTRY_CONDITIONAL to check for
non-nullness of mHttpChannel, mCachingChannel, and mUploadChannel.
*/
NS_INTERFACE_MAP_BEGIN(nsViewSourceChannel)
NS_INTERFACE_MAP_ENTRY(nsIViewSourceChannel)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIHttpChannel, mHttpChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICachingChannel, mCachingChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIUploadChannel, mUploadChannel)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIRequest, nsIViewSourceChannel)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIChannel, nsIViewSourceChannel)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIViewSourceChannel)
NS_INTERFACE_MAP_END
nsresult
nsViewSourceChannel::Init(nsIURI* uri)
{
mOriginalURI = uri;
nsCAutoString path;
nsresult rv = uri->GetPath(path);
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIIOService> pService(do_GetIOService(&rv));
if (NS_FAILED(rv)) return rv;
nsCAutoString scheme;
rv = pService->ExtractScheme(path, scheme);
if (NS_FAILED(rv))
return rv;
// prevent viewing source of javascript URIs (see bug 204779)
if (scheme.LowerCaseEqualsLiteral("javascript")) {
NS_WARNING("blocking view-source:javascript:");
return NS_ERROR_INVALID_ARG;
}
rv = pService->NewChannel(path, nsnull, nsnull, getter_AddRefs(mChannel));
if (NS_FAILED(rv))
return rv;
mChannel->SetOriginalURI(mOriginalURI);
mHttpChannel = do_QueryInterface(mChannel);
mCachingChannel = do_QueryInterface(mChannel);
mUploadChannel = do_QueryInterface(mChannel);
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:
NS_IMETHODIMP
nsViewSourceChannel::GetName(nsACString &result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsViewSourceChannel::IsPending(PRBool *result)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->IsPending(result);
}
NS_IMETHODIMP
nsViewSourceChannel::GetStatus(nsresult *status)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetStatus(status);
}
NS_IMETHODIMP
nsViewSourceChannel::Cancel(nsresult status)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->Cancel(status);
}
NS_IMETHODIMP
nsViewSourceChannel::Suspend(void)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->Suspend();
}
NS_IMETHODIMP
nsViewSourceChannel::Resume(void)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->Resume();
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods:
NS_IMETHODIMP
nsViewSourceChannel::GetOriginalURI(nsIURI* *aURI)
{
NS_ASSERTION(aURI, "Null out param!");
*aURI = mOriginalURI;
NS_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsViewSourceChannel::SetOriginalURI(nsIURI* aURI)
{
NS_ENSURE_ARG_POINTER(aURI);
mOriginalURI = aURI;
return NS_OK;
}
NS_IMETHODIMP
nsViewSourceChannel::GetURI(nsIURI* *aURI)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
nsCOMPtr<nsIURI> uri;
nsresult rv = mChannel->GetURI(getter_AddRefs(uri));
if (NS_FAILED(rv))
return rv;
// protect ourselves against broken channel implementations
if (!uri) {
NS_ERROR("inner channel returned NS_OK and a null URI");
return NS_ERROR_UNEXPECTED;
}
nsCAutoString spec;
uri->GetSpec(spec);
/* XXX Gross hack -- NS_NewURI goes into an infinite loop on
non-flat specs. See bug 136980 */
return NS_NewURI(aURI, nsCAutoString(NS_LITERAL_CSTRING("view-source:")+spec), nsnull);
}
NS_IMETHODIMP
nsViewSourceChannel::Open(nsIInputStream **_retval)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
nsresult rv = mChannel->Open(_retval);
if (NS_SUCCEEDED(rv)) {
mOpened = PR_TRUE;
}
return rv;
}
NS_IMETHODIMP
nsViewSourceChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
mListener = aListener;
/*
* We want to add ourselves to the loadgroup before opening
* mChannel, since we want to make sure we're in the loadgroup
* when mChannel finishes and fires OnStopRequest()
*/
nsCOMPtr<nsILoadGroup> loadGroup;
mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
if (loadGroup)
loadGroup->AddRequest(static_cast<nsIViewSourceChannel*>
(this), nsnull);
nsresult rv = mChannel->AsyncOpen(this, ctxt);
if (NS_FAILED(rv) && loadGroup)
loadGroup->RemoveRequest(static_cast<nsIViewSourceChannel*>
(this),
nsnull, rv);
if (NS_SUCCEEDED(rv)) {
mOpened = PR_TRUE;
}
return rv;
}
/*
* Both the view source channel and mChannel are added to the
* loadgroup. There should never be more than one request in the
* loadgroup that has LOAD_DOCUMENT_URI set. The one that has this
* flag set is the request whose URI is used to refetch the document,
* so it better be the viewsource channel.
*
* Therefore, we need to make sure that
* 1) The load flags on mChannel _never_ include LOAD_DOCUMENT_URI
* 2) The load flags on |this| include LOAD_DOCUMENT_URI when it was
* set via SetLoadFlags (mIsDocument keeps track of this flag).
*/
NS_IMETHODIMP
nsViewSourceChannel::GetLoadFlags(PRUint32 *aLoadFlags)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
nsresult rv = mChannel->GetLoadFlags(aLoadFlags);
if (NS_FAILED(rv))
return rv;
// This should actually be just LOAD_DOCUMENT_URI but the win32 compiler
// fails to deal due to amiguous inheritance. nsIChannel::LOAD_DOCUMENT_URI
// also fails; the Win32 compiler thinks that's supposed to be a method.
if (mIsDocument)
*aLoadFlags |= ::nsIChannel::LOAD_DOCUMENT_URI;
return rv;
}
NS_IMETHODIMP
nsViewSourceChannel::SetLoadFlags(PRUint32 aLoadFlags)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
// "View source" always wants the currently cached content.
// We also want to have _this_ channel, not mChannel to be the
// 'document' channel in the loadgroup.
// These should actually be just LOAD_FROM_CACHE and LOAD_DOCUMENT_URI but
// the win32 compiler fails to deal due to amiguous inheritance.
// nsIChannel::LOAD_DOCUMENT_URI/nsIRequest::LOAD_FROM_CACHE also fails; the
// Win32 compiler thinks that's supposed to be a method.
mIsDocument = (aLoadFlags & ::nsIChannel::LOAD_DOCUMENT_URI) ? PR_TRUE : PR_FALSE;
return mChannel->SetLoadFlags((aLoadFlags |
::nsIRequest::LOAD_FROM_CACHE) &
~::nsIChannel::LOAD_DOCUMENT_URI);
}
NS_IMETHODIMP
nsViewSourceChannel::GetContentType(nsACString &aContentType)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
aContentType.Truncate();
if (mContentType.IsEmpty())
{
// Get the current content type
nsresult rv;
nsCAutoString contentType;
rv = mChannel->GetContentType(contentType);
if (NS_FAILED(rv)) return rv;
// If we don't know our type, just say so. The unknown
// content decoder will then kick in automatically, and it
// will call our SetOriginalContentType method instead of our
// SetContentType method to set the type it determines.
if (!contentType.Equals(UNKNOWN_CONTENT_TYPE)) {
contentType = VIEWSOURCE_CONTENT_TYPE;
}
mContentType = contentType;
}
aContentType = mContentType;
return NS_OK;
}
NS_IMETHODIMP
nsViewSourceChannel::SetContentType(const nsACString &aContentType)
{
// Our GetContentType() currently returns VIEWSOURCE_CONTENT_TYPE
//
// However, during the parsing phase the parser calls our
// channel's GetContentType(). Returning the string above trips up
// the parser. In order to avoid messy changes and not to have the
// parser depend on nsIViewSourceChannel Vidur proposed the
// following solution:
//
// The ViewSourceChannel initially returns a content type of
// VIEWSOURCE_CONTENT_TYPE. Based on this type decisions to
// create a viewer for doing a view source are made. After the
// viewer is created, nsLayoutDLF::CreateInstance() calls this
// SetContentType() with the original content type. When it's
// time for the parser to find out the content type it will call
// our channel's GetContentType() and it will get the original
// content type, such as, text/html and everything is kosher from
// then on.
if (!mOpened) {
// We do not take hints
return NS_ERROR_NOT_AVAILABLE;
}
mContentType = aContentType;
return NS_OK;
}
NS_IMETHODIMP
nsViewSourceChannel::GetContentCharset(nsACString &aContentCharset)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetContentCharset(aContentCharset);
}
NS_IMETHODIMP
nsViewSourceChannel::SetContentCharset(const nsACString &aContentCharset)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->SetContentCharset(aContentCharset);
}
NS_IMETHODIMP
nsViewSourceChannel::GetContentLength(PRInt32 *aContentLength)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetContentLength(aContentLength);
}
NS_IMETHODIMP
nsViewSourceChannel::SetContentLength(PRInt32 aContentLength)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->SetContentLength(aContentLength);
}
NS_IMETHODIMP
nsViewSourceChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetLoadGroup(aLoadGroup);
}
NS_IMETHODIMP
nsViewSourceChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->SetLoadGroup(aLoadGroup);
}
NS_IMETHODIMP
nsViewSourceChannel::GetOwner(nsISupports* *aOwner)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetOwner(aOwner);
}
NS_IMETHODIMP
nsViewSourceChannel::SetOwner(nsISupports* aOwner)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->SetOwner(aOwner);
}
NS_IMETHODIMP
nsViewSourceChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetNotificationCallbacks(aNotificationCallbacks);
}
NS_IMETHODIMP
nsViewSourceChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->SetNotificationCallbacks(aNotificationCallbacks);
}
NS_IMETHODIMP
nsViewSourceChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetSecurityInfo(aSecurityInfo);
}
// nsIViewSourceChannel methods
NS_IMETHODIMP
nsViewSourceChannel::GetOriginalContentType(nsACString &aContentType)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
return mChannel->GetContentType(aContentType);
}
NS_IMETHODIMP
nsViewSourceChannel::SetOriginalContentType(const nsACString &aContentType)
{
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
// clear our cached content-type value
mContentType.Truncate();
return mChannel->SetContentType(aContentType);
}
// nsIRequestObserver methods
NS_IMETHODIMP
nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
{
NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
// The channel may have gotten redirected... Time to update our info
mChannel = do_QueryInterface(aRequest);
mHttpChannel = do_QueryInterface(aRequest);
mCachingChannel = do_QueryInterface(aRequest);
mUploadChannel = do_QueryInterface(aRequest);
return mListener->OnStartRequest(static_cast<nsIViewSourceChannel*>
(this),
aContext);
}
NS_IMETHODIMP
nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest, nsISupports* aContext,
nsresult aStatus)
{
NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
if (mChannel)
{
nsCOMPtr<nsILoadGroup> loadGroup;
mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
if (loadGroup)
{
loadGroup->RemoveRequest(static_cast<nsIViewSourceChannel*>
(this),
nsnull, aStatus);
}
}
return mListener->OnStopRequest(static_cast<nsIViewSourceChannel*>
(this),
aContext, aStatus);
}
// nsIStreamListener methods
NS_IMETHODIMP
nsViewSourceChannel::OnDataAvailable(nsIRequest *aRequest, nsISupports* aContext,
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
PRUint32 aLength)
{
NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
return mListener->OnDataAvailable(static_cast<nsIViewSourceChannel*>
(this),
aContext, aInputStream,
aSourceOffset, aLength);
}
// nsIHttpChannel methods
// We want to forward most of nsIHttpChannel over to mHttpChannel, but we want
// to override GetRequestHeader and VisitHeaders. The reason is that we don't
// want various headers like Link: and Refresh: applying to view-source.
NS_IMETHODIMP
nsViewSourceChannel::GetRequestMethod(nsACString & aRequestMethod)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetRequestMethod(aRequestMethod);
}
NS_IMETHODIMP
nsViewSourceChannel::SetRequestMethod(const nsACString & aRequestMethod)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetRequestMethod(aRequestMethod);
}
NS_IMETHODIMP
nsViewSourceChannel::GetReferrer(nsIURI * *aReferrer)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetReferrer(aReferrer);
}
NS_IMETHODIMP
nsViewSourceChannel::SetReferrer(nsIURI * aReferrer)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetReferrer(aReferrer);
}
NS_IMETHODIMP
nsViewSourceChannel::GetRequestHeader(const nsACString & aHeader,
nsACString & aValue)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetRequestHeader(aHeader, aValue);
}
NS_IMETHODIMP
nsViewSourceChannel::SetRequestHeader(const nsACString & aHeader,
const nsACString & aValue,
PRBool aMerge)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetRequestHeader(aHeader, aValue, aMerge);
}
NS_IMETHODIMP
nsViewSourceChannel::VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->VisitRequestHeaders(aVisitor);
}
NS_IMETHODIMP
nsViewSourceChannel::GetAllowPipelining(PRBool *aAllowPipelining)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetAllowPipelining(aAllowPipelining);
}
NS_IMETHODIMP
nsViewSourceChannel::SetAllowPipelining(PRBool aAllowPipelining)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetAllowPipelining(aAllowPipelining);
}
NS_IMETHODIMP
nsViewSourceChannel::GetRedirectionLimit(PRUint32 *aRedirectionLimit)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetRedirectionLimit(aRedirectionLimit);
}
NS_IMETHODIMP
nsViewSourceChannel::SetRedirectionLimit(PRUint32 aRedirectionLimit)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetRedirectionLimit(aRedirectionLimit);
}
NS_IMETHODIMP
nsViewSourceChannel::GetResponseStatus(PRUint32 *aResponseStatus)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetResponseStatus(aResponseStatus);
}
NS_IMETHODIMP
nsViewSourceChannel::GetResponseStatusText(nsACString & aResponseStatusText)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetResponseStatusText(aResponseStatusText);
}
NS_IMETHODIMP
nsViewSourceChannel::GetRequestSucceeded(PRBool *aRequestSucceeded)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->GetRequestSucceeded(aRequestSucceeded);
}
NS_IMETHODIMP
nsViewSourceChannel::GetResponseHeader(const nsACString & aHeader,
nsACString & aValue)
{
if (!mHttpChannel)
return NS_ERROR_NULL_POINTER;
if (!aHeader.Equals(NS_LITERAL_CSTRING("Content-Type"),
nsCaseInsensitiveCStringComparator())) {
aValue.Truncate();
return NS_OK;
}
return mHttpChannel->GetResponseHeader(aHeader, aValue);
}
NS_IMETHODIMP
nsViewSourceChannel::SetResponseHeader(const nsACString & header,
const nsACString & value, PRBool merge)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->SetResponseHeader(header, value, merge);
}
NS_IMETHODIMP
nsViewSourceChannel::VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor)
{
if (!mHttpChannel)
return NS_ERROR_NULL_POINTER;
NS_NAMED_LITERAL_CSTRING(contentTypeStr, "Content-Type");
nsCAutoString contentType;
nsresult rv =
mHttpChannel->GetResponseHeader(contentTypeStr, contentType);
if (NS_SUCCEEDED(rv))
aVisitor->VisitHeader(contentTypeStr, contentType);
return NS_OK;
}
NS_IMETHODIMP
nsViewSourceChannel::IsNoStoreResponse(PRBool *_retval)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->IsNoStoreResponse(_retval);
}
NS_IMETHODIMP
nsViewSourceChannel::IsNoCacheResponse(PRBool *_retval)
{
return !mHttpChannel ? NS_ERROR_NULL_POINTER :
mHttpChannel->IsNoCacheResponse(_retval);
}