diff options
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java b/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java index 97e0633..d613ddc 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java @@ -147,7 +147,17 @@ public class ConfigHeaders headerValues.get(ACC_PROPERTY_CONFIG_HEADER_VALUE), request); - request.addHeader(new CustomHeaderList(name, value)); + Header h = request.getHeader(name); + + // makes possible overriding already created headers which + // are not custom one + if(h != null && !(h instanceof CustomHeader)) + { + request.setHeader(protocolProvider.getHeaderFactory() + .createHeader(name, value)); + } + else + request.addHeader(new CustomHeaderList(name, value)); } catch(Exception e) { |