10
Views
2
Comments
[Multipart/form-data] Error using "unicode" encoding in a request
Forge component by Kilian Hekhuis
7
Published on 06 Sep 2019
Application Type
Traditional Web

Hi,

Based on your demo, I built an application that creates a multipart/form-data request using the MultipartFormDataCreate action and sends it to an API method that parses the body data. 

Specifying the Encoding property as "utf-8" or "ascii" for both MultipartFormDataCreate (when creating the request) and MultiPartFormDataParse (when parsing it) actions, the component works as expected.

However, when I specify the "unicode" value for the Encoding property (for each action), the following exception is raised:

Could not find expected boundary - at HttpMultipartParser.StreamingMultipartFormDataParser.Parse(RebufferableBinaryReader reader) at HttpMultipartParser.MultipartFormDataParser..ctor(Stream stream, String boundary, Encoding encoding, Int32 binaryBufferSize) at OutSystems.NssMultipartFormDataParser.CssMultipartFormDataParser.MssParse_MultiPartFormData(Byte[] ssMultiPartBinary, String ssBoundary, String ssFileEncoding, RLPartContentRecordList& ssPartContentList, Boolean& ssSuccess, String& ssErrorMessage

It seems that the "unicode" encoding value is not recognized.

Send request action:

Parse action:

Thank you in advance for all your help.

mvp_badge
MVP
Rank: #2

Hi Diogo,

Can you share an OML that exhibits this problem? That would help me pinpoint the problem. Note that I'm not completely sure whether "unicode" would be a valid value in this case, I'd have to investigate.

Rank: #75256

Hi Kilian, 

This module is configured with the "unicode" encoding.

Thanks.

MultipartDemo.oap