mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-28 15:50:26 +08:00
Ensure Content-Length does not appear with Transfer-Encoding
In the HTTPTransport test, verify the requirement of RFC 7230 §3.3.2 that Content-Length not appear if Transfer-Encoding is present. TEST=crashpad_util_test HTTPTransport.* BUG=crashpad:159 Change-Id: I51eafff9659443e1d9bb67d1213c8cecc757ded6 Reviewed-on: https://chromium-review.googlesource.com/439984 Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
parent
cd28471383
commit
1f82c6cc8a
@ -81,6 +81,8 @@ 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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user