equal
deleted
inserted
replaced
45 host_port = netloc, 80 |
45 host_port = netloc, 80 |
46 print "\t" "connect to %s:%d" % host_port |
46 print "\t" "connect to %s:%d" % host_port |
47 try: soc.connect(host_port) |
47 try: soc.connect(host_port) |
48 except socket.error, arg: |
48 except socket.error, arg: |
49 try: msg = arg[1] |
49 try: msg = arg[1] |
50 except: msg = arg |
50 except (IndexError, TypeError): msg = arg |
51 self.send_error(404, msg) |
51 self.send_error(404, msg) |
52 return 0 |
52 return 0 |
53 return 1 |
53 return 1 |
54 |
54 |
55 def do_CONNECT(self): |
55 def do_CONNECT(self): |