Eric Norman created SLING-10006:
-----------------------------------

             Summary: Parameter ":sendError" presence should not replace the 
PostResponse object
                 Key: SLING-10006
                 URL: https://issues.apache.org/jira/browse/SLING-10006
             Project: Sling
          Issue Type: Bug
            Reporter: Eric Norman
            Assignee: Eric Norman
             Fix For: Servlets POST 2.3.38


The PostResponseWithErrorHandling implementation is hardcoded to an 
HtmlResponse when the ":sendError" parameter is "true".  This breaks the use 
cases where a Json response is expected.  It also breaks the use case where a 
custom PostResponseCreator component needs to do something different without 
changing the error handling behavior.

For example, this request should return a JSON error response instead of HTML:

 
{code:java}
curl -i -H "Accept: application/json" -F:sendError="true" -F:nameHint="test" 
-Ftext="some body text content" http://localhost:8080/content
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to