docs: private boolean isEncodeable(final String location) {
  
          if (location == null)
              return (false);
  
          // Is this an intra-document reference?
          if (location.startsWith("#"))
              return (false);
  
          // Are we in a valid session that is not using cookies?
          final HttpServletRequestImpl hreq = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY).getOriginalRequest();
  
          // Is URL encoding permitted
          if (!originalServletContext.getEffectiveSessionTrackingModes().contains(SessionTrackingMode.URL)) {
              return false;
          }
  
          final HttpSession session = hreq.getSession(false);
          if (session == null) {
              return false;
          } else if(hreq.isRequestedSessionIdFromCookie()) {
              return false;
          } else if (!hreq.isRequestedSessionIdFromURL() && !session.isNew()) {
              return false;
          }
  
          return doIsEncodeable(hreq, session, location);
      }