change repository metadata to reference the github mirror
[catagits/fcgi2.git] / java / FCGIInterface.java
index ae88650..03e8caa 100644 (file)
  * See the file "LICENSE.TERMS" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * $Id: FCGIInterface.java,v 1.1 1999/01/31 02:45:49 roberts Exp $
+ * $Id: FCGIInterface.java,v 1.4 2000/03/27 15:37:25 robs Exp $
  */
+package com.fastcgi;
 
 import java.net.*;
 import java.io.*;
 import java.util.Properties;
-import FCGIGlobalDefs;
-import FCGIRequest;
-import FCGIInputStream;
-import FCGIOutputStream;
-import FCGIMessage;
 
 /*
  * This is the FastCGI interface that the application calls to communicate with the
  * FastCGI web server. This version is single threaded, and handles one request at
  * a time, which is why we can have a static variable for it.
  */
-public class FCGIInterface {
+public class FCGIInterface 
+{
+    private static final String RCSID = "$Id: FCGIInterface.java,v 1.4 2000/03/27 15:37:25 robs Exp $";
 
     /*
     * Class variables
@@ -81,8 +79,6 @@ public class FCGIInterface {
                  * save original system properties (nonrequest)
                  * and get a server socket
                  */
-                System.out.close();
-                System.err.close();
                 startupProps = new Properties(System.getProperties());
                 String str =
                     new String(System.getProperty("FCGI_PORT"));
@@ -94,7 +90,10 @@ public class FCGIInterface {
                 try {
                     srvSocket = new ServerSocket(portNum);
                 } catch (IOException e) {
-                    request.socket = null;
+                    if (request != null)
+                    {
+                        request.socket = null;
+                    }
                     srvSocket = null;
                     request = null;
                     return -1;