AFAIU 202 should not be sent when request is already processed.
[1] clearly states that 202 is for a situation like, "The request has been
accepted for processing, but the processing has not been completed. The
request might or might not eventually be acted upon, as it might be
disallowed when processing actually takes place. There is no facility for
re-sending a status code from an asynchronous operation such as this."

So I think if the request is successfully fulfilled and there is no entity
body 204 should be sent.


[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Thanks,
Manuri

On Tue, Jun 28, 2016 at 6:03 PM, Madhawa Gunasekara <[email protected]>
wrote:

> Hi Niranjan,
>
> Yes, but the point is that, we can use accepted status code for the
> requests which has been accepted for processing, but the processing has not
> been completed [1]. This works for asynchronous requests.
>
> But when it comes synchronous requests, we send the response after
> processing is completed. so AFAIU, we can't use accepted status code for
> those kind of scenarios.
>
> [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>
> Thanks,
> Madhawa
>
>
>
> On Tue, Jun 28, 2016 at 5:34 PM, Niranjan Karunanandham <[email protected]
> > wrote:
>
>> Hi Madhawa,
>>
>> AFAIK, even 202 can have with and without body.
>>
>> Regards,
>> Nira
>>
>> On Tue, Jun 28, 2016 at 4:52 PM, Madhawa Gunasekara <[email protected]>
>> wrote:
>>
>>> Hi All,
>>>
>>> We set 202 (Accepted) status code for the response when there isn't
>>> content message body. but AFAIU We have to set 204 (No Content) for
>>> successful responses where there isn't a content message body [1].
>>>
>>> This issue is reported in [2].
>>>
>>> Highly appreciated your thoughts on this.
>>>
>>> [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>>> [2] https://wso2.org/jira/browse/DS-886
>>>
>>> Thanks,
>>> Madhawa
>>>
>>> --
>>> *Madhawa Gunasekara*
>>> Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 719411002 <+94+719411002>
>>> blog: *http://madhawa-gunasekara.blogspot.com
>>> <http://madhawa-gunasekara.blogspot.com>*
>>> linkedin: *http://lk.linkedin.com/in/mgunasekara
>>> <http://lk.linkedin.com/in/mgunasekara>*
>>>
>>
>>
>>
>> --
>>
>>
>> *Niranjan Karunanandham*
>> Associate Technical Lead - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>
>
>
> --
> *Madhawa Gunasekara*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 719411002 <+94+719411002>
> blog: *http://madhawa-gunasekara.blogspot.com
> <http://madhawa-gunasekara.blogspot.com>*
> linkedin: *http://lk.linkedin.com/in/mgunasekara
> <http://lk.linkedin.com/in/mgunasekara>*
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

*Blog: http://manuriamayaperera.blogspot.com
<http://manuriamayaperera.blogspot.com>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to