mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +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: ensure converted python file in utf-8 encoding
|
||||||
- fix: duplicate running referenced testcase
|
- fix: duplicate running referenced testcase
|
||||||
- fix: ensure compatibility issues between testcase format v2 and v3
|
- fix: ensure compatibility issues between testcase format v2 and v3
|
||||||
|
- fix: UnicodeDecodeError when request body in protobuf
|
||||||
|
|
||||||
## 3.0.5 (2020-05-22)
|
## 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
|
request_body = resp_obj.request.body
|
||||||
try:
|
try:
|
||||||
request_body = json.loads(request_body)
|
request_body = json.loads(request_body)
|
||||||
except json.JSONDecodeError:
|
except (json.JSONDecodeError, UnicodeDecodeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if request_body:
|
if request_body:
|
||||||
|
|||||||
Reference in New Issue
Block a user