mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
The TMVCWebRequest.GetParams method failed to look for a field in the body's content when there was some url encoding character. Fixed to check body content only if content-type is application/x-www-form-urlencoded
This commit is contained in:
parent
6bfa63b85a
commit
f826315b46
@ -1483,7 +1483,9 @@ function TMVCWebRequest.GetParams(const AParamName: string): string;
|
||||
begin
|
||||
if (not Assigned(FParamsTable)) or (not FParamsTable.TryGetValue(AParamName, Result)) then
|
||||
begin
|
||||
Result := FWebRequest.ContentFields.Values[AParamName];
|
||||
Result := '';
|
||||
if FWebRequest.ContentType = TMVCMediaType.APPLICATION_FORM_URLENCODED then
|
||||
Result := FWebRequest.ContentFields.Values[AParamName];
|
||||
if Result.IsEmpty then
|
||||
Result := FWebRequest.QueryFields.Values[AParamName];
|
||||
if Result.IsEmpty then
|
||||
|
Loading…
Reference in New Issue
Block a user