Skip to content

Commit 5b5417a

Browse files
Consume trailing CRLF at end of stream
1 parent b6d45b2 commit 5b5417a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

multipart/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.0.4'
1+
__version__ = '0.0.5'

multipart/multipart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,8 +1436,8 @@ def data_callback(name, remaining=False):
14361436

14371437
elif state == STATE_END:
14381438
# Do nothing and just consume a byte in the end state.
1439-
self.logger.warning("Consuming a byte '%x' in the end state", c)
1440-
pass
1439+
if c not in (CR, LF):
1440+
self.logger.warning("Consuming a byte '0x%x' in the end state", c)
14411441

14421442
else: # pragma: no cover (error case)
14431443
# We got into a strange state somehow! Just stop processing.

0 commit comments

Comments
 (0)