Merge lp:~andreserl/maas/lp1592666_2.0 into lp:maas/2.0

Proposed by Andres Rodriguez on 2016-07-28
Status: Merged
Approved by: Andres Rodriguez on 2016-07-28
Approved revision: 5182
Merged at revision: 5182
Proposed branch: lp:~andreserl/maas/lp1592666_2.0
Merge into: lp:maas/2.0
Diff against target: 66 lines (+17/-8)
3 files modified
docs/changelog.rst (+9/-0)
src/maasserver/preseed.py (+1/-1)
src/maasserver/tests/test_preseed.py (+7/-7)
To merge this branch: bzr merge lp:~andreserl/maas/lp1592666_2.0
Reviewer Review Type Date Requested Status
Andres Rodriguez Approve on 2016-07-28
Review via email: mp+301401@code.launchpad.net

Commit message

Backport rev5213: Strip forward slash in the path of the archive mirror, provided that when composing the whole archive, we add the additional "/".

To post a comment you must log in.
review: Approve
lp:~andreserl/maas/lp1592666_2.0 updated on 2016-07-28
5182. By Andres Rodriguez on 2016-07-28

Add changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/changelog.rst'
2--- docs/changelog.rst 2016-07-27 19:16:37 +0000
3+++ docs/changelog.rst 2016-07-28 16:30:45 +0000
4@@ -3,6 +3,15 @@
5 =========
6
7
8+2.0.0 (rc4)
9+===========
10+
11+Issues fixed in this release
12+----------------------------
13+
14+LP: #1592666 Mirror URL contains double slash (/) after hostname, impacting proxy cachaility.
15+
16+
17 2.0.0 (rc3)
18 ===========
19
20
21=== modified file 'src/maasserver/preseed.py'
22--- src/maasserver/preseed.py 2016-07-07 21:57:57 +0000
23+++ src/maasserver/preseed.py 2016-07-28 16:30:45 +0000
24@@ -573,7 +573,7 @@
25 and, optionally, the port.
26 """
27 parsed_url = urlparse(url)
28- return parsed_url.netloc, parsed_url.path
29+ return parsed_url.netloc, parsed_url.path.lstrip("/")
30
31
32 def get_preseed_context(osystem='', release='', rack_controller=None):
33
34=== modified file 'src/maasserver/tests/test_preseed.py'
35--- src/maasserver/tests/test_preseed.py 2016-07-07 21:57:57 +0000
36+++ src/maasserver/tests/test_preseed.py 2016-07-28 16:30:45 +0000
37@@ -120,12 +120,12 @@
38
39 def test_get_netloc_and_path(self):
40 input_and_results = [
41- ('http://name.domain:66/my/path', ('name.domain:66', '/my/path')),
42- ('http://name.domain:80/my/path', ('name.domain:80', '/my/path')),
43- ('http://name.domain/my/path', ('name.domain', '/my/path')),
44- ('https://domain/path', ('domain', '/path')),
45+ ('http://name.domain:66/my/path', ('name.domain:66', 'my/path')),
46+ ('http://name.domain:80/my/path', ('name.domain:80', 'my/path')),
47+ ('http://name.domain/my/path', ('name.domain', 'my/path')),
48+ ('https://domain/path', ('domain', 'path')),
49 ('http://domain:12', ('domain:12', '')),
50- ('http://domain/', ('domain', '/')),
51+ ('http://domain/', ('domain', '')),
52 ('http://domain', ('domain', '')),
53 ]
54 inputs = [input for input, _ in input_and_results]
55@@ -443,9 +443,9 @@
56 self.assertEqual(
57 (
58 parsed_main_archive.hostname,
59- parsed_main_archive.path,
60+ parsed_main_archive.path.lstrip('/'),
61 parsed_ports_archive.hostname,
62- parsed_ports_archive.path,
63+ parsed_ports_archive.path.lstrip('/'),
64 ),
65 (
66 context['main_archive_hostname'],

Subscribers

People subscribed via source and target branches