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

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

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

Request.scheme介绍

暂无

代码示例

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

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

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

  1. /**
  2. * @return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. public String getScheme() {
  5. return (coyoteRequest.scheme().toString());
  6. }

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

  1. /**
  2. * @return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /* */ public String getScheme()
  2. /* */ {
  3. /* 1296 */ return this.coyoteRequest.scheme().toString();
  4. /* */ }
  5. /* */

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. public String getScheme() {
  5. return (coyoteRequest.scheme().toString());
  6. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. public String getScheme() {
  5. return (coyoteRequest.scheme().toString());
  6. }

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

  1. /**
  2. * Return the scheme used to make this Request.
  3. */
  4. @Override
  5. public String getScheme() {
  6. return coyoteRequest.scheme().toString();
  7. }

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

  1. private void setHost(final Request request, final CharSequence host) throws IOException {
  2. CharChunk chunk;
  3. try {
  4. // slightly fancier logic..
  5. final URL newUrl = new URL(host.toString());
  6. final String protocol = newUrl.getProtocol();
  7. final int port = newUrl.getPort();
  8. final String newHost = newUrl.getHost();
  9. request.getCoyoteRequest().serverName().recycle();
  10. chunk = request.getCoyoteRequest().serverName().getCharChunk();
  11. chunk.recycle();
  12. chunk.append(newHost);
  13. request.getCoyoteRequest().serverName().toChars();
  14. request.getCoyoteRequest().setServerPort(port);
  15. request.getCoyoteRequest().scheme().recycle();
  16. chunk = request.getCoyoteRequest().scheme().getCharChunk();
  17. chunk.recycle();
  18. chunk.append(protocol);
  19. request.getCoyoteRequest().scheme().toChars();
  20. } catch (final MalformedURLException e) {
  21. // assume we just have the host name
  22. request.getCoyoteRequest().serverName().recycle();
  23. chunk = request.getCoyoteRequest().serverName().getCharChunk();
  24. chunk.recycle();
  25. chunk.append(host.toString());
  26. request.getCoyoteRequest().serverName().toChars();
  27. }
  28. }

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

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

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

  1. final void push(Request request) throws IOException {
  2. // Can only push when supported and from a peer initiated stream
  3. if (!isPushSupported() || getIdentifier().intValue() % 2 == 0) {
  4. return;
  5. }
  6. // Set the special HTTP/2 headers
  7. request.getMimeHeaders().addValue(":method").duplicate(request.method());
  8. request.getMimeHeaders().addValue(":scheme").duplicate(request.scheme());
  9. StringBuilder path = new StringBuilder(request.requestURI().toString());
  10. if (!request.queryString().isNull()) {
  11. path.append('?');
  12. path.append(request.queryString().toString());
  13. }
  14. request.getMimeHeaders().addValue(":path").setString(path.toString());
  15. // Authority needs to include the port only if a non-standard port is
  16. // being used.
  17. if (!(request.scheme().equals("http") && request.getServerPort() == 80) &&
  18. !(request.scheme().equals("https") && request.getServerPort() == 443)) {
  19. request.getMimeHeaders().addValue(":authority").setString(
  20. request.serverName().getString() + ":" + request.getServerPort());
  21. } else {
  22. request.getMimeHeaders().addValue(":authority").duplicate(request.serverName());
  23. }
  24. push(handler, request, this);
  25. }

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

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

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

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

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

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

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

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

相关文章

Request类方法