mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
This commit is contained in:
parent
fb2ed8fd9f
commit
1ab21574be
@ -1142,15 +1142,18 @@ var
|
|||||||
c: String;
|
c: String;
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
c := AWebRequest.GetFieldByName('content-type');
|
c := AWebRequest.GetFieldByName('Content-Type');
|
||||||
CT := c.Split([';']);
|
if not c.IsEmpty then
|
||||||
FContentType := trim(CT[0]);
|
|
||||||
FContentEncoding := 'UTF-8'; // default encoding
|
|
||||||
if Length(CT) > 1 then
|
|
||||||
begin
|
begin
|
||||||
if CT[1].trim.StartsWith('charset', true) then
|
CT := c.Split([';']);
|
||||||
|
FContentType := trim(CT[0]);
|
||||||
|
FContentEncoding := 'UTF-8'; // default encoding
|
||||||
|
if Length(CT) > 1 then
|
||||||
begin
|
begin
|
||||||
FContentEncoding := CT[1].trim.Split(['='])[1].trim;
|
if CT[1].trim.StartsWith('charset', true) then
|
||||||
|
begin
|
||||||
|
FContentEncoding := CT[1].trim.Split(['='])[1].trim;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user