You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2021/01/19 17:12:00 UTC

[jira] [Closed] (SLING-10006) Parameter ":sendError" presence should not replace the PostResponse object

     [ https://issues.apache.org/jira/browse/SLING-10006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Munteanu closed SLING-10006.
-----------------------------------

> 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
>            Priority: Major
>             Fix For: Servlets POST 2.4.2
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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 success response instead of HTML:
>  
> {code:java}
> curl -i -H "Accept: application/json" -F:sendError="true" -F:nameHint="test" -Ftext="some body text content" http://admin:admin@localhost:8080/content
> {code}
>  



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