Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions falcon/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HTTPMovedPermanently(HTTPStatus):
behavior is undesired, the 308 (Permanent Redirect) status code
can be used instead.

(See also: RFC 7231, Section 6.4.2)
(See also: :rfc:`9110`, Section 6.4.2)

Args:
location (str): URI to provide as the Location header in the
Expand Down Expand Up @@ -65,7 +65,7 @@ class HTTPFound(HTTPStatus):
behavior is undesired, the 307 (Temporary Redirect) status code
can be used instead.

(See also: RFC 7231, Section 6.4.3)
(See also: :rfc:`9110`, Section 6.4.3)

Args:
location (str): URI to provide as the Location header in the
Expand Down Expand Up @@ -99,7 +99,7 @@ class HTTPSeeOther(HTTPStatus):
The new URI in the Location header field is not considered
equivalent to the effective request URI.

(See also: RFC 7231, Section 6.4.4)
(See also: :rfc:`9110`, Section 6.4.4)

Args:
location (str): URI to provide as the Location header in the
Expand Down
12 changes: 6 additions & 6 deletions falcon/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def if_match(self) -> list[ETag | Literal['*']] | None:
header, both strong and weak, in the same order as listed in
the header.

(See also: RFC 7232, Section 3.1)
(See also: :rfc:`9110`, Section 8.8.4)
""" # noqa: D205
# TODO(kgriffs): It may make sense at some point to create a
# header property generator that DRY's up the memoization
Expand All @@ -517,7 +517,7 @@ def if_none_match(self) -> list[ETag | Literal['*']] | None:
header, both strong and weak, in the same order as listed in
the header.

(See also: RFC 7232, Section 3.2)
(See also: :rfc:`9110`, Section 8.8.5)
""" # noqa: D205
if self._cached_if_none_match is _UNSET:
header_value = self.env.get('HTTP_IF_NONE_MATCH')
Expand Down Expand Up @@ -604,9 +604,9 @@ def range(self) -> tuple[int, int] | None:
return first_num, last_num

except ValueError:
href = 'https://tools.ietf.org/html/rfc7233'
href = 'https://tools.ietf.org/html/rfc9110'
href_text = 'HTTP/1.1 Range Requests'
msg = 'It must be a range formatted according to RFC 7233.'
msg = 'It must be a range formatted according to RFC 9110.'
raise errors.HTTPInvalidHeader(msg, 'Range', href=href, href_text=href_text)

@property
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def get_header_as_datetime(
``HTTPBadRequest`` instead of returning gracefully when the
header is not found (default ``False``).
obs_date (bool): Support obs-date formats according to
RFC 7231, e.g.: "Sunday, 06-Nov-94 08:49:37 GMT"
RFC 9110, e.g.: "Sunday, 06-Nov-94 08:49:37 GMT"
(default ``False``).

Returns:
Expand All @@ -1363,7 +1363,7 @@ def get_header_as_datetime(
else:
return None
except ValueError:
msg = 'It must be formatted according to RFC 7231, Section 7.1.1.1'
msg = 'It must be formatted according to RFC 9110, Section 5.6.7'
raise errors.HTTPInvalidHeader(msg, header)

def get_cookie_values(self, name: str) -> list[str] | None:
Expand Down
8 changes: 4 additions & 4 deletions falcon/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def add_link(self) -> NoReturn:
case, raising ``falcon.HTTPRangeNotSatisfiable`` will do the right
thing.

(See also: RFC 7233, Section 4.2)
(See also: :rfc:`9110`, Section 14.4)
""",
_format_range,
)
Expand All @@ -1114,7 +1114,7 @@ def add_link(self) -> NoReturn:
case, raising ``falcon.HTTPRangeNotSatisfiable`` will do the right
thing.

(See also: RFC 7233, Section 4.2)
(See also: :rfc:`9110`, Section 14.4)
"""

content_type: str | None = _header_property(
Expand Down Expand Up @@ -1290,7 +1290,7 @@ def add_link(self) -> NoReturn:
value consists of either a single asterisk ("*") or a list of
header field names (case-insensitive).

(See also: RFC 7231, Section 7.1.4)
(See also: :rfc:`9110`, Section 7.1.4)
""",
_format_header_value_list,
)
Expand All @@ -1307,7 +1307,7 @@ def add_link(self) -> NoReturn:
value consists of either a single asterisk ("*") or a list of
header field names (case-insensitive).

(See also: RFC 7231, Section 7.1.4)
(See also: :rfc:`9110`, Section 7.1.4)
"""

accept_ranges: str | None = _header_property(
Expand Down
18 changes: 9 additions & 9 deletions falcon/testing/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def simulate_request(
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -813,7 +813,7 @@ async def _simulate_request_asgi(
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1355,7 +1355,7 @@ def simulate_get(app: Callable[..., Any], path: str, **kwargs: Any) -> Result:
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1458,7 +1458,7 @@ def simulate_head(app: Callable[..., Any], path: str, **kwargs: Any) -> Result:
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1556,7 +1556,7 @@ def simulate_post(app: Callable[..., Any], path: str, **kwargs: Any) -> Result:
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1667,7 +1667,7 @@ def simulate_put(app: Callable[..., Any], path: str, **kwargs: Any) -> Result:
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1773,7 +1773,7 @@ def simulate_options(app: Callable[..., Any], path: str, **kwargs: Any) -> Resul
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1867,7 +1867,7 @@ def simulate_patch(app: Callable[..., Any], path: str, **kwargs: Any) -> Result:
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down Expand Up @@ -1973,7 +1973,7 @@ def simulate_delete(app: Callable[..., Any], path: str, **kwargs: Any) -> Result
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down
6 changes: 3 additions & 3 deletions falcon/testing/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ def create_scope(
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). When the
format (see also :rfc:`9112` and :rfc:`9110`). When the
request will include a body, the Content-Length header should be
included in this list. Header names are not case-sensitive.

Expand Down Expand Up @@ -1069,7 +1069,7 @@ def create_scope_ws(
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). When the
format (see also :rfc:`9112` and :rfc:`9110`). When the
request will include a body, the Content-Length header should be
included in this list. Header names are not case-sensitive.

Expand Down Expand Up @@ -1166,7 +1166,7 @@ def create_environ(
for an HTTP header. If desired, multiple header values may be
combined into a single (*name*, *value*) pair by joining the values
with a comma when the header in question supports the list
format (see also RFC 7230 and RFC 7231). Header names are not
format (see also :rfc:`9112` and :rfc:`9110`). Header names are not
case-sensitive.

Note:
Expand Down
2 changes: 1 addition & 1 deletion falcon/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def http_date_to_dt(http_date: str, obs_date: bool = False) -> datetime.datetime

Keyword Arguments:
obs_date (bool): Support obs-date formats according to
RFC 7231, e.g.:
RFC 9110, e.g.:
"Sunday, 06-Nov-94 08:49:37 GMT" (default ``False``).

Returns:
Expand Down
12 changes: 6 additions & 6 deletions falcon/util/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class ETag(str):

This class is simply a subclass of ``str`` with a few helper methods and
an extra attribute to indicate whether the entity-tag is weak or strong. The
value of the string is equivalent to what RFC 7232 calls an "opaque-tag",
value of the string is equivalent to what RFC 9110 calls an "opaque-tag",
i.e. an entity-tag sans quotes and the weakness indicator.

Note:
Expand All @@ -261,7 +261,7 @@ def on_get(self, req, resp):
resp.etag = content_etag
resp.status = falcon.HTTP_200

(See also: RFC 7232)
(See also: :rfc:`9110`)
"""

is_weak: bool = False
Expand All @@ -273,7 +273,7 @@ def strong_compare(self, other: ETag) -> bool:
Two entity-tags are equivalent if both are not weak and their
opaque-tags match character-by-character.

(See also: RFC 7232, Section 2.3.2)
(See also: :rfc:`9110`, Section 8.8.3.2)

Arguments:
other (ETag): The other :class:`~.ETag` to which you are comparing
Expand All @@ -289,7 +289,7 @@ def strong_compare(self, other: ETag) -> bool:
def dumps(self) -> str:
"""Serialize the ETag to a string suitable for use in a precondition header.

(See also: RFC 7232, Section 2.3)
(See also: :rfc:`9110`, Section 8.8.3)

Returns:
str: An opaque quoted string, possibly prefixed by a weakness
Expand All @@ -313,11 +313,11 @@ def loads(cls, etag_str: str) -> ETag:
entity-tag. It can not be used to parse a comma-separated list of
values.

(See also: RFC 7232, Section 2.3)
(See also: :rfc:`9110`, Section 8.8.3)

Arguments:
etag_str (str): An ASCII string representing a single entity-tag,
as defined by RFC 7232.
as defined by RFC 9110.

Returns:
ETag: An instance of `~.ETag` representing the parsed entity-tag.
Expand Down