Re-instate previously hardcoded hostname in spiders
authorMagnus Hagander <magnus@hagander.net>
Sat, 26 Jan 2019 15:40:55 +0000 (16:40 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 26 Jan 2019 15:40:55 +0000 (16:40 +0100)
tools/ftp/spider_ftp.py
tools/ftp/spider_yum.py

index 68361299264e8bf4cbdf6a92a9e74987613ce0d9..159c419ddc55f749d290d3f2e9efb60be3443a8e 100755 (executable)
@@ -85,6 +85,7 @@ if sys.argv[2].startswith("http://") or sys.argv[2].startswith("https://"):
         data=pickle.dumps(allnodes),
         headers={
             'Content-type': 'application/octet-stream',
+            'Host': 'www.postgresql.org',
         },
     )
     if r.status_code != 200:
index 912d1d68db0b7ece5114a8c9dd8070f840d2e14b..e969742877a543647d3b551ed858eaccd6b853ad 100755 (executable)
@@ -101,6 +101,7 @@ if __name__ == "__main__":
             data=j,
             headers={
                 'Content-type': 'application/json',
+                'Host': 'www.postgresql.org',
             },
         )
         if r.status_code != 200: