[OpenSER-Devel] [ openser-Bugs-1786666 ] [textops] "append_hf" with "remove_hf" don't work

SourceForge.net noreply at sourceforge.net
Tue Sep 4 09:47:00 CEST 2007


Bugs item #1786666, was opened at 2007-09-02 18:17
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1786666&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: modules
>Group: ver devel
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: [textops] "append_hf" with "remove_hf" don't work

Initial Comment:
OpenSer 1.2.2.

This bug/wish only would make sense if report #1786664 works. Anyway I tell it:

If I had a header and remove it (during the same process) finally that header is just added:

  append_hf("New-Header: Yes\r\n");
  remove_hf("New-Header");

After the message is sent it has that header, but it is expected not to contain it.

I know that the header operations are made after the routing has finished, but somewhere the logic to apply is stored, and this logic could be improved in order not to add a header if it has been removed during the same route process.

If this bug wouuld fix/improved and #1786664 too, then I could do things like:

  append_hf("New-Branch: Yes\r\n");
  append_branch();
  remove_hf("New-Branch");

So just the new branch would have the header, but not the original branch.

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

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-09-04 10:47

Message:
Logged In: YES 
user_id=1246013
Originator: NO

This does not work -- it is a known "feature" of openser. remove_hf()
works on original message, while append_hf() adds a diff (lump) to a list,
which is applied to original message just before forwarding the request.
So, on other words, after append_hf() you won't see the new header in the
message with is_present_hf().

The solution is to set an avp or flags, use them to test, and add the
header only when you are sure it should be added.

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

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



More information about the Devel mailing list