[OpenSIPS-Devel] [ opensips-Patches-3591017 ] Remove headers by wildcard
SourceForge.net
noreply at sourceforge.net
Thu Dec 13 13:52:43 CET 2012
Patches item #3591017, was opened at 2012-11-29 05:13
Message generated for change (Comment added) made by ratner2
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3591017&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Remove headers by wildcard
Initial Comment:
changes sipmsgops.c.
uses fnmatch() to remove headers by wildcard.
usage example:
remove_hf_wc("P-hint*"); // removes all headers that start with P-hint
remove_hf_wc("*orig-ip*"); //removes all headers that that have orig-ip in their name
----------------------------------------------------------------------
Comment By: bratner (ratner2)
Date: 2012-12-13 04:52
Message:
on afterthought it is funny to use wc as suffix. I will thing of a better
one. I chose to use filebased wildcards for 2 reasons.
1. It does what i need ( X-Custom-1, X-Custom-userdata, X-Custom-watever
removed by 'X-Custom*' )
2. I assumed it will be faster and less memory consuming then any regexp.
On the other hand I would love to make remove_hf_regex as well.
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-12-07 02:54
Message:
Hi,
First, I would suggest changing a bit the name of the function - having the
"wc" token is not the most fortunate choice :)
Secondly, I see you use file-name like wildcard - what about a more generic
approach and using regexp ?
Regards,
Bogdan
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2012-11-29 05:26
Message:
attached a patch agains opensips_1_8 as well as trunk
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2012-11-29 05:14
Message:
by bratner : ratner2 at gmail.com
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3591017&group_id=232389
More information about the Devel
mailing list