Merge lp:~jelmer/brz/revert-http-redirect into lp:brz

Proposed by Jelmer Vernooij on 2018-10-14
Status: Merged
Approved by: Jelmer Vernooij on 2018-10-14
Approved revision: 7141
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/revert-http-redirect
Merge into: lp:brz
Diff against target: 23 lines (+4/-2)
1 file modified
breezy/git/remote.py (+4/-2)
To merge this branch: bzr merge lp:~jelmer/brz/revert-http-redirect
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve on 2018-10-14
Review via email: mp+356684@code.launchpad.net

Description of the change

Rollback https://code.launchpad.net/~jelmer/brz/python3-git-fix-http/+merge/356238

This breaks HTTP access for Git with currently released versions of Git.
Clearly this code needs better tests; I'll propose this branch again with tests.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/git/remote.py'
--- breezy/git/remote.py 2018-10-13 19:53:32 +0000
+++ breezy/git/remote.py 2018-10-14 12:58:20 +0000
@@ -636,8 +636,9 @@
636 :param data: Request data.636 :param data: Request data.
637 :param allow_compression: Allow GZipped communication.637 :param allow_compression: Allow GZipped communication.
638 :return: Tuple (`response`, `read`), where response is an `urllib3`638 :return: Tuple (`response`, `read`), where response is an `urllib3`
639 response object with additional `content_type` property,639 response object with additional `content_type` and
640 and `read` is a consumable read method for the response data.640 `redirect_location` properties, and `read` is a consumable read
641 method for the response data.
641 """642 """
642 from breezy.transport.http._urllib2_wrappers import Request643 from breezy.transport.http._urllib2_wrappers import Request
643 headers['User-agent'] = user_agent_for_github()644 headers['User-agent'] = user_agent_for_github()
@@ -677,6 +678,7 @@
677 self._response = response678 self._response = response
678 self.status = response.code679 self.status = response.code
679 self.content_type = response.getheader("Content-Type")680 self.content_type = response.getheader("Content-Type")
681 self.redirect_location = response.geturl()
680682
681 def close(self):683 def close(self):
682 self._response.close()684 self._response.close()

Subscribers

People subscribed via source and target branches