X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=python%2Fhtredir;h=1e0349924521d9b06100fabcb23273013a3b46a7;hp=f0e9070872674b806603741f5d00775fc0a69492;hb=d43312387d7f7841101e7a600c2072dd076643aa;hpb=2d32a33cd845c860f1cbdc4ab26d369438ded43f diff --git a/python/htredir b/python/htredir index f0e9070..1e03499 100755 --- a/python/htredir +++ b/python/htredir @@ -53,7 +53,10 @@ else: # Illegal, but the only option (the premises are illegal anyway) pass -sys.stdout.write("HTTP/1.1 %s\n" % status) -sys.stdout.write("Location: %s\n" % target) -sys.stdout.write("Content-Length: 0\n") -sys.stdout.write("\n") +try: + sys.stdout.write("HTTP/1.1 %s\n" % status) + sys.stdout.write("Location: %s\n" % target) + sys.stdout.write("Content-Length: 0\n") + sys.stdout.write("\n") +except IOError: + sys.exit(1)