summaryrefslogtreecommitdiff
path: root/tor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tor.cc')
-rw-r--r--tor.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/tor.cc b/tor.cc
index 8406cba..4d7a91e 100644
--- a/tor.cc
+++ b/tor.cc
@@ -151,8 +151,16 @@ bool TorMethod::Fetch(FetchItem *Itm)
URI Uri = Itm->Uri;
string remotehost = Uri.Host;
- // Undo the "tor" at the start
- Uri.Access = "http";
+ // Undo any "tor" or "tor+" at the start
+ string prefix="tor+";
+ if ("tor" == Uri.Access)
+ {
+ Uri.Access = "http";
+ }
+ else if (!Uri.Access.compare(0, prefix.size(), prefix))
+ {
+ Uri.Access = Uri.Access.substr(prefix.size());
+ }
// TODO:
// - http::Pipeline-Depth