Big Error!!! private GetCGIVar lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- edgarrod71 · 2016-02-20 04:07 there is a "not so good" implementation on this, so I hope they can fix it... I discovered, because I tried to use the TStrings, and no results... function TCGIRequest.GetCGIVar(Index: integer): String; Var R : String; begin Case Index of { 1 : R:=GetEnvironmentVariable(CGIVarNames[4]); // Property GatewayInterface : String Index 1 Read GetCGIVar; 2 : R:=GetEnvironmentVariable(CGIVarNames[10]); // Property RemoteIdent : String Index 2 read GetCGIVar; 3 : R:=GetEnvironmentVariable(CGIVarNames[11]); // Property RemoteUser : String Index 3 read GetCGIVar; 4 : R:=GetEnvironmentVariable(CGIVarNames[12]); // Property RequestMethod : String Index 4 read GetCGIVar; // 5 : R:=GetEnvironmentVariable(CGIVarNames[14]); // Property ServerName : String Index 5 read GetCGIVar; 6 : R:=GetEnvironmentVariable(CGIVarNames[16]); // Property ServerProtocol : String Index 6 read GetCGIVar; 7 : R:=GetEnvironmentVariable(CGIVarNames[17]); // Property ServerSoftware : String Index 7 read GetCGIVar; } 1 : R:=GetEnvironmentVariable('GATEWAY_INTERFACE'); // Property GatewayInterface : String Index 1 Read GetCGIVar; 2 : R:=GetEnvironmentVariable('REMOTE_IDENT'); // Property RemoteIdent : String Index 2 read GetCGIVar; 3 : R:=GetEnvironmentVariable('REMOTE_USER'); // Property RemoteUser : String Index 3 read GetCGIVar; 4 : R:=GetEnvironmentVariable('REQUEST_METHOD'); // Property RequestMethod : String Index 4 read GetCGIVar; 5 : R:=GetEnvironmentVariable('SERVER_NAME'); // Property ServerName : String Index 5 read GetCGIVar; 6 : R:=GetEnvironmentVariable('SERVER_PROTOCOL'); // Property ServerProtocol : String Index 6 read GetCGIVar; 7 : R:=GetEnvironmentVariable('SERVER_SOFTWARE'); // Property ServerSoftware : String Index 7 read GetCGIVar; end; Result:=HTTPDecode(R); end; ---------------------------------------------------------------------- balazsszekely · 2016-02-20 06:05 What is the actual error? Please be more specific! ---------------------------------------------------------------------- edgarrod71 · 2016-02-20 06:25 it didn't show the Variables put in the CGIVarNames type, now this implementation shows the info. Simply, create a new CGI and put this code, and you'll see, the first list, there are only 37 implementations and no info showed, and the lower list has the real environmental variables and shows all correct... Procedure TMyCGIHandler.HandleRequest(ARequest : Trequest; AResponse : TResponse); var lista: TStringList; i: Integer; begin AResponse.Contents.Add('