Skip to content

Commit

Permalink
docs(testing): add a versionadded note, improve impl
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Dec 8, 2024
1 parent 7add3db commit a604eec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion falcon/testing/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,16 @@ def create_scope(
iterable yielding a series of two-member (*name*, *value*)
iterables. Each pair of items provides the name and value
for the 'Set-Cookie' header.
.. versionadded:: 4.1
The raw (i.e., not URL-decoded) version of the provided `path` is now
preserved in the returned scope as the ``raw_path`` byte string.
According to the ASGI specification, ``raw_path`` **does not include**
any query string.
"""

http_version = _fixup_http_version(http_version)
raw_path = path.split('?')[0]
raw_path, _, _ = path.partition('?')
path = uri.decode(path, unquote_plus=False)

# NOTE(kgriffs): Handles both None and ''
Expand Down

0 comments on commit a604eec

Please sign in to comment.