Skip to content

Commit

Permalink
chore: clean up new NOTEs in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Oct 10, 2024
1 parent 8752ba5 commit b8c3beb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions falcon/asgi/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ async def _iterate_parts(self) -> AsyncIterator[BodyPart]:

# NOTE(vytas): Interpretations of RFC 2046, Appendix A, vary
# as to whether the closing `--` must be followed by CRLF.
# While, the absolute majority of HTTP clients and browsers
# While the absolute majority of HTTP clients and browsers
# do append it as a common convention, it seems that this is
# not mandated by the RFC, so we do not require it either.
# NOTE(vytas): Certain versions of the Undici client
# (Node's fetch implementation) do not follow the convention.
if await stream.peek(2) == b'--':
# NOTE(vytas): boundary delimiter + '--' signals the
# end of a multipart form.
# NOTE(vytas): boundary delimiter + '--' signals the end of
# a multipart form.
await stream.read(2)
break

Expand Down
6 changes: 3 additions & 3 deletions falcon/media/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ def __iter__(self) -> Iterator[BodyPart]:

# NOTE(vytas): Interpretations of RFC 2046, Appendix A, vary
# as to whether the closing `--` must be followed by CRLF.
# While, the absolute majority of HTTP clients and browsers
# While the absolute majority of HTTP clients and browsers
# do append it as a common convention, it seems that this is
# not mandated by the RFC, so we do not require it either.
# NOTE(vytas): Certain versions of the Undici client
# (Node's fetch implementation) do not follow the convention.
if stream.peek(2) == b'--':
# NOTE(vytas): boundary delimiter + '--' signals the
# end of a multipart form.
# NOTE(vytas): boundary delimiter + '--' signals the end of
# a multipart form.
stream.read(2)
break

Expand Down

0 comments on commit b8c3beb

Please sign in to comment.