[Pkg-mozext-commits] [requestpolicy] 03/04: Strip "view-source:" from origins like we do for destinations.
David Prévot
taffit at moszumanska.debian.org
Fri Sep 19 17:44:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag release-0.5.26
in repository requestpolicy.
commit 53c5264c32f5997f32ceb91a2e1c0c044e607b8d
Author: Justin Samuel <js at justinsamuel.com>
Date: Sat Apr 14 09:45:03 2012 -0700
Strip "view-source:" from origins like we do for destinations.
---
src/components/requestpolicyService.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/components/requestpolicyService.js b/src/components/requestpolicyService.js
index 66d639c..d7b1b9f 100644
--- a/src/components/requestpolicyService.js
+++ b/src/components/requestpolicyService.js
@@ -2030,6 +2030,16 @@ RequestPolicyService.prototype = {
aRequestOrigin = requestpolicy.mod.DomainUtil.getUriObject(origin);
}
+ if (aRequestOrigin.scheme == "view-source") {
+ var newOrigin = origin.split(":").slice(1).join(":");
+ requestpolicy.mod.Logger.info(
+ requestpolicy.mod.Logger.TYPE_CONTENT,
+ "Considering view-source origin <"
+ + origin + "> to be origin <" + newOrigin + ">");
+ origin = newOrigin;
+ aRequestOrigin = requestpolicy.mod.DomainUtil.getUriObject(origin);
+ }
+
if (aContentLocation.scheme == "view-source") {
var newDest = dest.split(":").slice(1).join(":");
requestpolicy.mod.Logger.info(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list