equal
deleted
inserted
replaced
51 def log_request(self, code='-', size='-'): |
51 def log_request(self, code='-', size='-'): |
52 xheaders = [h for h in self.headers.items() if h[0].startswith('x-')] |
52 xheaders = [h for h in self.headers.items() if h[0].startswith('x-')] |
53 self.log_message('"%s" %s %s%s', |
53 self.log_message('"%s" %s %s%s', |
54 self.requestline, str(code), str(size), |
54 self.requestline, str(code), str(size), |
55 ''.join([' %s:%s' % h for h in sorted(xheaders)])) |
55 ''.join([' %s:%s' % h for h in sorted(xheaders)])) |
|
56 # Flush for Windows, so output isn't lost on TerminateProcess() |
|
57 sys.stderr.flush() |
56 |
58 |
57 def _connect_to(self, netloc, soc): |
59 def _connect_to(self, netloc, soc): |
58 i = netloc.find(':') |
60 i = netloc.find(':') |
59 if i >= 0: |
61 if i >= 0: |
60 host_port = netloc[:i], int(netloc[i + 1:]) |
62 host_port = netloc[:i], int(netloc[i + 1:]) |