@ -119,12 +120,12 @@ public class PathResourceResolver extends AbstractResourceResolver {
@@ -119,12 +120,12 @@ public class PathResourceResolver extends AbstractResourceResolver {
@ -200,7 +201,8 @@ public class PathResourceResolver extends AbstractResourceResolver {
@@ -200,7 +201,8 @@ public class PathResourceResolver extends AbstractResourceResolver {
@ -69,9 +69,8 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
@@ -69,9 +69,8 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
if(uriVars!=null){
uriVars.forEach((name,value)->{
if(mpvs.contains(name)){
if(logger.isWarnEnabled()){
logger.warn("Skipping URI variable '"+name+
"' because request contains bind value with same name.");
if(logger.isDebugEnabled()){
logger.debug("URI variable '"+name+"' overridden by request bind value.");
@ -189,11 +190,12 @@ public class PathResourceResolver extends AbstractResourceResolver {
@@ -189,11 +190,12 @@ public class PathResourceResolver extends AbstractResourceResolver {
returnresource;
}
elseif(logger.isWarnEnabled()){
Resource[]allowedLocations=getAllowedLocations();
logger.warn("Resource path \""+resourcePath+"\" was successfully resolved "+
"but resource \""+resource.getURL()+"\" is neither under the "+
"current location \""+location.getURL()+"\" nor under any of the "+
"Resource path \""+resourcePath+"\" was successfully resolved "+
"but resource \""+resource.getURL()+"\" is neither under "+
"the current location \""+location.getURL()+"\" nor under any of "+
"the allowed locations "+(allowed!=null?Arrays.asList(allowed):"[]"),-1,true));
}
}
returnnull;
@ -296,7 +298,8 @@ public class PathResourceResolver extends AbstractResourceResolver {
@@ -296,7 +298,8 @@ public class PathResourceResolver extends AbstractResourceResolver {
@ -729,7 +730,8 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
@@ -729,7 +730,8 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
logger.warn("Path with \"WEB-INF\" or \"META-INF\": ["+path+"]");
logger.warn(LogFormatUtils.formatValue(
"Path with \"WEB-INF\" or \"META-INF\": ["+path+"]",-1,true));
}
returntrue;
}
@ -737,14 +739,16 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
@@ -737,14 +739,16 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
@ -291,7 +292,8 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
@@ -291,7 +292,8 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
logger.error("Handshake failed due to invalid Upgrade header: "+request.getHeaders().getUpgrade());
logger.error(LogFormatUtils.formatValue(
"Handshake failed due to invalid Upgrade header: "+request.getHeaders().getUpgrade(),-1,true));
}
response.setStatusCode(HttpStatus.BAD_REQUEST);
response.getBody().write("Can \"Upgrade\" only to \"WebSocket\".".getBytes(StandardCharsets.UTF_8));
@ -299,7 +301,8 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
@@ -299,7 +301,8 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
logger.error("Handshake failed due to invalid Connection header "+request.getHeaders().getConnection());
logger.error(LogFormatUtils.formatValue(
"Handshake failed due to invalid Connection header"+request.getHeaders().getConnection(),-1,true));
}
response.setStatusCode(HttpStatus.BAD_REQUEST);
response.getBody().write("\"Connection\" must be \"upgrade\".".getBytes(StandardCharsets.UTF_8));
@ -323,8 +326,9 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
@@ -323,8 +326,9 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
@ -234,7 +235,7 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
@@ -234,7 +235,7 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
logger.warn("Unknown transport type for "+request.getURI());
logger.warn(LogFormatUtils.formatValue("Unknown transport type for "+request.getURI(),-1,true));
}
response.setStatusCode(HttpStatus.NOT_FOUND);
return;
@ -243,7 +244,7 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
@@ -243,7 +244,7 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem