Commit 4d5de406 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Make sure the Content-Length and Content-Type headers are removed when...

Make sure the Content-Length and Content-Type headers are removed when removing the body of a message.
parent 1cd097a0
......@@ -521,6 +521,11 @@ void belle_sip_message_set_body_handler(belle_sip_message_t *msg, belle_sip_body
belle_sip_message_add_header(BELLE_SIP_MESSAGE(msg), BELLE_SIP_HEADER(header->data));
}
}
} else {
belle_sip_header_content_length_t *content_length_header = belle_sip_message_get_header_by_type(msg, belle_sip_header_content_length_t);
belle_sip_header_content_type_t *content_type_header = belle_sip_message_get_header_by_type(msg, belle_sip_header_content_type_t);
if (content_length_header != NULL) belle_sip_message_remove_header_from_ptr(msg, BELLE_SIP_HEADER(content_length_header));
if (content_type_header != NULL) belle_sip_message_remove_header_from_ptr(msg, BELLE_SIP_HEADER(content_type_header));
}
SET_OBJECT_PROPERTY(msg,body_handler,body_handler);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment