anchor.diff:          HashMap<String, String> headerInfo=new HashMap<>();
           headerInfo.put("Referer", PROXY_REFERER);
           if (method.equals("POST")){
  -            String[] uriArray = uri.split("\\?",2);
  +            String[] uriArray = uri.split("\\?", 2);
               uri = uriArray[0];
   
  -            headerInfo.put("Content-Type","application/x-www-form-urlencoded");
  +            headerInfo.put("Content-Type", "application/x-www-form-urlencoded");
   
               if (uriArray.length > 1){
                   String queryString = uriArray[1];
  
positive.code:         return token;
      }
  
      private boolean properStartOrEqualTo(String shortString, String longString){
          //If equal, return true
          if (longString.equals(shortString)){
              return true;
          }
  
          //proper-start takes care of example.com/folder vs example.com/folders situation
          if(longString.toLowerCase().startsWith(shortString.toLowerCase())){
              //If the shortString ends with "/", it will be a proper starts
              if (shortString.endsWith("/")){
                  return true;
              }
  
              //If the next character on longString is "/", it is a proper-start
              if (longString.charAt(longString.indexOf(shortString)+shortString.length()) == '/'){
                  return true;
              }
          }
          return false;
      }
  
      private boolean checkReferer(String[] allowedReferers, String referer) throws MalformedURLException{
  
negative.code:             for (String allowedReferer : allowedReferers){
                  allowedReferer = allowedReferer.replaceAll("\\s", "");
  
                  URL refererURL = new URL(referer);
                  URL allowedRefererURL;
  
                  //since the allowedReferer can be a malformedURL, we first construct a valid one to be compared with referer
                  //if allowedReferer starts with https:// or http://, then exact match is required
                  if (allowedReferer.startsWith("https://") || allowedReferer.startsWith("http://")){
                      allowedRefererURL = new URL(allowedReferer);
                  } else {
  
                      String protocol = refererURL.getProtocol();
                      //if allowedReferer starts with "//" or no protocol, we use the one from refererURL to prefix to allowedReferer.
                      if (allowedReferer.startsWith("//")){
                          allowedRefererURL = new URL(protocol+":"+allowedReferer);
                      } else {
                          //if the allowedReferer looks like "example.esri.com"
                          allowedRefererURL = new URL(protocol+"://"+allowedReferer);
                      }
                  }
  
                  //Check if both domain and path match
                  if (protocolMatch(allowedRefererURL.getProtocol(), refererURL.getProtocol()) &&
                          domainMatched(allowedRefererURL.getHost(), refererURL.getHost()) &&
                          pathMatched(allowedRefererURL.getPath(), refererURL.getPath())){
                      return true;
                  }
              }
              return false;//no-match in allowedReferer, does not allow the request
          }
          return true;//when allowedReferer is null, then allow everything
      }
  
      //check the wildcard in allowedReferer in proxy.config
      private boolean checkWildcardSubdomain(String allowedRefererDomain, String refererDomain) throws MalformedURLException{
  
          String[] allowedRefererParts = allowedRefererDomain.split("(\\.)");
          String[] refererParts = refererDomain.split("(\\.)");
  
          int allowedIndex = allowedRefererParts.length-1;
          int refererIndex = refererParts.length-1;
  