fixes bug 170648 "eliminate referrer type from nsIHttpChannel in preparation

for freezing" r=dougt sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@130442 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2002-09-25 21:28:53 +00:00
parent 276c4673a0
commit 8fa070e5cd
13 changed files with 43 additions and 43 deletions

View File

@@ -5079,6 +5079,12 @@ nsDocShell::DoURILoad(nsIURI * aURI,
getter_AddRefs(loadGroup));
if (NS_FAILED(rv)) return rv;
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
if (firstParty) {
// tag first party URL loads
loadFlags |= nsIChannel::LOAD_INITIAL_DOCUMENT_URI;
}
// open a channel for the url
nsCOMPtr<nsIChannel> channel;
@@ -5086,14 +5092,14 @@ nsDocShell::DoURILoad(nsIURI * aURI,
aURI,
nsnull,
loadGroup,
NS_STATIC_CAST(nsIInterfaceRequestor *, this));
NS_STATIC_CAST(nsIInterfaceRequestor *, this),
loadFlags);
if (NS_FAILED(rv))
return rv;
channel->SetOriginalURI(aURI);
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
if (httpChannel) {
if (firstParty) {
httpChannel->SetDocumentURI(aURI);
@@ -5166,8 +5172,7 @@ nsDocShell::DoURILoad(nsIURI * aURI,
}
// Set the referrer explicitly
if (aReferrerURI) // Referrer is currenly only set for link clicks here.
httpChannel->SetReferrer(aReferrerURI,
nsIHttpChannel::REFERRER_LINK_CLICK);
httpChannel->SetReferrer(aReferrerURI);
}
// We want to use the pref for directory listings
nsCOMPtr<nsIDirectoryListing> dirList = do_QueryInterface(channel);