From bcd1bb23f6d56367d0f22c035b85078467a17ca1 Mon Sep 17 00:00:00 2001 From: Anthony Biondo Date: Tue, 16 Apr 2019 21:53:31 -0400 Subject: [PATCH] Fix #3502 by using email.utils.formatdate's usegmt argument. --- mitmproxy/net/http/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/net/http/response.py b/mitmproxy/net/http/response.py index 48527d638..9491fc034 100644 --- a/mitmproxy/net/http/response.py +++ b/mitmproxy/net/http/response.py @@ -186,7 +186,7 @@ class Response(message.Message): d = parsedate_tz(self.headers[i]) if d: new = mktime_tz(d) + delta - self.headers[i] = formatdate(new) + self.headers[i] = formatdate(new, usegmt=True) c = [] for set_cookie_header in self.headers.get_all("set-cookie"): try: