Hi all,
I am trying to apply the patch of SLING-213 [1], which conains a rewrite
of the ujax POST servlet. There is just one issue with this patch, which
I would like to sort out on the list. This patch changes the response
behaviour of the POST requests as follows:
* The default response is a status 200 response containing a list of
changes in HTML
format
* Setting the ujax:redirect request parameter to "*" causes a 302
(temporary redirect)
to the modified/created node
* Setting ujax:redirect to an URL causes a 302 (temporary redirect)
to the given URL
This setting collides, with what was intended by SLING-126 [2], where a
redirect to the Referer URL was postulated.
I would now like to resolve this issue of the response to a POST
request. Can you please enlighten me on that front ?
My personal opinion would be to get redirected to the Referer by default
(this is the standard GUI case, probably), with an option to redirect to
a possibly newly created node (ujax:redirect is *) or - in the Ajax case
- get a machine readable response, JSON that is.
WDYT ?
Regards
Felix
[1] http://issues.apache.org/jira/browse/SLING-213
[1] http://issues.apache.org/jira/browse/SLING-126