/* Store the whole buffer, the parts will be split when belle_sip_multipart_body_handler_progress_cb() is called with transfered size equal to expected size. */
*size-=strlen(MULTIPART_END);/* just in case it will be the end of the message, ask for less characters than possible in order to be able to add the multipart message termination */
*size-=strlen(obj_multipart->boundary)+8;/* just in case it will be the end of the message, ask for less characters than possible in order to be able to add the multipart message termination. 8 is for "\r\n--" and "--\r\n" */
if(current_part->transfered_size==0){/* Nothing transfered yet on this part, include a separator and the header if exists */
size_theadersSize=0;
offsetSize=strlen(MULTIPART_SEPARATOR);
offsetSize=strlen(obj_multipart->boundary)+4;/* 4 is for "--" and "\r\n" */
obj->base.expected_size=strlen(obj->boundary)+8;/* body's length will be part length(including boundary) + multipart end. 8 is for "\r\n--" and "--\r\n" */
obj->base.expected_size+=part->expected_size+strlen(MULTIPART_SEPARATOR);/* add the separator length to the body length as each part start with a separator */
obj->base.expected_size+=part->expected_size+strlen(obj->boundary)+4;/* add the separator length to the body length as each part start with a separator. 4 is for "--" and "\r\n" */
if(part->headers!=NULL){/* there is a declared header for this part, add its length to the expected total length */