code: @Override
      protected void readResponse(HttpState state, HttpConnection conn)
      throws IOException, HttpException {
          LOG.trace("enter HttpMethodBase.readResponse(HttpState, HttpConnection)");
          
          boolean isUpgrade = false;
          
  		while (getStatusLine() == null) {
              readStatusLine(state, conn);
              processStatusLine(state, conn);
              readResponseHeaders(state, conn);
              processResponseHeaders(state, conn);
              
              int status = this.statusLine.getStatusCode();
              if (status == 101) {
              	LOG.debug("Retrieved HTTP status code '101 Switching Protocols'. Keep connection open!");
  
              	// This means the requester has asked the server to switch protocols
              	// and the server is acknowledging that it will do so
              	// e.g.: upgrade to websocket
              	
  				if (conn instanceof ZapHttpConnection) {
  	            	isUpgrade = true;
  	            	// avoid connection release of HttpClient library 
  	            	conn.setHttpConnectionManager(null);
  	            }
              } else if ((status >= 100) && (status < 200)) {
                  if (LOG.isInfoEnabled()) {
                      LOG.info("Discarding unexpected response: " + this.statusLine.toString()); 
                  }
                  this.statusLine = null;
              }
          }
  
      	// get socket and input stream out of HttpClient
  		if (conn instanceof ZapHttpConnection) {
  			ZapHttpConnection zapConn = (ZapHttpConnection) conn;
  	    	upgradedSocket = zapConn.getSocket();
  			inputStream = zapConn.getResponseInputStream();
  		}
  		
  		if (!isUpgrade) {
  			// read & process rest of response
  			// only if connection should not be kept
  	        readResponseBody(state, conn);        
  	        processResponseBody(state, conn);
  		}
      }
docs: Allow response code 101, that is Switching Protocols.
  
  @see GetMethod#readResponse(HttpState, HttpConnection)