Mercurial > hg
comparison tests/tinyproxy.py @ 32916:88c1d13b637b
test-http-proxy: redirect proxy stdout to /dev/null
This output hasn't been getting flushed, but would alter the log if it ever grew
large enough. See 23b07333a8b2.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 19 Jun 2017 21:53:54 -0400 |
parents | 23b07333a8b2 |
children | 97e2442a4595 |
comparison
equal
deleted
inserted
replaced
32915:0afc4206d02b | 32916:88c1d13b637b |
---|---|
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() | 56 # Flush for Windows, so output isn't lost on TerminateProcess() |
57 sys.stdout.flush() | |
57 sys.stderr.flush() | 58 sys.stderr.flush() |
58 | 59 |
59 def _connect_to(self, netloc, soc): | 60 def _connect_to(self, netloc, soc): |
60 i = netloc.find(':') | 61 i = netloc.find(':') |
61 if i >= 0: | 62 if i >= 0: |