launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25714
[Merge] ~pappacena/turnip:py3-http-detect-git-request into turnip:master
Thiago F. Pappacena has proposed merging ~pappacena/turnip:py3-http-detect-git-request into turnip:master.
Commit message:
Detecting git HTTP requests - py3 compatibility
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/394364
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:py3-http-detect-git-request into turnip:master.
diff --git a/turnip/pack/http.py b/turnip/pack/http.py
index a441ddc..582c39c 100644
--- a/turnip/pack/http.py
+++ b/turnip/pack/http.py
@@ -762,8 +762,8 @@ class SmartHTTPFrontendResource(resource.Resource):
@staticmethod
def _isGitRequest(request):
if request.path.endswith(b'/info/refs'):
- service = request.args.get('service', [])
- if service and service[0].startswith('git-'):
+ service = request.args.get(b'service', [])
+ if service and service[0].startswith(b'git-'):
return True
content_type = request.getHeader(b'Content-Type')
if content_type is None:
diff --git a/turnip/pack/tests/test_functional.py b/turnip/pack/tests/test_functional.py
index c044968..eb52f62 100644
--- a/turnip/pack/tests/test_functional.py
+++ b/turnip/pack/tests/test_functional.py
@@ -805,7 +805,7 @@ class TestSmartHTTPFrontendFunctional(FrontendFunctionalTestMixin, TestCase):
b'HEAD', b'http://localhost:%d/' % self.port)
self.assertEqual(302, response.code)
self.assertEqual(
- [version_info['revision_id']],
+ [six.ensure_binary(version_info['revision_id'])],
response.headers.getRawHeaders(b'X-Turnip-Revision'))
def make_set_symbolic_ref_request(self, line):