projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
758a721
)
Make sure the host header is set to www.postgresql.org
author
Magnus Hagander
<magnus@hagander.net>
Tue, 6 Dec 2011 19:10:19 +0000
(20:10 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Tue, 6 Dec 2011 19:10:19 +0000
(20:10 +0100)
tools/ftp/spider_ftp.py
patch
|
blob
|
blame
|
history
diff --git
a/tools/ftp/spider_ftp.py
b/tools/ftp/spider_ftp.py
index 89c1e3bba7a584608cb024513c97c5c1292cb756..a1a1f05630622ecd51161c366926170a71b22a64 100755
(executable)
--- a/
tools/ftp/spider_ftp.py
+++ b/
tools/ftp/spider_ftp.py
@@
-70,6
+70,7
@@
if sys.argv[2].startswith("http://") or sys.argv[2].startswith("https://"):
o = urllib2.build_opener(urllib2.HTTPHandler)
r = urllib2.Request(sys.argv[2], data=pickle.dumps(allnodes))
r.add_header('Content-type', 'application/octet-stream')
+ r.add_header('Host', 'www.postgresql.org')
r.get_method = lambda: 'PUT'
u = o.open(r)
x = u.read()