src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Request.java
branchhttp-client-branch
changeset 55764 34d7cc00f87a
parent 55763 634d8e14c172
child 55799 c71f52f48d97
equal deleted inserted replaced
55763:634d8e14c172 55764:34d7cc00f87a
   143 
   143 
   144     private String requestURI() {
   144     private String requestURI() {
   145         URI uri = request.uri();
   145         URI uri = request.uri();
   146         String method = request.method();
   146         String method = request.method();
   147 
   147 
   148         if ((request.proxy(client) == null && !method.equals("CONNECT"))
   148         if ((request.proxy() == null && !method.equals("CONNECT"))
   149                 || request.isWebSocket()) {
   149                 || request.isWebSocket()) {
   150             return getPathAndQuery(uri);
   150             return getPathAndQuery(uri);
   151         }
   151         }
   152         if (request.secure()) {
   152         if (request.secure()) {
   153             if (request.method().equals("CONNECT")) {
   153             if (request.method().equals("CONNECT")) {
   156             } else {
   156             } else {
   157                 // requests over tunnel do not require full URL
   157                 // requests over tunnel do not require full URL
   158                 return getPathAndQuery(uri);
   158                 return getPathAndQuery(uri);
   159             }
   159             }
   160         }
   160         }
       
   161         if (request.method().equals("CONNECT")) {
       
   162             // use authority for connect itself
       
   163             return authorityString(request.authority());
       
   164         }
       
   165 
   161         return uri == null? authorityString(request.authority()) : uri.toString();
   166         return uri == null? authorityString(request.authority()) : uri.toString();
   162     }
   167     }
   163 
   168 
   164     private boolean finished;
   169     private boolean finished;
   165 
   170