GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Don't warn when CRLF is found after last boundary by Kludex · Pull Request #193 · Kludex/python-multipart Conversation
|
|
cc @defnull |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Django's MultiPartParser and Werkzeug's sansio multipart parser both silently accept (and ignore) the optional CRLF + epilogue that RFC 2046 section 5.1.1 allows after the closing boundary. python-multipart was logging "Skipping data after last boundary" instead, and the single- chunk guard added in #193 also missed the case where the trailing CRLF was split across two writes - a trailing `\r` at the end of one chunk would fall through to the warning branch because `i + 1 < length` was false, even though the `\n` arrived in the next chunk. Drop the warning and the split-chunk guard entirely. The epilogue is short-circuited the same way as before (no O(N) scan), just without the spurious log line. Closes #246.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Incorrectly warnsSkipping data after the last boundary
There was an error while loading. Please reload this page.