Hi Jeremie,

Jeremie Le Hen wrote:

Hi Bogdan-Andrei,

thank your for your quick and clear answer.

On Tue, Sep 26, 2006 at 11:05:09PM +0300, Bogdan-Andrei Iancu wrote:
append_hf() adds an hdr to a request and not to a reply - see docs (textops module). For you purpose, use append_to_reply() in failure_route.

I admit I have neglected to look closely at the documentation, but
in my humble opinion, the name is misleading.  It sounds as a general
way to append a header field, without suggesting it only work for
a request.  I guess there is an historical reason for this,

yes, that is right

but
what is the technival reason for not making it work for the replies ?
you need separate functions for adding to request and adding to reply. For example you process a request and you want to add a header to 1) the current processed request or 2) to the reply that will be sent for this request.

Furthermore, the append_hf() function is described as being usable
in REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE and BRANCH_ROUTE ?
If it does naught on replies, what's the point of using it in
ONREPLY_ROUTE and FAILURE_ROUTE ?
well...it is a bit complicate to explain here....is not quite a doc error: actually append_hf() adds a header to the current process message which can be
   1) request in REQUEST_ROUTE, FAILURE_ROUTE and BRANCH_ROUTE
   2) reply in ONREPLY_ROUTE

append_to_reply() will set the header to be appended to all replies generated locally.

regards,
bogdan

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to