Show More
@@ -605,7 +605,18 b' class SimpleVCS(object):' | |||
|
605 | 605 | # case for SVN, we want to re-use the callback daemon port |
|
606 | 606 | # so we use the txn_id, for this we peek the body, and still save |
|
607 | 607 | # it as wsgi.input |
|
608 | data: str = safe_str(environ['wsgi.input'].getvalue()) | |
|
608 | ||
|
609 | stream = environ['wsgi.input'] | |
|
610 | ||
|
611 | if isinstance(stream, io.BytesIO): | |
|
612 | data: str = safe_str(stream.getvalue()) | |
|
613 | elif hasattr(stream, 'buf'): # most likely gunicorn.http.body.Body | |
|
614 | data: str = safe_str(stream.buf.getvalue()) | |
|
615 | else: | |
|
616 | # fallback to the crudest way, copy the iterator | |
|
617 | data = safe_str(stream.read()) | |
|
618 | environ['wsgi.input'] = io.BytesIO(safe_bytes(data)) | |
|
619 | ||
|
609 | 620 | txn_id = extract_svn_txn_id(self.acl_repo_name, data) |
|
610 | 621 | |
|
611 | 622 | callback_daemon, extras = self._prepare_callback_daemon( |
General Comments 0
You need to be logged in to leave comments.
Login now