summaryrefslogtreecommitdiffstats
path: root/web/attachments/49902-Http.java
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/49902-Http.java
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/49902-Http.java')
-rw-r--r--web/attachments/49902-Http.java12
1 files changed, 12 insertions, 0 deletions
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 @@
1import java.net.*;
2public class Http {
3 private static final String EOL = "\r\n";
4 public static void main(String args[]) throws Exception {
5 ServerSocket server = new ServerSocket(8911);
6 while (true) {
7 Socket sock = server.accept();
8 sock.getOutputStream().write(("HTTP/1.0 " + HttpURLConnection.HTTP_OK + EOL + "Content-type: text/html" + EOL + EOL + "Some example text").getBytes());
9 sock.close();
10 }
11 }
12} \ No newline at end of file