bug 283489 r=darin sr=bz
- Make the HTTP, FTP and file channels implement nsIPropertyBag2 and associated interfaces (by inheriting from nsHashPropertyBag) - Use that interface to expose a "content-length" property giving the length of the data as a 64-bit value on the FTP and HTTP channels - change docshell and xpinstall to use nsIPropertyBag2 instead of nsIProperties to read/write the referrer property git-svn-id: svn://10.0.0.236/trunk@171661 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
#include "nsISeekableStream.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIWritablePropertyBag2.h"
|
||||
|
||||
// we want to explore making the document own the load group
|
||||
// so we can associate the document URI with the load group.
|
||||
@@ -5762,12 +5763,13 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIProperties> props(do_QueryInterface(channel));
|
||||
nsCOMPtr<nsIWritablePropertyBag2> props(do_QueryInterface(channel));
|
||||
if (props)
|
||||
{
|
||||
// save true referrer for those who need it (e.g. xpinstall whitelisting)
|
||||
// Currently only http and ftp channels support this.
|
||||
props->Set("docshell.internalReferrer", aReferrerURI);
|
||||
props->SetPropertyAsInterface(NS_LITERAL_STRING("docshell.internalReferrer"),
|
||||
aReferrerURI);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user