From 18a80e52cd871aadcee2359f92ab84373568d2f8 Mon Sep 17 00:00:00 2001 From: Allineer Date: Sun, 29 Mar 2020 20:18:33 +0300 Subject: [PATCH] metrics: broken pipe fix (#210) I think, this fixes my issue #208. --- mtprotoproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 02a18c5..eaeacf6 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -1722,6 +1722,7 @@ def make_metrics_pkt(metrics): pkt_header_list = [] pkt_header_list.append("HTTP/1.1 200 OK") + pkt_header_list.append("Connection: close") pkt_header_list.append("Content-Length: %d" % len(pkt_body)) pkt_header_list.append("Content-Type: text/plain; version=0.0.4; charset=utf-8") pkt_header_list.append("Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()))