jdk/test/java/net/Authenticator/B4769350.java
changeset 5979 26b9b2b1b37b
parent 5506 202f599c92aa
child 7668 d4a77089c587
--- a/jdk/test/java/net/Authenticator/B4769350.java	Thu Jun 24 14:26:35 2010 +0800
+++ b/jdk/test/java/net/Authenticator/B4769350.java	Mon Jun 28 14:55:25 2010 +0100
@@ -54,6 +54,7 @@
         boolean allowerror;
 
         Client (String authority, String path, boolean allowerror) {
+            super("Thread-" + path);
             this.authority = authority;
             this.path = path;
             this.allowerror = allowerror;
@@ -72,7 +73,8 @@
                 error = true;
             } catch (IOException e) {
                 if (!allowerror) {
-                    System.out.println (e);
+                    System.out.println (Thread.currentThread().getName() + " " + e);
+                    e.printStackTrace();
                     error = true;
                 }
             }
@@ -94,6 +96,7 @@
         }
 
         void okReply (HttpTransaction req) throws IOException {
+            req.addResponseHeader ("Connection", "close");
             req.setResponseEntityBody ("Hello .");
             req.sendResponse (200, "Ok");
             req.orderlyClose();