-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
MultipartReader does not support multipart data with a preamble #880
Copy link
Copy link
Closed
Labels
Description
Long story short
I'm using the MultipartReader to read multi-part data from a 3rd party API. It's response has an extra CRLF pair before the first boundary marker.
It appears from reading the RFC that it's valid to include a preamble before the first boundary, and it should just be ignored
I'm passing a response from this server through aiohttp.MultipartReader.from_response and then calling .next()
Expected behaviour
aiohttp ignores the preamble and returns the first part.
Actual behaviour
I get the exception:
ValueError: Invalid boundary b'', expected b'------=_Part_125656_1263945784.1463662001461'
Steps to reproduce
I've added a failing unit test here: obmarg@8724035
Your environment
Not sure any of it's relevant, but: MacOS, python 3.5.1, aiohttp 0.19.0 (though reproduced with master).
Reactions are currently unavailable