org.apache.catalina.Context.getSwallowAbortedUploads()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(101)

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

Context.getSwallowAbortedUploads介绍

[英]Returns true if remaining request data will be read (swallowed) even the request violates a data size constraint.
[中]如果剩余的请求数据将被读取(吞没),即使请求违反了数据大小限制,也返回true

代码示例

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

/**
 * Disable swallowing of remaining input if configured
 */
protected void checkSwallowInput() {
  Context context = getContext();
  if (context != null && !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Check the configuration for aborted uploads and if configured to do so,
 * disable the swallowing of any remaining input and close the connection
 * once the response has been written.
 */
protected void checkSwallowInput() {
  Context context = getContext();
  if (context != null && !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Check the configuration for aborted uploads and if configured to do so,
 * disable the swallowing of any remaining input and close the connection
 * once the response has been written.
 */
protected void checkSwallowInput() {
  Context context = getContext();
  if (context != null && !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Disable swallowing of remaining input if configured
 */
protected void checkSwallowInput() {
  Context context = getContext();
  if (context != null && !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Disable swallowing of remaining input if configured
 */
protected void checkSwallowInput() {
  Context context = getContext();
  if (context != null && !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Perform whatever actions are required to flush and close the input
 * stream or reader, in a single operation.
 *
 * @exception IOException if an input/output error occurs
 */
public void finishRequest() throws IOException {
  // Optionally disable swallowing of additional request data.
  Context context = getContext();
  if (context != null &&
      response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE &&
      !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Perform whatever actions are required to flush and close the input
 * stream or reader, in a single operation.
 *
 * @exception IOException if an input/output error occurs
 */
public void finishRequest() throws IOException {
  // Optionally disable swallowing of additional request data.
  Context context = getContext();
  if (context != null &&
      response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE &&
      !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

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

/**
 * Perform whatever actions are required to flush and close the input
 * stream or reader, in a single operation.
 *
 * @exception IOException if an input/output error occurs
 */
public void finishRequest() throws IOException {
  // Optionally disable swallowing of additional request data.
  Context context = getContext();
  if (context != null &&
      response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE &&
      !context.getSwallowAbortedUploads()) {
    coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
  }
}

相关文章

微信公众号

最新文章

更多

Context类方法