本文整理了Java中org.apache.catalina.connector.Connector.getMaxPostSize()
方法的一些代码示例,展示了Connector.getMaxPostSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.getMaxPostSize()
方法的具体详情如下:
包路径:org.apache.catalina.connector.Connector
类名称:Connector
方法名:getMaxPostSize
[英]Return the maximum size of a POST which will be automatically parsed by the container.
[中]返回将由容器自动分析的帖子的最大大小。
代码示例来源:origin: SonarSource/sonarqube
@Test
public void test_max_post_size_for_http_connection() {
Properties properties = new Properties();
Props props = new Props(properties);
TomcatConnectors.configure(tomcat, props);
verify(tomcat.getService()).addConnector(argThat(c -> c.getMaxPostSize() == -1));
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
public int getMaxPostSize() {
int value = connector.getMaxPostSize();
return value == 0 ? 2097152 : value;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
public int getMaxPostSize() {
int value = connector.getMaxPostSize();
return value == 0 ? 2097152 : value;
}
代码示例来源:origin: org.glassfish.web/web-glue
return null;
int maxPostSize = ((Connector) connector).getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
throw new IllegalStateException(
代码示例来源:origin: jboss.web/jbossweb
/**
* Read chunked post body.
*/
protected byte[] readChunkedPostBody() throws IOException {
ByteChunk body = new ByteChunk();
byte[] buffer = new byte[CACHED_POST_LEN];
int len = 0;
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
// Too much data
throw new IllegalArgumentException(
sm.getString("coyoteRequest.postTooLarge"));
}
if (len > 0) {
body.append(buffer, 0, len);
}
}
if (body.getLength() < body.getBuffer().length) {
int length = body.getLength();
byte[] result = new byte[length];
System.arraycopy(body.getBuffer(), 0, result, 0, length);
return result;
} else {
return body.getBuffer();
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: codefollower/Tomcat-Research
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.jboss.web/jbossweb
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() >= 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() >= 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: tomcat/catalina
int maxPostSize = connector.getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
context.getLogger().info
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
if(getContext().getAllowCasualMultipartParsing()) {
mce = new MultipartConfigElement(null,
connector.getMaxPostSize(),
connector.getMaxPostSize(),
connector.getMaxPostSize());
} else {
parts = Collections.emptyList();
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
if(getContext().getAllowCasualMultipartParsing()) {
mce = new MultipartConfigElement(null,
connector.getMaxPostSize(),
connector.getMaxPostSize(),
connector.getMaxPostSize());
} else {
parts = Collections.emptyList();
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
if(getContext().getAllowCasualMultipartParsing()) {
mce = new MultipartConfigElement(null,
connector.getMaxPostSize(),
connector.getMaxPostSize(),
connector.getMaxPostSize());
} else {
parts = Collections.emptyList();
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* 2444 */ int maxPostSize = this.connector.getMaxPostSize();
/* 2445 */ if ((maxPostSize > 0) && (len > maxPostSize)) {
/* 2446 */ if (this.context.getLogger().isDebugEnabled()) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
int maxPostSize = connector.getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
if (context.getLogger().isDebugEnabled()) {
内容来源于网络,如有侵权,请联系作者删除!