Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions http/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@
<version>1.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.wrappers</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ public void doFilter(final ServletRequest request, final ServletResponse respons
requestInfo,
null,
pr.handler.getServletInfo().isAsyncSupported(),
multipartConfig,
pr.handler.getMultipartSecurityContext());
multipartConfig);
}
final FilterHandler[] filterHandlers = handlerRegistry.getFilters(pr, req.getDispatcherType(), pr.requestURI);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.http.base.internal.dispatch;

import java.io.IOException;

/**
* This exception is thrown if a request contains more files than the specified
* limit.
*/
public class FileCountLimitExceededException extends IOException {

private static final long serialVersionUID = 6904179610227521789L;

/**
* The limit that was exceeded.
*/
private final long limit;

/**
* Creates a new instance.
*
* @param message The detail message
* @param limit The limit that was exceeded
*/
public FileCountLimitExceededException(final String message, final long limit) {
super(message);
this.limit = limit;
}

/**
* Gets the limit that was exceeded.
*
* @return The limit that was exceeded by the request
*/
public long getLimit() {
return limit;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import java.util.Objects;

import org.apache.commons.fileupload.disk.DiskFileItemFactory;

public final class MultipartConfig
{
public static final MultipartConfig DEFAULT_CONFIG = new MultipartConfig(null, null, -1, -1, -1);
Expand Down Expand Up @@ -63,7 +61,7 @@ public MultipartConfig(final Integer threshold,
}
else
{
this.multipartThreshold = DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD;
this.multipartThreshold = 10240;
}
this.multipartLocation = location;
if ( maxFileSize > 0 || maxFileSize == -1 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ public void forward(ServletRequest request, ServletResponse response) throws Ser
this.requestInfo,
DispatcherType.FORWARD,
this.resolution.handler.getServletInfo().isAsyncSupported(),
multipartConfig,
this.resolution.handler.getMultipartSecurityContext());
multipartConfig);
}
final String requestURI = UriUtils.concat(this.requestInfo.servletPath, this.requestInfo.pathInfo);
final FilterHandler[] filterHandlers = this.resolution.handlerRegistry.getFilterHandlers(this.resolution.handler, DispatcherType.FORWARD, requestURI);
Expand Down Expand Up @@ -129,8 +128,7 @@ public void include(ServletRequest request, ServletResponse response) throws Ser
this.requestInfo,
DispatcherType.INCLUDE,
this.resolution.handler.getServletInfo().isAsyncSupported(),
multipartConfig,
this.resolution.handler.getMultipartSecurityContext());
multipartConfig);

}

Expand Down
Loading
Loading