Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/org/adblockplus/brazil/TransparentProxyHandler.java

Issue 29323464: Issue 2894 - 'archive.org/web' links fail to open on rooted devices (Closed)
Patch Set: Created Aug. 12, 2015, 9:49 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/org/adblockplus/brazil/RequestHandler.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 21 matching lines...) Expand all
32 32
33 @Override 33 @Override
34 public boolean init(final Server server, final String prefix) 34 public boolean init(final Server server, final String prefix)
35 { 35 {
36 return true; 36 return true;
37 } 37 }
38 38
39 @Override 39 @Override
40 public boolean respond(final Request request) throws IOException 40 public boolean respond(final Request request) throws IOException
41 { 41 {
42 if (!request.url.contains("://")) 42 if (!RequestHandler.RE_HTTP.matcher(request.url).find())
43 { 43 {
44 request.url = "http://" + request.headers.get("host") + request.url; 44 request.url = "http://" + request.headers.get("host") + request.url;
45 } 45 }
46 return false; 46 return false;
47 } 47 }
48
49 } 48 }
OLDNEW
« no previous file with comments | « src/org/adblockplus/brazil/RequestHandler.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld