diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3206dd26..164235e0 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,7 @@ - fix: missing setup/teardown hooks for referenced testcase - fix: compatibility for `black` on Android termux that does not support multiprocessing well +- fix: mishandling of request header `Content-Length` for GET method **Changed** diff --git a/httprunner/models.py b/httprunner/models.py index 775a7a75..51264c33 100644 --- a/httprunner/models.py +++ b/httprunner/models.py @@ -51,8 +51,8 @@ class TRequest(BaseModel): url: Url params: Dict[Text, Text] = {} headers: Headers = {} - req_json: Union[Dict, List] = Field({}, alias="json") - data: Union[Text, Dict[Text, Any]] = "" + req_json: Union[Dict, List] = Field(None, alias="json") + data: Union[Text, Dict[Text, Any]] = None cookies: Cookies = {} timeout: float = 120 allow_redirects: bool = True