Details
Description
When I send a GET request with an empty body to my grails 1.3.7
controller by using the .json file extension (eg
http://localhost:8080/myapp/mycontroller/myaction.json) I get a
request parsing exception and it seems that grails is trying to parse
my empty body to JSON. If I send the same request to the same action
but without the .json extension, I don't have any error.
It would make sense not to try to parse the request body for GET, HEAD and DELETE.
The same should apply to empty request bodies for PUT and POST, although it won't happen that often.
Issue Links
- relates to
-
GRAILS-10150
Git rid of JSONParsingParameterCreationListener and XMLParsingParameterCreationListener
-
I'm unable to replicate this issue with Grails 2.2. I do not receive any exceptions accessing actions via GET with .json extensions and empty body, but rather is just executes the action. Can you please validate this is no longer an issue in newer versions of Grails? Please let me know.