是否内网调用
@param request
@return
484638
public static boolean isInternalRequest(HttpServletRequest request){
		//
		if(Boolean.parseBoolean(request.getHeader(WebConstants.HEADER_INTERNAL_REQUEST))){
			return true;
		}

		boolean isInner = IpUtils.isInnerIp(request.getServerName());
		String forwardHost = request.getHeader(WebConstants.HEADER_FORWARDED_HOST);
		//来源于网关
		if(StringUtils.isNotBlank(forwardHost)){
			isInner = IpUtils.isInnerIp(StringUtils.split(forwardHost, ":")[0]);
		}else{			
			if(!isInner){
				isInner = IpUtils.isInnerIp(IpUtils.getinvokerIpAddr(request));
			}
		}
		return isInner;
	}
1099741
private static String getRequestBody(HttpServletRequest request) {
        String body = null;
        try (BufferedReader requestReader = request.getReader()) {
            StringBuffer bodyLines = new StringBuffer();
            String bodyLine;
            while ((bodyLine = requestReader.readLine()) != null) {
                bodyLines.append(bodyLine);
            }
            body = bodyLines.toString();
        } catch (IOException e) {
            LOG.info("Failed to obtain a Reader for a potential body of"
                + " this POST, assuming KVP");
        }

        return body;
    }
1105256
public static String getPostDataAsString(HttpServletRequest request) throws IOException {

        try (InputStreamReader reader = new InputStreamReader(request.getInputStream(), "UTF-8")) {
            return (getReaderContentAsString(reader));
        }
    }
573110
public byte[] getObjectContent(GetObjectRequest request) {
        BosObjectInputStream content = this.getObject(request).getObjectContent();
        try {
            return IOUtils.toByteArray(content);
        } catch (IOException e) {
            try {
                content.close();
            } catch (IOException e1) {
                // ignore, throw e not e1.
            }
            throw new BceClientException("Fail read object content", e);
        } finally {
            try {
                content.close();
            } catch (IOException e) {
                // ignore
            }
        }
    }
723013
public static Map<String, List<StringValue>> getPageParametersMap(final Request request)
	{
		final Map<String, List<StringValue>> map = new HashMap<>();
		addToParameters(request.getRequestParameters(), map);
		addToParameters(request.getQueryParameters(), map);
		addToParameters(request.getPostParameters(), map);
		return map;
	}
504714
public static String getError(final HttpServletRequest request) {
		StringBuilder sb = (StringBuilder) request.getAttribute(ERROR_KEY);
		if (sb == null) {
			return "";
		}
		return sb.toString();
	}
685295
public static String getContextRequestUri(HttpServletRequest request) {
		String requestUri = request.getRequestURI();
		String contextPath = request.getContextPath();
		int cpLen = contextPath.length();
		if(cpLen > 0) {
			assert requestUri.startsWith(contextPath);
			return requestUri.substring(cpLen);
		} else {
			return requestUri;
		}
	}
843823
@RequestMapping(method = RequestMethod.GET)
    @ResponseBody
    protected final String bind(HttpServletRequest request) {
        if (isLegal(request)) {
            //绑定微信服务器成功
            return request.getParameter("echostr");
        } else {
            //绑定微信服务器失败
            return "";
        }
    }
279944
public static String getBaseUrl(HttpServletRequest request){
        String baseUrl = null;					
		String host = request.getHeader(WebConstants.HEADER_FORWARDED_HOST);
		String prefix = request.getHeader(WebConstants.HEADER_FORWARDED_PRIFIX);
		if(StringUtils.isAnyBlank(host,prefix)){
			String[] segs = StringUtils.split(request.getRequestURL().toString(),"/");
			baseUrl = segs[0] + "//" + segs[1];
		}else{
			//由于nginx 没有设置  proxy_set_header   X-Forwarded-Proto $scheme;
		    //导致https通过nginx转发后，在api网关获取到的scheme为：http,
			//String proto = request.getHeader(BaseConstants.HEADER_FORWARDED_ORIGN_PROTO);
			//if(proto == null)proto = request.getHeader(BaseConstants.HEADER_FORWARDED_PROTO);
			 String port = request.getHeader(WebConstants.HEADER_FORWARDED_PORT);
			String schame = "443".equals(port) ? "https://" : "http://";
			baseUrl = schame + host + prefix;
		}
		
		if(StringUtils.isNotBlank(request.getContextPath())){
			baseUrl = baseUrl + request.getContextPath();
		}
		
		return baseUrl;
	}
9590
public static String getHeader(HttpServletRequest request, String header) {

		// noting to search in or nothing to be found
		if (request == null || StringUtils.isNullOrEmptyTrimmed(header)) {
			return null;
		}

		return request.getHeader(header);
	}
1167702
private String getURI(HttpServletRequest request)
    {
        String uri= (String)request.getAttribute("javax.servlet.forward.request_uri");
        if (uri == null)
            uri= request.getRequestURI();
        return uri;
    }
686713
private MultipartParsingResult parseRequest(HttpRequest request) throws MultipartException {
        String encoding = determineEncoding(request);
        FileUpload fileUpload = prepareFileUpload(encoding);
        try {
            RequestBody body = request.getBody();
            Assert.notNull(body, "The body cannot be null.");
            List<FileItem> fileItems = fileUpload.parseRequest(new BodyContext(body));
            return parseFileItems(fileItems, encoding);
        } catch (FileUploadBase.SizeLimitExceededException ex) {
            throw new MaxUploadSizeExceededException(fileUpload.getSizeMax(), ex);
        } catch (FileUploadBase.FileSizeLimitExceededException ex) {
            throw new MaxUploadSizeExceededException(fileUpload.getFileSizeMax(), ex);
        } catch (FileUploadException ex) {
            throw new MultipartException("Failed to parse multipart servlet request.", ex);
        }
    }
1237001
public static Tag uri(ClientRequest request) {
		String uri = (String) request.attribute(URI_TEMPLATE_ATTRIBUTE)
				.orElseGet(() -> request.url().getPath());
		return Tag.of("uri", extractPath(uri));
	}
278081
protected String getDescription(HttpServletRequest request) {
		String pathInfo = (request.getPathInfo() != null) ? request.getPathInfo() : "";
		return "[" + request.getServletPath() + pathInfo + "]";
	}
1188343
public static boolean isMultipartContent(HttpServletRequest request) {
		if (!"post".equals(request.getMethod().toLowerCase())) {
			return false;
		}

		String contentType = request.getContentType();
		if (contentType == null) {
			return false;
		}
		if (contentType.toLowerCase().startsWith(MULTIPART)) {
			return true;
		}

		return false;
	}
166327
public static String getParameter(final Request request, final String parameterName)
	{
		String parameterValue = request.getRequestParameters().getParameterValue(parameterName)
			.toString();
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getPostParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getQueryParameters().getParameterValue(parameterName)
				.toString();
		}
		if ((parameterValue == null) || parameterValue.isEmpty())
		{
			parameterValue = request.getRequestParameters().getParameterValue(parameterName)
				.toString();
		}
		return parameterValue;
	}
724681
public static String findRouteOrRequestUriTransport(Request request) {
		RouteHeader route = (RouteHeader) request.getHeader(RouteHeader.NAME);
		if(route != null) {
			URI uri = route.getAddress().getURI();
			return findURITransport(uri, request.getContentLength().getContentLength());
		}
		URI ruri = request.getRequestURI();
		return findURITransport(ruri, request.getContentLength().getContentLength());
	}