[OpenSIPS-Devel] [ opensips-Patches-3597436 ] remove_hf expanded to	use glob or regex to match headers
    SourceForge.net 
    noreply at sourceforge.net
       
    Wed Dec 19 11:55:54 CET 2012
    
    
  
Patches item #3597436, was opened at 2012-12-19 02:55
Message generated for change (Tracker Item Submitted) made by ratner2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3597436&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: bratner (ratner2)
Assigned to: Nobody/Anonymous (nobody)
Summary: remove_hf expanded to use glob or regex to match headers
Initial Comment:
This patch depricates my previous submission: Remove headers by wildcard - ID: 3591017
As wdoekes suggested i added a 2 parameter version of remove_hf() to handle regex or glob. 
I also used a trick used from t_relay() to evaluate the second parameter while in fixup for the first. 
remove_hf("^X-g.+[0-9]", "r"); #removes headers by regex
remove_hf("X-*", "g"); # removes headers by glob 
Glob should be faster. 
Doesn't dynamically allocate any mem thus should not cause leaks. 
Being new at this i welcome any feedback.  ratner2 at gmail.com
----------------------------------------------------------------------
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3597436&group_id=232389
    
    
More information about the Devel
mailing list