bug 833947 - system pac file at normalized uri fails r=jduell

This commit is contained in:
Patrick McManus 2013-02-12 13:29:27 -05:00
parent c0324f6340
commit 8fbb62bc8e
2 changed files with 10 additions and 2 deletions

View File

@ -369,6 +369,7 @@ nsPACMan::LoadPACFromURI(const nsCString &spec)
if (!spec.IsEmpty()) {
mPACURISpec = spec;
mPACURIRedirectSpec.Truncate();
mNormalPACURISpec.Truncate(); // set at load time
mLoadFailureCount = 0; // reset
}
@ -399,6 +400,7 @@ nsPACMan::StartLoading()
// NOTE: This results in GetProxyForURI being called
if (pacURI) {
pacURI->GetSpec(mNormalPACURISpec);
ios->NewChannelFromURI(pacURI, getter_AddRefs(channel));
}
else {

View File

@ -136,7 +136,8 @@ public:
*/
bool IsPACURI(const nsACString &spec)
{
return mPACURISpec.Equals(spec) || mPACURIRedirectSpec.Equals(spec);
return mPACURISpec.Equals(spec) || mPACURIRedirectSpec.Equals(spec) ||
mNormalPACURISpec.Equals(spec);
}
bool IsPACURI(nsIURI *uri) {
@ -206,8 +207,13 @@ private:
mozilla::LinkedList<PendingPACQuery> mPendingQ; /* pac thread only */
nsCString mPACURISpec; // Not an nsIURI for use off main thread
// These specs are not nsIURI so that they can be used off the main thread.
// The non-normalized versions are directly from the configuration, the
// normalized version has been extracted from an nsIURI
nsCString mPACURISpec;
nsCString mPACURIRedirectSpec;
nsCString mNormalPACURISpec;
nsCOMPtr<nsIStreamLoader> mLoader;
bool mLoadPending;
bool mShutdown;