mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 04:19:28 +08:00
fix: UnicodeDecodeError when request body in protobuf
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
- fix: ensure converted python file in utf-8 encoding
|
||||
- fix: duplicate running referenced testcase
|
||||
- fix: ensure compatibility issues between testcase format v2 and v3
|
||||
- fix: UnicodeDecodeError when request body in protobuf
|
||||
|
||||
## 3.0.5 (2020-05-22)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def get_req_resp_record(resp_obj: Response) -> ReqRespData:
|
||||
request_body = resp_obj.request.body
|
||||
try:
|
||||
request_body = json.loads(request_body)
|
||||
except json.JSONDecodeError:
|
||||
except (json.JSONDecodeError, UnicodeDecodeError):
|
||||
pass
|
||||
|
||||
if request_body:
|
||||
|
||||
Reference in New Issue
Block a user