/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }
final void process(Socket clnt) throws IOException { InputStream in = new BufferedInputStream(clnt.getInputStream()); String cmd = readLine(in); logging(clnt.getInetAddress().getHostName(), new Date().toString(), cmd); while (skipLine(in) > 0){ } OutputStream out = new BufferedOutputStream(clnt.getOutputStream()); try { doReply(in, out, cmd); } catch (BadHttpRequest e) { replyError(out, e); } out.flush(); in.close(); out.close(); clnt.close(); }