@henningw commented on this pull request.
> + del_offset = body->display.s - msg->buf;
+ del_len = body->display.len;
+ /* extend backward to include all spaces before display
*/
+ p = body->display.s - 1;
+ while(p >= msg->buf && isspace(*p)) {
+ del_offset--;
+ del_len++;
+ p--;
+ }
+ /* extend forward to include all spaces after display */
+ p = body->display.s + body->display.len;
+ } else {
+ /* no existing display - check spaces after colon
+ * hdr->name is "To"/"From" without ':', skip past it */
+ del_offset = (hdr->name.s + hdr->name.len + 1) -
msg->buf;
+ p = hdr->name.s + hdr->name.len + 1;
Thanks for the feedback. Yes, I think its valid in SIP to have additional
spaces between header name and ":". We spend some time thinking about it this
afternoon. Its quite complicated and even the current PR version does not cover
all "easy" cases.
Xenofon will probably fix the reported issue (additional second whitespace)
first, possible also for the stable branches. And then we can investigate how
to solve it in a more general way in git master. Maybe we should just keep it
like it is. If somebody needs to have a complete header cleanup, this is
probably more a job of a B2BUA.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4586#discussion_r2795476915
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4586/review/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!