Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make http.Response.Status respect RFC 2616, like in Go stdlib.
Although RFC 2616 has been superseded with RFC 9110, some client implementation still rely on certain behavious regarding the Status-Line. Now, as httpmock currently implements it, per [RFC 9110#6.2-1](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.2-1), the "reason phrase" is actually optional, and you need only to include the status code. Back in the days of [RFC 2616](https://www.rfc-editor.org/rfc/rfc2616.html#section-6.1), per #6.1, the Status-Line had to contain both the status code (eg. 200) and its textual representation (eg. OK). Change code is directly stolen from the Go standard library. Signed-off-by: Cléo Rebert <[email protected]>
- Loading branch information