[sr-dev] [kamailio/kamailio] filter_body() fails when there isn't a space after "Content-Type:" (#2748)

duarterocha91 notifications at github.com
Thu May 27 13:17:44 CEST 2021


I've made some testing and found that filter_body() fails when body is something like "Content-Type:application\/sdp\r\n\r\n".

If i use this correction to add a space the filter works correctly : 

   replace_body_all("Content-Type:application\/sdp\r\n\r\n","Content-Type: application/sdp\r\n\r\n");
	
    #Makes the changes to the message persistent, returns 1 if sucessful, 0 if it fails
    if(msg_apply_changes())
    {
        xnotice("Kamailio_Log : reply_route : Changes to message applied"); 
    }

I looked into the textops.c and found this line which i think might be the problem : 

while (find_line_start("Content-Type: ", 14, &start, &len))

If more info is needed please let me know.

Cheers

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2748
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210527/ecccc836/attachment.htm>


More information about the sr-dev mailing list