test/sun/net/www/httptest/HttpTransaction.java

Print this page

        

@@ -35,20 +35,20 @@
 
 public class HttpTransaction {
 
     String command;
     URI requesturi;
-    HttpServer.Server server;
+    TestHttpServer.Server server;
     MessageHeader reqheaders, reqtrailers;
     String reqbody;
     byte[] rspbody;
     MessageHeader rspheaders, rsptrailers;
     SelectionKey  key;
     int rspbodylen;
     boolean rspchunked;
 
-    HttpTransaction (HttpServer.Server server, String command,
+    HttpTransaction (TestHttpServer.Server server, String command,
                         URI requesturi, MessageHeader headers,
                         String body, MessageHeader trailers, SelectionKey  key) {
         this.command = command;
         this.requesturi = requesturi;
         this.reqheaders = headers;

@@ -288,11 +288,11 @@
      * 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());
+        OutputStream os = new TestHttpServer.NioOutputStream(channel());
         PrintStream ps = new PrintStream (os);
         ps.print ("HTTP/1.1 " + rCode + " " + rTag + "\r\n");
         if (rspheaders != null) {
             rspheaders.print (ps);
         } else {

@@ -312,11 +312,11 @@
     }
 
     /* sends one byte less than intended */
 
     public void sendPartialResponse (int rCode, String rTag)throws IOException {
-        OutputStream os = new HttpServer.NioOutputStream(channel());
+        OutputStream os = new TestHttpServer.NioOutputStream(channel());
         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);