Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: third_party/crashpad/crashpad/util/net/http_transport_test_server.py

Issue 2705373005: Revert of Update Crashpad to 6da9708e7cc93e2e1772439d51646e47583cb225 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/net/http_transport_test_server.py
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_test_server.py b/third_party/crashpad/crashpad/util/net/http_transport_test_server.py
index 7ea15719e8fa8d37e450890e1da811fa91b3671f..3d3c55a43da3bc415e6bc99c4d0f29085308bb91 100755
--- a/third_party/crashpad/crashpad/util/net/http_transport_test_server.py
+++ b/third_party/crashpad/crashpad/util/net/http_transport_test_server.py
@@ -33,7 +33,6 @@ This could easily have been written in C++ instead.
import BaseHTTPServer
import struct
import sys
-import zlib
class BufferedReadFile(object):
"""A File-like object that stores all read contents into a buffer."""
@@ -82,20 +81,11 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.rfile.buffer = ''
if self.headers.get('Transfer-Encoding', '').lower() == 'chunked':
- if 'Content-Length' in self.headers:
- raise AssertionError
body = self.handle_chunked_encoding()
else:
length = int(self.headers.get('Content-Length', -1))
body = self.rfile.read(length)
- if self.headers.get('Content-Encoding', '').lower() == 'gzip':
- # 15 is the value of |wbits|, which should be at the maximum possible
- # value to ensure that any gzip stream can be decoded. The offset of 16
- # specifies that the stream to decompress will be formatted with a gzip
- # wrapper.
- body = zlib.decompress(body, 16 + 15)
-
RequestHandler.raw_request += body
self.send_response(self.response_code)

Powered by Google App Engine
This is Rietveld 408576698