Browse Source

* Fixes in PChar -> PansiChar

Michael VAN CANNEYT 2 years ago
parent
commit
e323c50e36
1 changed files with 4 additions and 5 deletions
  1. 4 5
      packages/fcl-web/src/base/fphttpserver.pp

+ 4 - 5
packages/fcl-web/src/base/fphttpserver.pp

@@ -1078,10 +1078,10 @@ procedure TFPHTTPConnection.ReadRequestContent(
 
 
 Var
 Var
   P,L,R : integer;
   P,L,R : integer;
-  S : String;
+  S : TBytes;
 
 
 begin
 begin
-  S:='';
+  S:=[];
   L:=ARequest.ContentLength;
   L:=ARequest.ContentLength;
   If (L>0) then
   If (L>0) then
     begin
     begin
@@ -1091,11 +1091,10 @@ begin
       begin
       begin
       if P>L then
       if P>L then
         P:=L;
         P:=L;
-      Move(FBuffer[1],S[1],P);
+      Move(FBuffer[1],S[0],P);
       FBuffer:='';
       FBuffer:='';
       L:=L-P;
       L:=L-P;
       end;
       end;
-    P:=P+1;
     R:=1;
     R:=1;
     While (L>0) and (R>0) do
     While (L>0) and (R>0) do
       begin
       begin
@@ -1109,7 +1108,7 @@ begin
         end;
         end;
       end;  
       end;  
     end;
     end;
-  ARequest.InitContent(S);
+  ARequest.ContentBytes:=S;
 end;
 end;
 
 
 function TFPHTTPConnection.ReadRequestHeaders: TFPHTTPConnectionRequest;
 function TFPHTTPConnection.ReadRequestHeaders: TFPHTTPConnectionRequest;