<div dir="ltr"><div>Hi Brad and Lei,</div><div><br></div><div>Are there any concerns about having libmimetic for multi-part parsing. Please have a look at the below mail.</div><div><br></div><div>If there are any other suggestions, please post in here.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 17, 2020 at 4:11 PM Asmitha Karunanithi <<a href="mailto:asmithakarun@gmail.com" target="_blank">asmithakarun@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>There was a requirement to parse multipart form data during file upload for the vendor-specific interface.<br></div><div><br></div><div>The Curl command for multiple file upload will be:</div><div><br></div><div>"curl -c cjar -b cjar -k -H "Content-Type: multipart/form-data" -H "X-Auth-Token: $bmc_token" -F 'sa1=@/path/to/file1' -F sa2=@/path/to/file2' -X POST https://$bmc/ibm/v1/files/partitions/"</div><div><br></div><div>The above multipart request contains the file contents separated by a boundary and each file contains the filename, Content-Type and Content-Disposition.</div><div><br>There were few considerations for this and after testing those libraries, the mimetic library seemed to fit for this purpose. Please refer to <a href="https://github.com/LadislavSopko/mimetic" target="_blank">https://github.com/LadislavSopko/mimetic</a><br><br>Only a part of code from this library is used for this purpose (which is under "mimetic" folder in this repo).<br><br>Regression tests were conducted with that part of the library that is being used for multi-part parsing, as a part of which there was no memory leakage found after firing a large number of requests (2000 requests in this case).</div><div><br></div><div>There was a difference of 71.68 KB in the openbmc flash size when this library is pulled. The mimetic shared object files are used from mimetic/codec/.libs.<br></div><div><br>If there are other suggestions for the multi-part form data parsing or if there are suggestions for any other test that needs to be done, please post in the suggestions.<br><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Thanks & Regards,<div>Asmitha Karunanithi</div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Thanks & Regards,<div>Asmitha Karunanithi</div></div></div></div></div></div>