~juju-gui-charmers/charms/precise/juju-gui/trunk

« back to all changes in this revision

Viewing changes to server/guiserver/handlers.py

  • Committer: Francesco Banconi
  • Date: 2015-03-02 15:00:30 UTC
  • mfrom: (60.13.162 develop-trunk)
  • Revision ID: francesco.banconi@canonical.com-20150302150030-ya05a8fh7vxlezbr
Tags: 1.3.3
New charm release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
            self.user, auth_backend, tokens, write_message)
102
102
        # Set up the bundle deployment infrastructure.
103
103
        self.deployment = DeployMiddleware(self.user, deployer, write_message)
 
104
        # XXX The handler is no longer path agnostic, and this can be fixed by
 
105
        # capturing the relevant path fragment on the regexp, and then
 
106
        # overriding the handler's open method to store the path in the
 
107
        # instance.
 
108
        path = self.request.path[len('/ws'):]
 
109
        if path:
 
110
            # If they provided a path in their request then we need to use
 
111
            # that api endpoint.
 
112
            apiurl = '{}{}'.format(apiurl, path)
104
113
        # Juju requires the Origin header to be included in the WebSocket
105
114
        # client handshake request. Propagate the client origin if present;
106
115
        # use the Juju API server as origin otherwise.