Just tested this. setting ":status" to "standard" still resulted in a 200 OK
response.
-mike
On Wed, Mar 31, 2010 at 9:01 AM, Michael Yin wrote:
> I will try setting :status to "standard" and see what happens. However,
> currently I have not set it at all.
>
> -mike
>
>
> On Wed, Mar 31, 2010 at 4:46 AM, Alexander Klimetschek
> wrote:
>
>> On Wed, Mar 31, 2010 at 03:06, Michael Yin wrote:
>> > I would argue that errors should be given an appropriate response. Most
>> of
>> > the other actions that I've seen return appropriate error responses,
>> such as
>> > doing xpath searches with improper syntax returns a 500 or when a
>> resource
>> > isn't found, returning a 404. You can still output HTML with a non-200
>> > response. Otherwise it just seems inconsistent.
>>
>> By default, http error codes should be set. This behavior can be
>> controlled via the ":status" parameter.
>>
>>
>> http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet%2528servlets.post%2529-%257B%257B%253Astatus%257D%257D
>>
>> The reason for having 200's in some cases is when using ajax/iframe
>> requests from browsers, where non-200 responses might get lost.
>>
>> Regards,
>> Alex
>>
>> --
>> Alexander Klimetschek
>> alexander.klimetsc...@day.com
>>
>
>