/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

Fix a bunch of tests on python3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
            # Remove the root_client_path from the relpath, and set
141
141
            # adjusted_tcp to None to tell the request handler that no further
142
142
            # path translation is required.
143
 
            adjusted_rcp = None
 
143
            adjusted_rcp = '.'
144
144
            adjusted_relpath = relpath[len(self.root_client_path):]
145
145
        elif self.root_client_path.startswith(relpath):
146
146
            # The relpath traverses some of the mandatory root client path.
162
162
        request_data_length = int(environ['CONTENT_LENGTH'])
163
163
        request_data_bytes = environ['wsgi.input'].read(request_data_length)
164
164
        smart_protocol_request = self.make_request(
165
 
            transport, out_buffer.write, request_data_bytes, adjusted_rcp)
 
165
            transport, out_buffer.write, request_data_bytes,
 
166
            adjusted_rcp)
166
167
        if smart_protocol_request.next_read_size() != 0:
167
168
            # The request appears to be incomplete, or perhaps it's just a
168
169
            # newer version we don't understand.  Regardless, all we can do
169
170
            # is return an error response in the format of our version of the
170
171
            # protocol.
171
 
            response_data = 'error\x01incomplete request\n'
 
172
            response_data = b'error\x01incomplete request\n'
172
173
        else:
173
174
            response_data = out_buffer.getvalue()
174
175
        headers = [('Content-type', 'application/octet-stream')]