multipart-parser-c
multipart-parser-c copied to clipboard
the path from s_part_data_almost_boundary to s_part_data_boundary
Hi,
Thanks for the great library.
Not many repositories to parse multipart data even in GitHub.
I am using this repo to parse multipart data from a camera. The camera put the binary image into the multipart packet. There are 3 multipart. The first part is xml file to describe the image information.
The second and third parts are two images.
The code could get the xml part data correctly but not the two images. After I read the code carefully, I think the conditions for state transfer from s_part_data_almost_boundary to s_part_data_boundary are not enough.
for xml file, "boundary" are near the CRLF. But for images, there are no CRLF and "boundary" are put after binary bytes directly.
So we need to add more conditions to let the state transfer from s_part_data to s_part_data_almost_boundary and s_part_data_boundary.