SPR-8678 Use the lookup path to determine the media type by file name.

This commit is contained in:
Rossen Stoyanchev
2011-09-13 09:16:42 +00:00
parent 2799e710bc
commit de504fa613
2 changed files with 12 additions and 1 deletions

View File

@@ -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) {