~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/wsgi.py

  • Committer: John Arbash Meinel
  • Date: 2007-04-12 21:33:07 UTC
  • mfrom: (2413.4.1 api-doc-builders)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070412213307-kuh07cnzaud12wx1
[merge] api-doc-builder and remove the pydoctor build code for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from cStringIO import StringIO
24
24
 
25
 
from bzrlib.transport import chroot, get_transport, smart
 
25
from bzrlib.transport import chroot, get_transport, remote
26
26
from bzrlib.urlutils import local_path_to_url
27
27
    
28
28
 
94
94
        # accidentally let people access locations they shouldn't.
95
95
        # e.g. consider a smart server request for "get /etc/passwd" or
96
96
        # something.
97
 
        self.backing_transport = chroot.ChrootTransportDecorator(
98
 
            'chroot+' + backing_transport.base, _decorated=backing_transport)
 
97
        self.chroot_server = chroot.ChrootServer(backing_transport)
 
98
        self.chroot_server.setUp()
 
99
        self.backing_transport = get_transport(self.chroot_server.get_url())
 
100
        # While the chroot server can technically be torn down at this point,
 
101
        # as all it does is remove the scheme registration from transport's 
 
102
        # protocol dictionary, we don't *just in case* there are parts of 
 
103
        # bzrlib that will invoke 'get_transport' on urls rather than cloning
 
104
        # around the existing transport.
 
105
        #self.chroot_server.tearDown()
99
106
 
100
107
    def __call__(self, environ, start_response):
101
108
        """WSGI application callable."""
124
131
        return [response_data]
125
132
 
126
133
    def make_request(self, transport, write_func):
127
 
        return smart.SmartServerRequestProtocolOne(transport, write_func)
 
134
        return protocol.SmartServerRequestProtocolOne(transport, write_func)