From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/49902-Http.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 web/attachments/49902-Http.java (limited to 'web/attachments/49902-Http.java') diff --git a/web/attachments/49902-Http.java b/web/attachments/49902-Http.java new file mode 100644 index 0000000..5f2c076 --- /dev/null +++ b/web/attachments/49902-Http.java @@ -0,0 +1,12 @@ +import java.net.*; +public class Http { + private static final String EOL = "\r\n"; + public static void main(String args[]) throws Exception { + ServerSocket server = new ServerSocket(8911); + while (true) { + Socket sock = server.accept(); + sock.getOutputStream().write(("HTTP/1.0 " + HttpURLConnection.HTTP_OK + EOL + "Content-type: text/html" + EOL + EOL + "Some example text").getBytes()); + sock.close(); + } + } +} \ No newline at end of file -- cgit v1.2.3-74-g34f1