Merge lp:~blake-rouse/maas/fix-1484696-2-1.8 into lp:maas/1.8

Proposed by Blake Rouse on 2015-09-25
Status: Merged
Approved by: Blake Rouse on 2015-09-25
Approved revision: 4046
Merged at revision: 4047
Proposed branch: lp:~blake-rouse/maas/fix-1484696-2-1.8
Merge into: lp:maas/1.8
Diff against target: 41 lines (+19/-1)
2 files modified
src/maasserver/static/js/angular/factories/region.js (+6/-1)
src/maasserver/static/js/angular/factories/tests/test_region.js (+13/-0)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-1484696-2-1.8
Reviewer Review Type Date Requested Status
Blake Rouse Approve on 2015-09-25
Review via email: mp+272407@code.launchpad.net

This proposal supersedes a proposal from 2015-09-25.

Commit message

Only include the ':' in _buildUrl if a port is defined.

This fixes an issue where if the ':' is included apache will not proxy the connection.

To post a comment you must log in.
Blake Rouse (blake-rouse) wrote :

Self-approving backport.

review: Approve
MAAS Lander (maas-lander) wrote :
Download full text (95.2 KiB)

The attempt to merge lp:~blake-rouse/maas/fix-1484696-2-1.8 into lp:maas/1.8 failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [63.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Get:5 http://security.ubuntu.com trusty-security/main Sources [96.2 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:6 http://security.ubuntu.com trusty-security/universe Sources [31.1 kB]
Get:7 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [236 kB]
Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [344 kB]
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [138 kB]
Get:10 http://security.ubuntu.com trusty-security/universe amd64 Packages [117 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:11 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [622 kB]
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [319 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,032 kB in 3s (613 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm pep8 phantomjs postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mock python-netaddr python-netifaces python-nose...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/static/js/angular/factories/region.js'
2--- src/maasserver/static/js/angular/factories/region.js 2015-08-19 19:49:04 +0000
3+++ src/maasserver/static/js/angular/factories/region.js 2015-09-25 14:33:22 +0000
4@@ -188,7 +188,12 @@
5 path += '/';
6 }
7
8- url = proto + "://" + host + ":" + port + path + "ws";
9+ // Build the URL. Include the :port only if it has a value.
10+ url = proto + "://" + host;
11+ if(angular.isString(port) && port.length > 0){
12+ url += ":" + port;
13+ }
14+ url += path + "ws";
15
16 // Include the csrftoken in the URL if it's defined.
17 csrftoken = $cookies.csrftoken;
18
19=== modified file 'src/maasserver/static/js/angular/factories/tests/test_region.js'
20--- src/maasserver/static/js/angular/factories/tests/test_region.js 2015-08-19 19:49:04 +0000
21+++ src/maasserver/static/js/angular/factories/tests/test_region.js 2015-09-25 14:33:22 +0000
22@@ -356,6 +356,19 @@
23 angular.element.and.callThrough();
24 });
25
26+ it("doesnt include ':' when no port given", function() {
27+ if(angular.isString($window.location.port) &&
28+ $window.location.port.length > 0) {
29+ expect(RegionConnection._buildUrl()).toBe(
30+ "ws://" + $window.location.hostname + ":" +
31+ $window.location.port + $window.location.pathname + "/ws");
32+ } else {
33+ expect(RegionConnection._buildUrl()).toBe(
34+ "ws://" + $window.location.hostname +
35+ $window.location.pathname + "/ws");
36+ }
37+ });
38+
39 it("includes csrftoken if cookie defined", function() {
40 csrftoken = makeName('csrftoken');
41 // No need to organize a cleanup: cookies are reset before each

Subscribers

People subscribed via source and target branches

to all changes: