Hi Rob,
My Chrome browser opens with either.
http://hpiers.obspm.fr/iers/bul/bulc/Leap_Second_History.dat
https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second_History.dat
I don't know Python much, but out of curiosity looked up http v.s.
https. Try calling class httplib.HTTPSConnection() instead of class
httplib.HTTPConnection() ?
-Brooks
On 2015-03-26 04:37 PM, Rob Seaman wrote:
I can load this URL in a browser:
http://hpiers.obspm.fr/iers/bul/bulc/Leap_Second_History.dat
But PHK's python code (which worked a couple of month's ago):
def fetch_url(url):
global conn
print("Fetch", url)
if conn == None:
conn = httplib.HTTPConnection("hpiers.obspm.fr <http://hpiers.obspm.fr>")
conn.request("GET", url)
r1 = conn.getresponse()
if r1.status != 200:
print (r1.status, r1.reason)
exit(2)
now throws an status:
302 Found
Which is a URL redirection (nominally "moved temporarily", which I saw
yesterday evening in some browser or other). Not obvious if a failure
to handle a redirection is the same as an error, but it seems possible
that this is either a symptom of something else, or if actually a new
layer of indirection in getting to this file will catch some other
application.
Either way this may add more weight to the notion of using DNS instead
of HTTP to fetch leap second info.
Haven't looked very far under the hood yet, so could certainly be
something else entirely.
Rob
_______________________________________________
LEAPSECS mailing list
[email protected]
https://pairlist6.pair.net/mailman/listinfo/leapsecs
_______________________________________________
LEAPSECS mailing list
[email protected]
https://pairlist6.pair.net/mailman/listinfo/leapsecs