diff --git a/WebWorker.class b/WebWorker.class index 70da509..ed1c78a 100644 Binary files a/WebWorker.class and b/WebWorker.class differ diff --git a/WebWorker.java b/WebWorker.java index 3c2c2e0..90ace66 100644 --- a/WebWorker.java +++ b/WebWorker.java @@ -86,7 +86,6 @@ private void readHTTPRequest(InputStream is){ t.nextToken(); // skips "GET" file = t.nextToken(); - while (true) { try { while (!r.ready()) Thread.sleep(1); @@ -179,25 +178,5 @@ private void writeContent(OutputStream os) throws Exception System.err.println(file + " not found"); os.write("

404 Not Found

".getBytes()); } // end catch -// os.write("HTTP/1.1 200 Ok\n".getBytes()); - -/* filename = filename.substring(1); // removes forward-slash from string "file" - dir = new File(file); // creates File object from string "file" - if (dir.exists()){ - FileReader reader = new FileReader(dir); - BufferedReader buffer = new BufferedReader(reader); - line = buffer.readLine(); - - while (line != null){ - os.write(line.getBytes()); - line = buffer.readLine(); - System.out.println("in while"); - } // end while - buffer.close(); - } // end if - else{ - os.write("

404 NOT FOUND

".getBytes()); - } // end else -*/ } // end writeContent } // end class diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..c13ae43 --- /dev/null +++ b/build.xml @@ -0,0 +1,7 @@ + + + + +