Grails: Mapping to response codes, impossible to change http status code
Posted
by Kimble
on Stack Overflow
See other posts from Stack Overflow
or by Kimble
Published on 2010-03-25T21:02:54Z
Indexed on
2010/03/26
9:33 UTC
Read the original article
Hit count: 354
grails
"404" (controller: 'error', action: 'pageNotFound')
Any changes to response.status inside the pageNotFound action is reverted back to 404 before the response is sent to the client. Is it possible to work around this some way? I would like to be able to change it to 410 when I detect that the resource has been deleted or 301 when it's moved permanently.
© Stack Overflow or respective owner