mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 18:20:29 +02:00
fcl-web: no need to convert line break
This commit is contained in:
parent
10f13a36ce
commit
f29156340a
@ -852,9 +852,6 @@ begin
|
|||||||
Result:=aLastCount=0;
|
Result:=aLastCount=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFPHTTPConnectionRequest.InitRequestVars;
|
procedure TFPHTTPConnectionRequest.InitRequestVars;
|
||||||
Var
|
Var
|
||||||
P : Integer;
|
P : Integer;
|
||||||
@ -877,8 +874,6 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFPHTTPConnectionResponse.DoSendHeaders(Headers: TStrings);
|
procedure TFPHTTPConnectionResponse.DoSendHeaders(Headers: TStrings);
|
||||||
|
|
||||||
Var
|
Var
|
||||||
@ -889,7 +884,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
S:=Format('HTTP/1.1 %3d %s'#13#10,[Code,GetHTTPStatusText(Code)]);
|
S:=Format('HTTP/1.1 %3d %s'#13#10,[Code,GetHTTPStatusText(Code)]);
|
||||||
For I:=0 to Headers.Count-1 do
|
For I:=0 to Headers.Count-1 do
|
||||||
S:=S+UTF8Encode(Headers[i]+#13#10);
|
S:=S+UTF8Encode(Headers[i])+#13#10;
|
||||||
// Last line in headers is empty.
|
// Last line in headers is empty.
|
||||||
Connection.Socket.WriteBuffer(S[1],Length(S));
|
Connection.Socket.WriteBuffer(S[1],Length(S));
|
||||||
end;
|
end;
|
||||||
@ -900,9 +895,8 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
If Assigned(ContentStream) and (ContentStream.Size>0) then
|
If Assigned(ContentStream) and (ContentStream.Size>0) then
|
||||||
Connection.Socket.CopyFrom(ContentStream,0)
|
Connection.Socket.CopyFrom(ContentStream,0)
|
||||||
else
|
else if Length(Content)>0 then
|
||||||
if Length(Content)>0 then
|
Connection.Socket.WriteBuffer(Content[1],Length(Content));
|
||||||
Connection.Socket.WriteBuffer(Content[1],Length(Content));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFPHTTPConnection }
|
{ TFPHTTPConnection }
|
||||||
|
Loading…
Reference in New Issue
Block a user