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

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
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
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.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/remote.py'
2--- breezy/git/remote.py 2018-10-13 19:53:32 +0000
3+++ breezy/git/remote.py 2018-10-14 12:58:20 +0000
4@@ -636,8 +636,9 @@
5 :param data: Request data.
6 :param allow_compression: Allow GZipped communication.
7 :return: Tuple (`response`, `read`), where response is an `urllib3`
8- response object with additional `content_type` property,
9- and `read` is a consumable read method for the response data.
10+ response object with additional `content_type` and
11+ `redirect_location` properties, and `read` is a consumable read
12+ method for the response data.
13 """
14 from breezy.transport.http._urllib2_wrappers import Request
15 headers['User-agent'] = user_agent_for_github()
16@@ -677,6 +678,7 @@
17 self._response = response
18 self.status = response.code
19 self.content_type = response.getheader("Content-Type")
20+ self.redirect_location = response.geturl()
21
22 def close(self):
23 self._response.close()

Subscribers

People subscribed via source and target branches