Merge lp:~deej/s3aptmirror/add-host-header into lp:s3aptmirror/trunk

Proposed by David Lawson
Status: Merged
Merged at revision: 95
Proposed branch: lp:~deej/s3aptmirror/add-host-header
Merge into: lp:s3aptmirror/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
metaparser.py (+1/-1)
To merge this branch: bzr merge lp:~deej/s3aptmirror/add-host-header
Reviewer Review Type Date Requested Status
Ben Howard Pending
Review via email: mp+209765@code.launchpad.net

Description of the change

Add a host header to the HTTP request fetching metadata from the archive hosts, bare IPs no longer work.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'metaparser.py'
2--- metaparser.py 2013-06-20 14:31:02 +0000
3+++ metaparser.py 2014-03-06 19:30:27 +0000
4@@ -269,7 +269,7 @@
5
6 try:
7
8- resp = http.request('GET', meta.get_value('remote_url'), preload_content=False)
9+ resp = http.request('GET', meta.get_value('remote_url'), headers={'Host':'archive.ubuntu.com'}, preload_content=False)
10
11 if resp.status == 200:
12 '''only write the file if we get a good status code'''

Subscribers

People subscribed via source and target branches

to all changes: