aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2015-05-19 13:04:19 +0300
committerDamian Minkov <damencho@jitsi.org>2015-05-19 13:04:19 +0300
commit8454a22f04fbfc8e19c37e2d4bbf3315e3528094 (patch)
treed49b9e814fe9fc61c0d0e71f0516543da33725d1 /src/net/java/sip/communicator/impl
parent8a18fc3d27ee90df35e37c59e84f16b3696200d9 (diff)
downloadjitsi-8454a22f04fbfc8e19c37e2d4bbf3315e3528094.zip
jitsi-8454a22f04fbfc8e19c37e2d4bbf3315e3528094.tar.gz
jitsi-8454a22f04fbfc8e19c37e2d4bbf3315e3528094.tar.bz2
Makes possible overriding original headers through custom one.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java12
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)
{