jdaugherty commented on code in PR #14092:
URL: https://github.com/apache/grails-core/pull/14092#discussion_r2019794885


##########
grails-web-url-mappings/src/main/groovy/grails/web/mapping/ResponseRedirector.groovy:
##########
@@ -126,7 +127,15 @@ class ResponseRedirector {
         }
 
         String redirectUrl = useJessionId ? 
response.encodeRedirectURL(redirectURI) : redirectURI
-        int status = permanent ? HttpServletResponse.SC_MOVED_PERMANENTLY : 
HttpServletResponse.SC_MOVED_TEMPORARILY
+
+        // Update to use arguments instead of request attributes
+        boolean temporary = Boolean.TRUE == arguments.get(ARGUMENT_TEMPORARY)
+        int status
+        if (permanent) {
+            status = temporary ? HttpServletResponse.SC_PERMANENT_REDIRECT : 
HttpServletResponse.SC_MOVED_PERMANENTLY 

Review Comment:
   Instead of the name temporary, wouldn't 'moved' be a better name?  Where 
permanent decides between temporary/ permanent and moved decides between the 
MOVED value or not.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to