|
@@ -12,6 +12,9 @@ uses
|
|
{$ifdef linux}
|
|
{$ifdef linux}
|
|
,linux
|
|
,linux
|
|
{$endif}
|
|
{$endif}
|
|
|
|
+{$IFDEF OS2}
|
|
|
|
+ , DosCalls
|
|
|
|
+{$ENDIF OS2}
|
|
;
|
|
;
|
|
|
|
|
|
{***********************************************************************}
|
|
{***********************************************************************}
|
|
@@ -90,6 +93,20 @@ procedure cgi_deinit;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
|
|
+{$IFDEF OS2}
|
|
|
|
+function GetEnv (EnvVar: string): PChar;
|
|
|
|
+
|
|
|
|
+var RC: longint;
|
|
|
|
+ P, Q: PChar;
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ GetMem (Q, Succ (Length (EnvVar)));
|
|
|
|
+ RC := DosScanEnv (Q, P);
|
|
|
|
+ FreeMem (Q, Succ (Length (EnvVar)));
|
|
|
|
+ GetEnv := P;
|
|
|
|
+end;
|
|
|
|
+{$ENDIF OS2}
|
|
|
|
+
|
|
{$ifdef win32}
|
|
{$ifdef win32}
|
|
Var EnvP : PChar;
|
|
Var EnvP : PChar;
|
|
EnvLen : Longint;
|
|
EnvLen : Longint;
|
|
@@ -413,7 +430,81 @@ end.
|
|
{
|
|
{
|
|
HISTORY
|
|
HISTORY
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.2 2000-07-13 11:33:32 michael
|
|
|
|
- + removed logs
|
|
|
|
-
|
|
|
|
|
|
+ Revision 1.1.2.1 2000-12-19 00:48:07 hajny
|
|
|
|
+ + OS/2 support added
|
|
|
|
+
|
|
|
|
+ Revision 1.1 2000/07/13 06:34:23 michael
|
|
|
|
+ + Initial import
|
|
|
|
+
|
|
|
|
+ Revision 1.6 2000/01/10 23:46:19 peter
|
|
|
|
+ * works also under go32v2
|
|
|
|
+
|
|
|
|
+ Revision 1.5 1999/11/14 15:59:06 peter
|
|
|
|
+ * fpcmake'd
|
|
|
|
+
|
|
|
|
+ Revision 1.4 1999/07/26 20:07:44 michael
|
|
|
|
+ + Fix for empty values by Andre Steinert
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ - 1.0.0 03/07/97
|
|
|
|
+ ----------------
|
|
|
|
+ Only GET method implemented
|
|
|
|
+
|
|
|
|
+ - 1.0.1 05/07/97
|
|
|
|
+ ----------------
|
|
|
|
+ + Extra procedures for getting extra information:
|
|
|
|
+ * referrer
|
|
|
|
+ * user agent
|
|
|
|
+ * request method
|
|
|
|
+ + Crude POST reading
|
|
|
|
+
|
|
|
|
+ - 1.1.0 14/07/97
|
|
|
|
+ ----------------
|
|
|
|
+ + Bugfix in POST reading, still doesn't work right.
|
|
|
|
+
|
|
|
|
+ - 2.0.0 02/08/97
|
|
|
|
+ ----------------
|
|
|
|
+ Started from scratch, POST reading still limited to
|
|
|
|
+ 255 characters max. for value
|
|
|
|
+
|
|
|
|
+ - 2.0.1 04/08/97
|
|
|
|
+ ---------------
|
|
|
|
+ Conversion from strings to pchar done by
|
|
|
|
+ Michael van Canneyt. (Routines "UnEscape" and "Chop")
|
|
|
|
+ Small changes made to convert everything to pchar usage.
|
|
|
|
+
|
|
|
|
+ - 2.0.2 22/04/98
|
|
|
|
+ ---------------
|
|
|
|
+ tested with Apache HTTP Server and bugfix in pchar conversion,
|
|
|
|
+ PChar(Longint(PChar)+x)) syntax modified to PChar[x]
|
|
|
|
+ by Laszlo Nemeth.
|
|
|
|
+
|
|
|
|
+ - 2.0.3 05/06/98
|
|
|
|
+ ---------------
|
|
|
|
+ Added maintainer_name,maintainer_email,uncgi_year
|
|
|
|
+ diff from Bernhard van Staveren.
|
|
|
|
+
|
|
|
|
+ - 2.0.4 09/07/98
|
|
|
|
+ ---------------
|
|
|
|
+ Some more error checking.
|
|
|
|
+ cgi_error is now a procedural variable with the old
|
|
|
|
+ cgi_erro procedure as a default value, allowing recovery
|
|
|
|
+ incase of an error, and not immediate shutdown.
|
|
|
|
+
|
|
|
|
+ - 2.0.6 02/28/99
|
|
|
|
+ --------------
|
|
|
|
+ The unit can be used under Win32 also.
|
|
|
|
+
|
|
|
|
+ - 2.0.7 04/04/99
|
|
|
|
+ --------------
|
|
|
|
+ Inversed order of Chop and unescape, thus fixing bug of possible
|
|
|
|
+ '=' and '&' characters in values.
|
|
|
|
+ - 2.0.8 04/08/99
|
|
|
|
+ --------------
|
|
|
|
+ Fixed bug in unescape, qslen wasn't initialized.
|
|
|
|
+ - 2.0.9 05/16/99
|
|
|
|
+ --------------
|
|
|
|
+ Some fixes by Georgi Georgiev
|
|
}
|
|
}
|
|
|
|
+
|