Open
Description
Hello.
I have found that when I use Indy component to send a multipart/form-data request to the dmvcframework server, TMVCWebRequest.ContentParam
function couldn't return the value of the content parameter.
I send a request using the TIdHTTP component, adding a form field as following:
FFormData.AddFormField(AField, AValue, 'utf-8').ContentTransfer := '8bit';
Because I need to support UTF8 symbols in my endpoint.
I logged a request on the server side.
Content type:
multipart/form-data;boundary=--------061924103740983
Request body:
----------061924103740983
Content-Disposition: form-data; name="organization_id"
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
5
----------061924103740983
Content-Disposition: form-data; name="first_name"
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Асқар
----------061924103740983
Content-Disposition: form-data; name="last_name"
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Ахмедов
----------061924103740983
Content-Disposition: form-data; name="job"
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Тестер
----------061924103740983
Content-Disposition: form-data; name="registered_at"
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
2024-06-19 10:37:40
----------061924103740983
When I try to get the content param value, it returns empty string:
var Param := Context.Request.ContentParam('organization_id')
So I think that content param parser not working properly here.