Passing environment variables from an hypertext protocol server application programming interface
First Claim
1. In a computer network in which a client browser is connectable to a HTTP server, the HTTP server having a plug-in application programming interface (API) and supporting a target CGI program accessible by having a service method of the HTTP server launch a CGI process, a method of enabling a generic server plug-in to pass an environment variable into the CGI process, comprising the steps of:
- (a) configuring the HTTP server to initially override the service method;
(b) responsive to an HTTP request, having the generic server plug-in insert a name value pair prepended with a marker in a request header parameter block of the HTTP server;
(c) using the service method, transferring to the CGI process the request header parameter block;
(d) extracting the name value pair from the request header parameter block; and
(e) in response to the name value pair extracted from the request header parameter block, resetting the environment variable and providing the request header parameter block to the CGI process for execution.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of enabling an HTTP server plug-in to pass an unmangled environment variable into a CGI process begins by configuring the HTTP server to initially override a CGI service method. When the server processes an HTTP request, the server plug-in, which is called prior to the CGI service method and is running in a process of the HTTP server, inserts a “name value” pair prepended with a marker in a request header parameter block of the HTTP server. Then, the CGI service override method executes the server'"'"'s original (i.e. native) CGI service method, causing it to run an encapsulation program in the CGI process. This program scans the environment of the CGI process for any string prepended with a given HTTP code (e.g., the string “HTTP_”) and the marker. If it finds any such string, the program strips the given HTTP code and the marker from a remainder of the string and resets the environment variable into the CGI process in an “unmangled” form. The target CGI program is then executed in the CGI process.
36 Citations
20 Claims
-
1. In a computer network in which a client browser is connectable to a HTTP server, the HTTP server having a plug-in application programming interface (API) and supporting a target CGI program accessible by having a service method of the HTTP server launch a CGI process, a method of enabling a generic server plug-in to pass an environment variable into the CGI process, comprising the steps of:
-
(a) configuring the HTTP server to initially override the service method;
(b) responsive to an HTTP request, having the generic server plug-in insert a name value pair prepended with a marker in a request header parameter block of the HTTP server;
(c) using the service method, transferring to the CGI process the request header parameter block;
(d) extracting the name value pair from the request header parameter block; and
(e) in response to the name value pair extracted from the request header parameter block, resetting the environment variable and providing the request header parameter block to the CGI process for execution. - View Dependent Claims (2, 3, 4)
scanning the request header parameter block for any string prepended with “
HTTP_” and
the marker; and
stripping “
HTTP_” and
the marker from a remainder of the string.
-
-
3. The method as described in claim 1 wherein the step of extracting the name value pair comprises the steps of:
-
scanning the request header parameter block for any string prepended with “
HTTPS_” and
the marker; and
stripping “
HTTPS_” and
the marker from a remainder of the string.
-
-
4. The method as described in claim 1 wherein the HTTP server is Netscape-compatible and the service method is send-cgi.
-
5. In a computer network in which a client browser is connectable to a Netscape-compatible HTTP server, the HTTP server having a plug-in application programming interface (API) and supporting a target CGI program accessible by having a service method of the HTTP server launch a CGI process, a method of enabling a generic plug-in to pass an unmangled environment variable into the CGI process, comprising the steps of:
-
(a) configuring the HTTP server to initially override the service method;
(b) having the generic plug-in insert a name value pair prepended with a marker in a request header parameter block of the HTTP server;
(c) using the service method to transfer the request header parameter block to the CGI process;
(d) extracting the name value pair and the marker from the request header parameter block using a given HTTP code and the marker to locate the name value pair; and
(e) stripping the given HTTP code and the marker from a remainder of the string; and
(f) resetting the environment variable in response to the name value pair extracted from the request header parameter block and providing the request header parameter block to to the CGI process. - View Dependent Claims (6, 7)
-
-
8. A mechanism for enabling a generic plug-in to pass an environment variable into a CGI process, the generic plug-in executable within an HTTP server process, the mechanism comprising:
-
a service encapsulation program executable in a server process and responsive to an HTTP request for calling a native CGI service method, wherein the service encapsulation program inserts the environment variable along with a marker into a message; and
a CGI encapsulation program executable in a CGI process and responsive to execution of the native CGI service method for scanning an environment of the CGI process, the CGI encapsulation program using the marker to extract the environment variable from the message and resetting the environment variable into the CGI process in an unmangled form. - View Dependent Claims (9, 10, 11)
means for inserting a name value pair prepended with a marker in a request header parameter block of the HTTP server; and
means for executing a CGI service override method to call the native CGI service method.
-
-
10. The mechanism as described in claim 9 wherein the CGI encapsulation program includes:
-
means for scanning an environment of the CGI process for any string prepended with a given HTTP code and the marker; and
means responsive to the scanning means for stripping the given HTTP code and the marker from a remainder of the string.
-
-
11. The mechanism as described in claim 8 further including means for modifying a configuration of the HTTP server process to override the native CGI service method with the service encapsulation program.
-
12. A computer program product executable in a computer for enabling a generic server plug-in to pass an environment variable into a CGI process, the generic plug-in executable within an HTTP server process, the computer program product comprising:
-
a computer-readable substrate; and
program code encoded in the computer-readable substrate and including;
a service encapsulation program executable in a server process and responsive to an HTTP request for calling a native CGI service method, wherein the service encapsulation program inserts the environment variable into a transmission to the native CGI service method along with a marker; and
a CGI encapsulation program executable in a CGI process and responsive to execution of the native CGI service method for scanning an environment of the CGI process, the CGI encapsulation program extracting the environment variable from the transmission using the marker and resetting an environment variable into the CGI process in an unmangled form. - View Dependent Claims (13, 14, 15)
means for inserting a name value pair prepended with a marker in a request header parameter block of the HTTP server; and
means for executing a CGI service override method to call the native CGI service method.
-
-
14. The computer program product as described in claim 13 wherein the CGI encapsulation program code includes:
-
means for scanning an environment of the CGI process for any string prepended with a given HTTP code and the marker; and
means responsive to the scanning means for stripping the given HTTP code and the marker from a remainder of the string.
-
-
15. The computer program produce as described in claim 12 wherein the program code further includes means for modifying a configuration of the HTTP server to override the native CGI service method with the service encapsulation program code.
-
16. A method of enabling a generic server plug-in to pass an unmangled environment variable into a CGI process, the generic server plug-in executable within an HTTP server process, comprising the steps of:
-
inserting an environment variable and a marker for the environment variable into a message;
transferring the message using the HTTP server process which normally mangles the environment variable; and
receiving the message at the CGI service method within a first program executable in a CGI process and a second program executable in a server process, the first program including means for extracting the mangled environment variable. - View Dependent Claims (17)
-
-
18. In a computer network in which a client browser is connectable to an HTTP server, the HTTP server having a plug-in application programming interface (API) and including at least one server process that launches a child process, the improvement comprising:
-
means for inserting an environment variable and a marker for the environment variable into a message;
means for transferring the message using the HTTP server that launches the child process which normally mangles the environment variable; and
means for receiving the message at the service method between a first program, executable in the child process, and a second program, executable in the server process, wherein the first program includes means for extracting the mangled environment variable. - View Dependent Claims (19)
-
-
20. A computer, comprising:
-
a processor;
an operating system;
a Web server program for processing HTTP client requests; and
a mechanism for enabling a generic plug-in to pass an environment variable into a CGI process, comprising;
a service encapsulation program executable in a server process and responsive to an HTTP request for calling a native CGI service method, the service encapsulation program inserting an environment variable into a message, the service encapsulation program normally mangling the environment variable; and
a CGI encapsulation program executable in the CGI process and responsive to execution of the native CGI service method for scanning message, extracting the environment variable and resetting an environment variable into the CGI process in an unmangled form.
-
Specification