This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
have a piece of code ,this code is working in a different program individually but it does not work in the proxy server. It extracts the response from the website and when i write it to a something like out.html it writes the whole page but it does not write back to the socket for the web browser.
guys if any one of you has a idea why this happens ,please do reply.
/*************Transferring requested Web Page to Web Browser************/ //out.write(raw_request.getBytes()); String inputLine; PrintWriter out1 = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out))); while ((inputLine = in1.readLine()) != null) out1.println(inputLine); //out.write(socket_in.read()); Logobj.logEntry("Transferred "+raw_request.length()+" bytes of data to browser of "+socket.getInetAddress() + ":" +socket.getPort()); ppt.doit("Transferred "+raw_request.length()+" bytes of data to browser of "+socket.getInetAddress() +":"+socket.getPort(),jta); out1.flush(); sout.close(); sin.close();