--- projects/cms/source/server/uk/org/iscream/cms/server/filter/plugins/HTTP__ServiceCheck.java 2001/02/12 00:35:13 1.3 +++ projects/cms/source/server/uk/org/iscream/cms/server/filter/plugins/HTTP__ServiceCheck.java 2001/03/05 14:59:40 1.4 @@ -11,8 +11,8 @@ import java.net.HttpURLConnection; * Connects on port 80 and performs a simple HTTP HEAD request. * Currently it sends back 200 for OK, anything else indicates a failure. * - * @author $Author: tdb $ - * @version $Id: HTTP__ServiceCheck.java,v 1.3 2001/02/12 00:35:13 tdb Exp $ + * @author $Author: ajm $ + * @version $Id: HTTP__ServiceCheck.java,v 1.4 2001/03/05 14:59:40 ajm Exp $ */ public class HTTP__ServiceCheck implements PluginServiceCheck { @@ -21,7 +21,7 @@ public class HTTP__ServiceCheck implements PluginServi /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.3 $"; + public final String REVISION = "$Revision: 1.4 $"; public final String DESC = "Checks that a webserver is responding to requests."; @@ -48,7 +48,11 @@ public class HTTP__ServiceCheck implements PluginServi connection.setRequestProperty("User-Agent", "i-scream HTTP Service Checker v" + REVISION.substring(11, REVISION.length() - 2)); // connect and do the request connection.connect(); - status += connection.getResponseCode(); + if (connection.getResponseCode() != 200 ) { + status += "0"; + } else { + status += "1"; + } message = connection.getResponseMessage(); connection.disconnect(); } catch (Exception e) {