>> If you just leave the IP address alone, but tweak the port, you'll
>> need to tweak the port *back* on the response, or risk rejection by
>> the next downstream host.
>
>  Well, only to interoperate with you, but we'll assume that other
>stacks perform the same sanity check for the sake of argument. :)

Now, stop that. It's not just us; this isn't something we pulled 
out of thin air.  Check the bis-01 draft, section 6.46.3:

    "1.   The first Via header field should indicate the proxy or
          client processing this response. If it does not, discard
          the message."

This provision has been in SIP since the earliest drafts. I just
checked, and a description of this same handling (albeit in a slightly
less clear form) appears in the November 1997 draft (-04) of SIP. I 
suspect that many, if not most, implementations will perform this 
check -- because they have been told to do so by the specification.

>  You write beautiful code.  However, your code also demonstrates
>another reason why I wanted to avoid doing this.  Your code doesn't take
>into account line folding, and will also kill the entire line of the
>topmost via, even if it's a comma-separated list.

Oh, boy! A more complicated state machine! Perhaps even two!
This should be fun.  Ok, I'll let you write this set. :)

My point is that this *can* be an inexpensive operation.

-- 
Adam Roach, Ericsson Inc. |  Ph: +1 972 583 7594 | 1010 E. Arapaho, MS L-04 
[EMAIL PROTECTED]   | Fax: +1 972 669 0154 | Richardson, TX 75081 USA

Reply via email to