docs: static StringBuffer buildHTTPURL(final HttpServletRequest pRequest) {
          StringBuffer resultURL = new StringBuffer();
  
          // Scheme, as in http, https, ftp etc
          String scheme = pRequest.getScheme();
          resultURL.append(scheme);
          resultURL.append("://");
          resultURL.append(pRequest.getServerName());
  
          // Append port only if not default port
          int port = pRequest.getServerPort();
          if (port > 0 &&
                  !(("http".equals(scheme) && port == 80) ||
                          ("https".equals(scheme) && port == 443))) {
              resultURL.append(":");
              resultURL.append(port);
          }
  
          // Append URI
          resultURL.append(pRequest.getRequestURI());
  
          // If present, append extra path info
          String pathInfo = pRequest.getPathInfo();
          if (pathInfo != null) {
              resultURL.append(pathInfo);
          }
  
          return resultURL;
      }