mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 20:59:07 +00:00
SPR-8678 Use the lookup path to determine the media type by file name.
This commit is contained in:
+1
-1
@@ -314,7 +314,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
|
||||
*/
|
||||
protected List<MediaType> getMediaTypes(HttpServletRequest request) {
|
||||
if (this.favorPathExtension) {
|
||||
String requestUri = urlPathHelper.getRequestUri(request);
|
||||
String requestUri = urlPathHelper.getLookupPathForRequest(request);
|
||||
String filename = WebUtils.extractFullFilenameFromUrlPath(requestUri);
|
||||
MediaType mediaType = getMediaTypeFromFilename(filename);
|
||||
if (mediaType != null) {
|
||||
|
||||
Reference in New Issue
Block a user