OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 """Ensures that all depot_tools talks directly to appengine to avoid SNI.""" |
| 6 |
| 7 import urlparse |
| 8 |
| 9 |
| 10 mapping = { |
| 11 'codereview.chromium.org': 'chromiumcodereview.appspot.com', |
| 12 'crashpad.chromium.org': 'crashpad-home.appspot.com', |
| 13 'bugs.chromium.org': 'monorail-prod.appspot.com', |
| 14 'bugs-staging.chromium.org': 'monorail-staging.appspot.com', |
| 15 } |
| 16 |
| 17 |
| 18 def MapUrl(url): |
| 19 parts = list(urlparse.urlsplit(url)) |
| 20 new_netloc = mapping.get(parts[1]) |
| 21 if new_netloc: |
| 22 parts[1] = new_netloc |
| 23 return urlparse.urlunsplit(parts) |
OLD | NEW |