-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reading nested multipart messages does not work correctly #1526
Comments
@kxepal could you check this |
Hm...it seems like some of our tests lies us since we have covered nested parts case there. Will check it in a moment. |
Currently a multipart message epilogue is left unread which when nested in another multipart message causes a ValueError to be raised because the parent reader expects to find its multipart boundary not the sub-message's epilogue. fixes issue aio-libs#1526
Currently a multipart message epilogue is left unread which when nested in another multipart message causes a ValueError to be raised because the parent reader expects to find its multipart boundary not the sub-message's epilogue. fixes issue aio-libs#1526
@kxepal the tests are hand coded strings and do not include a multipart epilogue. From what I have been seeing around when researching if the epilogue is required it does appear it is, but if you know otherwise please correct me. |
@terencehonles Ah, epilogue. The epilogue must not be used. So it wasn't counted upon. Thought not sure if it's better crash or silently swallow it. |
Long story short
Multipart reader breaks after reading a sub multipart end boundary and starting the next part
Expected behaviour
Nested multipart reader reads a message created with the multipart writer correctly
Actual behaviour
Steps to reproduce
Receive the multipart response from #1525
Server:
Client:
Issue
Lines multipart.py:767 and multipart.py:969 have line endings which result in an empty line after the end boundary of a multipart message (valid). However the reader terminates after the end boundary and the parent reader now expects the next boundary, but what is found is the blank line from multipart.py:767
Possible fix
The text was updated successfully, but these errors were encountered: