psf / requests

A simple, yet elegant, HTTP library.
https://requests.readthedocs.io/en/latest/
Apache License 2.0
52.2k stars 9.34k forks source link

Add rfc9110 HTTP status code names #6680

Closed mbeijen closed 7 months ago

mbeijen commented 7 months ago

RFC 9110 HTTP Semantics obsoletes some earlier RFCs which defined HTTP 1.1. It adds some status codes that were previously only used for WebDAV to HTTP proper after making the names somewhat more generic.

See https://www.rfc-editor.org/rfc/rfc9110.html#name-changes-from-rfc-7231

This commit adds the http status code names from that RFC.

RFC 9110 has been accepted as Internet Standard in June 2022.

In https://github.com/psf/requests/blob/main/docs/user/advanced.rst#compliance it states:

Requests is intended to be compliant with all relevant specifications and RFCs where that compliance will not cause difficulties for users.

So it seems only logical that the status code descriptions found in that RFC are also available in Requests