code: protected void proxyReadHandshake() {
  
          // setup the read buffer - use JIT on the first read attempt. If it
          // works, then any subsequent reads will use that same buffer.
          connLink.getReadInterface().setJITAllocateSize(1024);
          // reader.setBuffer(WsByteBufferPoolManagerImpl.getRef().allocate(1024));
  
          if (connLink.isAsyncConnect()) {
              // handshake - read the proxy response
              this.proxyReadCB = new ProxyReadCallback();
              readProxyResponse(connLink.getVirtualConnection());
  
          } else {
              int rc = STATUS_NOT_DONE;
              while (rc == STATUS_NOT_DONE) {
                  readProxyResponse(connLink.getVirtualConnection());
                  rc = checkResponse(connLink.getReadInterface());
              }
              if (rc == STATUS_ERROR) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "could not complete proxy handshake, read request failed");
                  }
                  releaseProxyReadBuffer();
                  // if (null == this.syncError) {
                  if (connLink.isSyncError() == false) {
                      // create a new connect exception
                      connLink.connectFailed(new IOException("Invalid Proxy Server Response "));
                  }
              }
          }
      }
docs: Complete the proxy connect handshake by reading for the response and
  validating any data.