mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: can't upload container #843
This commit is contained in:
parent
9b5916daf3
commit
6a59f50b96
@ -336,7 +336,6 @@ public class ContainerService {
|
||||
sb.append("WARN: there exists multi version container now, please redeploy to fix this problem").append(System.lineSeparator());
|
||||
}
|
||||
|
||||
sb.append("divisive version ==> ").append(System.lineSeparator());
|
||||
version2DeployedContainerInfoList.asMap().forEach((version, deployedContainerInfos) -> {
|
||||
sb.append("[version] ").append(version).append(System.lineSeparator());
|
||||
deployedContainerInfos.forEach(deployedContainerInfo -> sb.append(String.format("Address: %s, DeployedTime: %s", deployedContainerInfo.getWorkerAddress(), CommonUtils.formatTime(deployedContainerInfo.getDeployedTime()))).append(System.lineSeparator()));
|
||||
|
@ -29,10 +29,18 @@ public class CachingRequestBodyFilter implements Filter {
|
||||
*/
|
||||
private static final Set<String> IGNORE_CONTENT_TYPES = Sets.newHashSet("application/x-www-form-urlencoded", "multipart/form-data");
|
||||
|
||||
private static final Set<String> IGNORE_URIS = Sets.newHashSet("/container/jarUpload");
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||
throws IOException, ServletException {
|
||||
if (request instanceof HttpServletRequest) {
|
||||
String uri = ((HttpServletRequest) request).getRequestURI();
|
||||
// 忽略 jar 上传等处理路径
|
||||
if (IGNORE_URIS.contains(uri)) {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
String contentType = request.getContentType();
|
||||
if (contentType != null && !IGNORE_CONTENT_TYPES.contains(contentType)) {
|
||||
CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper((HttpServletRequest) request);
|
||||
|
Loading…
x
Reference in New Issue
Block a user