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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
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 (community) Approve
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.
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/changelog.rst'
--- docs/changelog.rst 2016-07-27 19:16:37 +0000
+++ docs/changelog.rst 2016-07-28 16:30:45 +0000
@@ -3,6 +3,15 @@
3=========3=========
44
55
62.0.0 (rc4)
7===========
8
9Issues fixed in this release
10----------------------------
11
12LP: #1592666 Mirror URL contains double slash (/) after hostname, impacting proxy cachaility.
13
14
62.0.0 (rc3)152.0.0 (rc3)
7===========16===========
817
918
=== modified file 'src/maasserver/preseed.py'
--- src/maasserver/preseed.py 2016-07-07 21:57:57 +0000
+++ src/maasserver/preseed.py 2016-07-28 16:30:45 +0000
@@ -573,7 +573,7 @@
573 and, optionally, the port.573 and, optionally, the port.
574 """574 """
575 parsed_url = urlparse(url)575 parsed_url = urlparse(url)
576 return parsed_url.netloc, parsed_url.path576 return parsed_url.netloc, parsed_url.path.lstrip("/")
577577
578578
579def get_preseed_context(osystem='', release='', rack_controller=None):579def get_preseed_context(osystem='', release='', rack_controller=None):
580580
=== modified file 'src/maasserver/tests/test_preseed.py'
--- src/maasserver/tests/test_preseed.py 2016-07-07 21:57:57 +0000
+++ src/maasserver/tests/test_preseed.py 2016-07-28 16:30:45 +0000
@@ -120,12 +120,12 @@
120120
121 def test_get_netloc_and_path(self):121 def test_get_netloc_and_path(self):
122 input_and_results = [122 input_and_results = [
123 ('http://name.domain:66/my/path', ('name.domain:66', '/my/path')),123 ('http://name.domain:66/my/path', ('name.domain:66', 'my/path')),
124 ('http://name.domain:80/my/path', ('name.domain:80', '/my/path')),124 ('http://name.domain:80/my/path', ('name.domain:80', 'my/path')),
125 ('http://name.domain/my/path', ('name.domain', '/my/path')),125 ('http://name.domain/my/path', ('name.domain', 'my/path')),
126 ('https://domain/path', ('domain', '/path')),126 ('https://domain/path', ('domain', 'path')),
127 ('http://domain:12', ('domain:12', '')),127 ('http://domain:12', ('domain:12', '')),
128 ('http://domain/', ('domain', '/')),128 ('http://domain/', ('domain', '')),
129 ('http://domain', ('domain', '')),129 ('http://domain', ('domain', '')),
130 ]130 ]
131 inputs = [input for input, _ in input_and_results]131 inputs = [input for input, _ in input_and_results]
@@ -443,9 +443,9 @@
443 self.assertEqual(443 self.assertEqual(
444 (444 (
445 parsed_main_archive.hostname,445 parsed_main_archive.hostname,
446 parsed_main_archive.path,446 parsed_main_archive.path.lstrip('/'),
447 parsed_ports_archive.hostname,447 parsed_ports_archive.hostname,
448 parsed_ports_archive.path,448 parsed_ports_archive.path.lstrip('/'),
449 ),449 ),
450 (450 (
451 context['main_archive_hostname'],451 context['main_archive_hostname'],

Subscribers

People subscribed via source and target branches