aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2015-05-04 15:39:50 +0300
committerDamian Minkov <damencho@jitsi.org>2015-05-04 15:39:50 +0300
commitf46a0bfdf2686b4c703710df80ce381e3896627d (patch)
tree96b8d68c520bd404e88129693faeace9293c0304 /src/net/java/sip/communicator/impl
parentd6cf5521bd739538e23e533d31c9e2aaedacde8b (diff)
downloadjitsi-f46a0bfdf2686b4c703710df80ce381e3896627d.zip
jitsi-f46a0bfdf2686b4c703710df80ce381e3896627d.tar.gz
jitsi-f46a0bfdf2686b4c703710df80ce381e3896627d.tar.bz2
Combines use of custom header for list values and the factory for rest of the cases.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java27
1 files changed, 20 insertions, 7 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 0044211..c24e0ca 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ConfigHeaders.java
@@ -142,13 +142,26 @@ public class ConfigHeaders
try
{
-
- Header customHeader = new CustomHeader(
- headerValues.get(ACC_PROPERTY_CONFIG_HEADER_NAME),
- processParams(
- headerValues.get(ACC_PROPERTY_CONFIG_HEADER_VALUE),
- request)
- );
+ String name = headerValues.get(ACC_PROPERTY_CONFIG_HEADER_NAME);
+ String value = processParams(
+ headerValues.get(ACC_PROPERTY_CONFIG_HEADER_VALUE),
+ request);
+
+ Header customHeader;
+
+ // use the custom header for those custom headers that has
+ // multiple values, as the factory will switch on the header
+ // parser for standard headers and will produce multiple headers
+ // that ends with an error creating/sending the request
+ if(value.contains(","))
+ {
+ customHeader = new CustomHeader(name, value);
+ }
+ else
+ {
+ customHeader = protocolProvider.getHeaderFactory()
+ .createHeader(name, value);
+ }
request.setHeader(customHeader);
}