log.log(Level.FINEST, "Via header transport: " +
ttToUse.getIP()+":"+ttToUse.getPort()+" Transport="+
ttToUse.getProtocol().name());
}
ViaImpl v = new ViaImpl(req.getProtocol(),
req.getTransport().toUpperCase(), ttToUse.getIP(),
ttToUse.getPort());
String id = Transaction.generateBranch();
v.setParameter(ViaImpl.PARAM_BRANCH, id);
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "Adding via = " + v);
}
String string_via = v.toString();
if (req.getHeader("VIA_NEXTHOP_PARAMETERS") != null) {
// special handling for applications that wants to affect the future via
String via_nexthop_parameters = req.getHeader("VIA_NEXTHOP_PARAMETERS");
req.removeHeader("VIA_NEXTHOP_PARAMETERS"); // we should never keep this header when request is sent
string_via += ';'+ via_nexthop_parameters; // plain String concatenation, knowledge & responsiblity is of application