49
49
import org .springframework .core .io .ClassPathResource ;
50
50
import org .springframework .core .io .support .PropertiesLoaderUtils ;
51
51
import org .springframework .core .log .LogFormatUtils ;
52
- import org .springframework .http .HttpMethod ;
53
52
import org .springframework .http .MediaType ;
54
53
import org .springframework .http .server .RequestPath ;
55
54
import org .springframework .http .server .ServletServerHttpRequest ;
56
55
import org .springframework .util .ClassUtils ;
57
56
import org .springframework .util .StringUtils ;
58
57
import org .springframework .web .context .WebApplicationContext ;
59
- import org .springframework .web .context .request .ServletWebRequest ;
60
58
import org .springframework .web .context .request .async .WebAsyncManager ;
61
59
import org .springframework .web .context .request .async .WebAsyncUtils ;
62
60
import org .springframework .web .multipart .MultipartException ;
@@ -933,7 +931,6 @@ else if (isEnableLoggingRequestDetails()) {
933
931
* @param response current HTTP response
934
932
* @throws Exception in case of any kind of processing failure
935
933
*/
936
- @ SuppressWarnings ("deprecation" )
937
934
protected void doDispatch (HttpServletRequest request , HttpServletResponse response ) throws Exception {
938
935
HttpServletRequest processedRequest = request ;
939
936
HandlerExecutionChain mappedHandler = null ;
@@ -956,24 +953,12 @@ protected void doDispatch(HttpServletRequest request, HttpServletResponse respon
956
953
return ;
957
954
}
958
955
959
- // Determine handler adapter for the current request.
960
- HandlerAdapter ha = getHandlerAdapter (mappedHandler .getHandler ());
961
-
962
- // Process last-modified header, if supported by the handler.
963
- String method = request .getMethod ();
964
- boolean isGet = HttpMethod .GET .matches (method );
965
- if (isGet || HttpMethod .HEAD .matches (method )) {
966
- long lastModified = ha .getLastModified (request , mappedHandler .getHandler ());
967
- if (new ServletWebRequest (request , response ).checkNotModified (lastModified ) && isGet ) {
968
- return ;
969
- }
970
- }
971
-
972
956
if (!mappedHandler .applyPreHandle (processedRequest , response )) {
973
957
return ;
974
958
}
975
959
976
- // Actually invoke the handler.
960
+ // Determine handler adapter and invoke the handler.
961
+ HandlerAdapter ha = getHandlerAdapter (mappedHandler .getHandler ());
977
962
mv = ha .handle (processedRequest , response , mappedHandler .getHandler ());
978
963
979
964
if (asyncManager .isConcurrentHandlingStarted ()) {
0 commit comments