From c38719be0be236a371fb5e0c980fdce84d15c64b Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Sat, 29 Jun 2024 00:18:55 +0800 Subject: [PATCH] Throw `StackOverflowError` when GSP view not exists Don't return cached `UrlMappingInfo` in the `UrlMappingsHandlerMapping` Related commit: cbef5639 Closes gh-379 --- .../grails/web/mapping/mvc/UrlMappingsHandlerMapping.groovy | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/grace-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMapping.groovy b/grace-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMapping.groovy index a124ca58b7..6e726ba430 100644 --- a/grace-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMapping.groovy +++ b/grace-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMapping.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2014-2023 the original author or authors. + * Copyright 2014-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -122,11 +122,7 @@ class UrlMappingsHandlerMapping extends AbstractHandlerMapping { @Override protected Object getHandlerInternal(HttpServletRequest request) throws Exception { - Object matchedInfo = request.getAttribute(MATCHED_REQUEST) Object errorStatus = request.getAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE) - if (matchedInfo != null && errorStatus == null) { - return matchedInfo - } String uri = urlHelper.getPathWithinApplication(request) GrailsWebRequest webRequest = GrailsWebRequest.lookup(request)