test/sun/security/ssl/sun/net/www/httpstest/HttpTransaction.java

Print this page

        

*** 35,54 **** public class HttpTransaction { String command; URI requesturi; ! HttpServer.ServerWorker server; MessageHeader reqheaders, reqtrailers; String reqbody; byte[] rspbody; MessageHeader rspheaders, rsptrailers; SocketChannel ch; int rspbodylen; boolean rspchunked; ! HttpTransaction (HttpServer.ServerWorker server, String command, URI requesturi, MessageHeader headers, String body, MessageHeader trailers, SocketChannel ch) { this.command = command; this.requesturi = requesturi; this.reqheaders = headers; --- 35,54 ---- public class HttpTransaction { String command; URI requesturi; ! TestHttpsServer.ServerWorker server; MessageHeader reqheaders, reqtrailers; String reqbody; byte[] rspbody; MessageHeader rspheaders, rsptrailers; SocketChannel ch; int rspbodylen; boolean rspchunked; ! HttpTransaction (TestHttpsServer.ServerWorker server, String command, URI requesturi, MessageHeader headers, String body, MessageHeader trailers, SocketChannel ch) { this.command = command; this.requesturi = requesturi; this.reqheaders = headers;
*** 288,298 **** * but using the response code and string tag line as specified * @param rCode the response code to send * @param rTag the response string to send with the response code */ public void sendResponse (int rCode, String rTag) throws IOException { ! OutputStream os = new HttpServer.NioOutputStream(channel(), server.getSSLEngine(), server.outNetBB(), server.outAppBB()); PrintStream ps = new PrintStream (os); ps.print ("HTTP/1.1 " + rCode + " " + rTag + "\r\n"); if (rspheaders != null) { rspheaders.print (ps); } else { --- 288,298 ---- * but using the response code and string tag line as specified * @param rCode the response code to send * @param rTag the response string to send with the response code */ public void sendResponse (int rCode, String rTag) throws IOException { ! OutputStream os = new TestHttpsServer.NioOutputStream(channel(), server.getSSLEngine(), server.outNetBB(), server.outAppBB()); PrintStream ps = new PrintStream (os); ps.print ("HTTP/1.1 " + rCode + " " + rTag + "\r\n"); if (rspheaders != null) { rspheaders.print (ps); } else {
*** 312,322 **** } /* sends one byte less than intended */ public void sendPartialResponse (int rCode, String rTag)throws IOException { ! OutputStream os = new HttpServer.NioOutputStream(channel(), server.getSSLEngine(), server.outNetBB(), server.outAppBB()); PrintStream ps = new PrintStream (os); ps.print ("HTTP/1.1 " + rCode + " " + rTag + "\r\n"); ps.flush(); if (rspbody != null) { os.write (rspbody, 0, rspbodylen-1); --- 312,322 ---- } /* sends one byte less than intended */ public void sendPartialResponse (int rCode, String rTag)throws IOException { ! OutputStream os = new TestHttpsServer.NioOutputStream(channel(), server.getSSLEngine(), server.outNetBB(), server.outAppBB()); PrintStream ps = new PrintStream (os); ps.print ("HTTP/1.1 " + rCode + " " + rTag + "\r\n"); ps.flush(); if (rspbody != null) { os.write (rspbody, 0, rspbodylen-1);