[Kamailio-Devel] [ openser-Bugs-2135713 ] $(hdr(Foobar)[N]) does not work for N=="*"

SourceForge.net noreply at sourceforge.net
Sun Oct 5 18:33:41 CEST 2008


Bugs item #2135713, was opened at 2008-09-29 12:47
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2135713&group_id=139143

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: core
Group: ver 1.4.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jerome Martin (tramjoe)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: $(hdr(Foobar)[N]) does not work for N=="*"

Initial Comment:
Kamailio documentation states: 

 $(hdr(name)[N]) - represents the body of the N-th header identified by 'name'. If [N] is omitted then the body of the first header is printed. The first header is got when N=0, for the second N=1, a.s.o. To print the last header of that type, use -1, no other negative values are supported now. No white spaces are allowed inside the specifier (before }, before or after {, [, ] symbols). When N='*', all headers of that type are printed. 

Here is a test case to reproduce the bug:

1/ Setup an sipp in UAC mode, with the following test headers :

      Foobar: body1
      Foobar: body2

2/ configure kamailio.cfg to print $(hdr(Foobar)[0]), $(hdr(Foobar)[1]) and $(hdr(Foobar)[*])

3/ result :

[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar 1 is body1 
[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar 2 is body2 
[Sep 29 11:52:21][24006] ERROR:core:pv_get_hdr: local buffer length exceeded 
[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar * is <null> 




----------------------------------------------------------------------

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-10-05 19:33

Message:
Fix committed on SVN.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2135713&group_id=139143



More information about the Devel mailing list