libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Parsing multipart/formdata


From: Markus Doppelbauer
Subject: [libmicrohttpd] Parsing multipart/formdata
Date: Tue, 21 Apr 2020 16:17:34 +0200
User-agent: Evolution 3.30.5-1.1

Hello,

Is there a reliable way to detect 'continution' in 'MHD_PostDataIterator()'?
To detect the beginning of a new variable I have tested: 'off == 0'.
But this is not reliable. It is a rare case but sometimes the iterator stops right
before the first content-byte (if helpful I will provide a testcase):

first call:
MHD_PostDataIterator( cls, kind=MHD_POSTDATA_KIND, key="upload-name",
filename="video.mp4", content_type="video/mp4", transfer_encoding=nullptr,
data="" off=0, size=0 );

second call:
MHD_PostDataIterator( cls, kind=MHD_POSTDATA_KIND, key="upload-name",
filename="video.mp4", content_type="video/mp4", transfer_encoding=nullptr,
data="" off=0, size=64724 );

Pointer comparision of 'key', 'filename' and 'content_type' works - but is also not 100% reliable.
'malloc()' could provide the same address.

Thanks a lot
Markus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]