@ -49,6 +49,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
@@ -49,6 +49,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.core.io.ClassPathResource ;
import org.springframework.core.io.support.PropertiesLoaderUtils ;
import org.springframework.core.log.LogFormatUtils ;
import org.springframework.http.HttpMethod ;
import org.springframework.http.server.RequestPath ;
import org.springframework.http.server.ServletServerHttpRequest ;
import org.springframework.lang.Nullable ;
@ -1046,8 +1047,8 @@ public class DispatcherServlet extends FrameworkServlet {
@@ -1046,8 +1047,8 @@ public class DispatcherServlet extends FrameworkServlet {
// Process last-modified header, if supported by the handler.
String method = request . getMethod ( ) ;
boolean isGet = "GET" . equal s( method ) ;
if ( isGet | | "HEAD" . equal s( method ) ) {
boolean isGet = HttpMethod . GET . matche s( method ) ;
if ( isGet | | HttpMethod . HEAD . matche s( method ) ) {
long lastModified = ha . getLastModified ( request , mappedHandler . getHandler ( ) ) ;
if ( new ServletWebRequest ( request , response ) . checkNotModified ( lastModified ) & & isGet ) {
return ;