code: String getReqURL(HttpServletRequest req) {
          // due to some longstanding webcontainer strangeness, we have to do
          // some extra things for certain behind-proxy cases to get the right port.
          boolean rewritePort = false;
          Integer realPort = null;
          if (req.getScheme().toLowerCase().contains("https")) {
              realPort = new com.ibm.ws.security.common.web.WebUtils().getRedirectPortFromRequest(req);
          }
          int port = req.getServerPort();
          if (realPort != null && realPort.intValue() != port) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "serverport = " + port + "real port is " + realPort.toString() + ", url will be rewritten to use real port");
              }
              rewritePort = true;
          }
  
          StringBuffer reqURL = req.getRequestURL();
          if (rewritePort) {
              reqURL = new StringBuffer();
              reqURL.append(req.getScheme());
              reqURL.append("://");
              reqURL.append(req.getServerName());
              reqURL.append(":");
              reqURL.append(realPort);
              reqURL.append(req.getRequestURI());
              //reqURL = new StringBuffer(com.ibm.ws.security.common.web.WebUtils.rewriteURL(reqURL.toString(), null, realport.toString()));
          }
          String queryString = req.getQueryString();
          if (queryString != null) {
              reqURL.append("?");
              reqURL.append(OidcUtil.encodeQuery(queryString));
          }
          return reqURL.toString();
      }
docs: todo: remove from oidcca