/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from __future__ import absolute_import
24
24
 
25
 
from cStringIO import StringIO
26
 
 
27
 
from breezy.smart import medium
28
 
from breezy.transport import chroot, get_transport
29
 
from breezy.urlutils import local_path_to_url
 
25
from ...sixish import (
 
26
    BytesIO,
 
27
    )
 
28
from ...smart import medium
 
29
from ...transport import chroot, get_transport
 
30
from ...urlutils import local_path_to_url
30
31
 
31
32
 
32
33
def make_app(root, prefix, path_var='REQUEST_URI', readonly=True,
43
44
    else:
44
45
        base_transport = get_transport(local_url)
45
46
    if load_plugins:
46
 
        from breezy.plugin import load_plugins
 
47
        from ...plugin import load_plugins
47
48
        load_plugins()
48
49
    if enable_logging:
49
50
        import breezy.trace
157
158
            raise AssertionError(adjusted_relpath)
158
159
 
159
160
        transport = self.backing_transport.clone(adjusted_relpath)
160
 
        out_buffer = StringIO()
 
161
        out_buffer = BytesIO()
161
162
        request_data_length = int(environ['CONTENT_LENGTH'])
162
163
        request_data_bytes = environ['wsgi.input'].read(request_data_length)
163
164
        smart_protocol_request = self.make_request(