org.apache.coyote.Request.scheme()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(261)

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

Request.scheme介绍

暂无

代码示例

代码示例来源:origin: line/armeria

final Request coyoteReq = new Request();
coyoteReq.scheme().setString(req.scheme());

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * @return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Return the scheme used to make this Request.
 */
public String getScheme() {
  return (coyoteRequest.scheme().toString());
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * @return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public String getScheme()
/*      */   {
/* 1296 */     return this.coyoteRequest.scheme().toString();
/*      */   }
/*      */

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: tomcat/catalina

/**
 * Return the scheme used to make this Request.
 */
public String getScheme() {
  return (coyoteRequest.scheme().toString());
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Return the scheme used to make this Request.
 */
public String getScheme() {
  return (coyoteRequest.scheme().toString());
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Return the scheme used to make this Request.
 */
@Override
public String getScheme() {
  return coyoteRequest.scheme().toString();
}

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

private void setHost(final Request request, final CharSequence host) throws IOException {
  CharChunk chunk;
  try {
    // slightly fancier logic..
    final URL newUrl = new URL(host.toString());
    final String protocol = newUrl.getProtocol();
    final int port = newUrl.getPort();
    final String newHost = newUrl.getHost();
    request.getCoyoteRequest().serverName().recycle();
    chunk = request.getCoyoteRequest().serverName().getCharChunk();
    chunk.recycle();
    chunk.append(newHost);
    request.getCoyoteRequest().serverName().toChars();
    request.getCoyoteRequest().setServerPort(port);
    request.getCoyoteRequest().scheme().recycle();
    chunk = request.getCoyoteRequest().scheme().getCharChunk();
    chunk.recycle();
    chunk.append(protocol);
    request.getCoyoteRequest().scheme().toChars();
  } catch (final MalformedURLException e) {
    // assume we just have the host name
    request.getCoyoteRequest().serverName().recycle();
    chunk = request.getCoyoteRequest().serverName().getCharChunk();
    chunk.recycle();
    chunk.append(host.toString());
    request.getCoyoteRequest().serverName().toChars();
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

final boolean receivedEndOfHeaders() throws ConnectionException {
  if (coyoteRequest.method().isNull() || coyoteRequest.scheme().isNull() ||
      coyoteRequest.requestURI().isNull()) {
    throw new ConnectionException(sm.getString("stream.header.required",
        getConnectionId(), getIdentifier()), Http2Error.PROTOCOL_ERROR);
  }
  // Cookie headers need to be concatenated into a single header
  // See RFC 7540 8.1.2.5
  // Can only do this once the headers are fully received
  if (cookieHeader != null) {
    coyoteRequest.getMimeHeaders().addValue("cookie").setString(cookieHeader.toString());
  }
  return headerState == HEADER_STATE_REGULAR || headerState == HEADER_STATE_PSEUDO;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

final void push(Request request) throws IOException {
  // Can only push when supported and from a peer initiated stream
  if (!isPushSupported() || getIdentifier().intValue() % 2 == 0) {
    return;
  }
  // Set the special HTTP/2 headers
  request.getMimeHeaders().addValue(":method").duplicate(request.method());
  request.getMimeHeaders().addValue(":scheme").duplicate(request.scheme());
  StringBuilder path = new StringBuilder(request.requestURI().toString());
  if (!request.queryString().isNull()) {
    path.append('?');
    path.append(request.queryString().toString());
  }
  request.getMimeHeaders().addValue(":path").setString(path.toString());
  // Authority needs to include the port only if a non-standard port is
  // being used.
  if (!(request.scheme().equals("http") && request.getServerPort() == 80) &&
      !(request.scheme().equals("https") && request.getServerPort() == 443)) {
    request.getMimeHeaders().addValue(":authority").setString(
        request.serverName().getString() + ":" + request.getServerPort());
  } else {
    request.getMimeHeaders().addValue(":authority").duplicate(request.serverName());
  }
  push(handler, request, this);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

pushTarget.scheme().setString(baseRequest.getScheme());

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

if (rewriteRequest.scheme().toString() != null
    && !rewriteRequest.scheme().toString().equals(rewriteScheme)) {
  rewriteScheme = rewriteRequest.scheme().toString();

代码示例来源:origin: org.glassfish.metro/webservices-extra

contentDelimitation = false;
if (sslSupport != null) {
  request.scheme().setString("https");

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

if( isSSL ) {
  req.scheme().setString("https");

相关文章

Request类方法