mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +01:00
Merge pull request #73 from ezequieljuliano/master
Problem solving with memory leak when reading request body.
This commit is contained in:
commit
2830fef1b7
@ -1646,6 +1646,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if (FBody = '') then
|
if (FBody = '') then
|
||||||
begin
|
begin
|
||||||
|
Encoding := nil;
|
||||||
{$IFDEF BERLINORBETTER}
|
{$IFDEF BERLINORBETTER}
|
||||||
if (FCharset = '') then
|
if (FCharset = '') then
|
||||||
begin
|
begin
|
||||||
@ -1675,6 +1676,8 @@ begin
|
|||||||
Encoding := TEncoding.GetEncoding(FCharset);
|
Encoding := TEncoding.GetEncoding(FCharset);
|
||||||
FBody := Encoding.GetString(Buffer);
|
FBody := Encoding.GetString(Buffer);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
if Assigned(Encoding) then
|
||||||
|
Encoding.Free;
|
||||||
end;
|
end;
|
||||||
Result := FBody;
|
Result := FBody;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user