When a slow responding server receives a NON type request,
it is sending back an ACK message immediately, and then later,
sending NON response. According to RFC-7252, response of NON request
should only be a NON, there should not be any ACK in between.
Change-Id: I0b00c2423660d622df8490bf03011d18a1c26126
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7385
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
requestResult = HandleStackRequests (&serverRequest);
// Send ACK to client as precursor to slow response
- if(requestResult == OC_STACK_SLOW_RESOURCE)
+ if (requestResult == OC_STACK_SLOW_RESOURCE && requestInfo->info.type == CA_MSG_CONFIRM)
{
SendDirectStackResponse(endPoint, requestInfo->info.messageId, CA_EMPTY,
- CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL);
+ CA_MSG_ACKNOWLEDGE,0, NULL, NULL, 0, NULL);
}
else if(requestResult != OC_STACK_OK)
{