javax.servlet.http.HttpServletRequestWrapper.getScheme()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getScheme()方法的一些代码示例,展示了HttpServletRequestWrapper.getScheme()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getScheme()方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getScheme

HttpServletRequestWrapper.getScheme介绍

暂无

代码示例

代码示例来源:origin: cloudfoundry/uaa

@Override
public String getScheme() {
  return super.getScheme();
}

代码示例来源:origin: cloudfoundry/uaa

@Override
public int getServerPort() {
  int port = super.getServerPort();
  String scheme = super.getScheme();
  if ("http".equals(scheme) &&
          "https".equals(super.getHeader("X-Forwarded-Proto"))) {
    port = 443;
  }
  return port;
}

代码示例来源:origin: cloudfoundry/uaa

@Override
public String getScheme() {
  String scheme = super.getScheme();
  logger.debug("Request X-Forwarded-Proto " + super.getHeader("X-Forwarded-Proto"));
  if ("http".equals(scheme) &&
          "https".equals(super.getHeader("X-Forwarded-Proto"))) {
    scheme = "https";
  }
  return scheme;
}

代码示例来源:origin: com.github.wuic/wuic-servlet

/**
 * {@inheritDoc}
 */
@Override
public String getScheme() {
  // Synchronized access
  synchronized (mutex) {
    return super.getScheme();
  }
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public String getScheme()
{
  String scheme = super.getScheme();
  return scheme;
}

代码示例来源:origin: org.jasig.portal/uPortal-rendering

@Override
public String getScheme() {
  this.checkState();
  return super.getScheme();
}

代码示例来源:origin: Jasig/uPortal

@Override
public String getScheme() {
  this.checkState();
  return super.getScheme();
}

代码示例来源:origin: org.apache.wink/wink-server

@Override
public String getScheme() {
  return getCorrectRequest().getScheme();
}

代码示例来源:origin: org.cyclopsgroup/kaufman-beans

protected ForwardedHttpRequest( HttpServletRequest request )
{
  super( request );
  boolean changed = false;
  if ( request.getHeader( HEADER_X_FORWARDED_PORT ) != null )
  {
    this.serverPort =
      Integer.parseInt( request.getHeader( HEADER_X_FORWARDED_PORT ) );
    changed = true;
  }
  else
  {
    this.serverPort = super.getServerPort();
  }
  if ( request.getHeader( HEADER_X_FORWARDED_PROTO ) != null )
  {
    this.scheme = request.getHeader( HEADER_X_FORWARDED_PROTO );
    changed = true;
  }
  else
  {
    this.scheme = super.getScheme();
  }
  this.forwarded = changed;
}

代码示例来源:origin: org.cyclopsgroup/kaufman-beans

/**
 * @inheritDoc
 */
@Override
public StringBuffer getRequestURL()
{
  if ( !forwarded )
  {
    return super.getRequestURL();
  }
  String originalBase =
    buildUrl( super.getScheme(), super.getServerName(),
         super.getServerPort() );
  String url = super.getRequestURL().toString();
  if ( url.startsWith( originalBase ) )
  {
    String newBase =
      buildUrl( scheme, super.getServerName(), serverPort );
    return new StringBuffer( newBase ).append( url.substring( originalBase.length() ) );
  }
  return super.getRequestURL();
}

相关文章

HttpServletRequestWrapper类方法