Skip to main content

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

  • From: "jonbo372 (JIRA)" < >
  • To:
  • Subject: [JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.
  • Date: Tue, 25 Feb 2014 18:14:49 +0000 (UTC)
  • Auto-submitted: auto-generated


    [ 
https://java.net/jira/browse/SIPSERVLET_SPEC-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=373421#action_373421
 ] 

jonbo372 commented on SIPSERVLET_SPEC-32:
-----------------------------------------

Per our discussion on the weekly meeting, we do agree that a clarification is 
needed since there are at least two different opinions of what the current 
wording in the javadoc actually means.

=== Option 1  ===
If you supply an empty list for a particular header, then that header will be 
removed. This is what the original entry suggests.

=== Option 2 ===
If you supply an empty list for a particular header then the original headers 
and their values are preserved.

Also, if you prefer Option 2, please specify what should happen in the 
following example:

Incoming request with three X-Hello headers like so:

INVITE 
sip:
 SIP/2.0
...
X-Hello: hello one
X-Hello: hello two
X-Hello: hello three
...

Map<String, List<String>> headerMap = ...
List<String> helloHeaders = new ArrayList<String>();
helloHeaders.add("hello world");
headerMap.put("X-Hello", helloHeaders);
SipServletRequest req = helper.createRequest(origRequest, linked, headerMap);

How many X-Hello headers exists in the new request and what are their values?

Please vote which option you prefer so that we can clarify the behavior in 
the javadoc and align the behavior of the containers.

> It is not 100% clear in the documentation whether an empty list for a 
> particular header in B2BuaHelper.createRequest(..., headerMap) will clear 
> that header out.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SIPSERVLET_SPEC-32
>                 URL: https://java.net/jira/browse/SIPSERVLET_SPEC-32
>             Project: sipservlet-spec
>          Issue Type: Improvement
>            Reporter: jonbo372
>            Assignee: binod
>
> By using the  B2BuaHelper.createRequest(..., headerMap) the user can create 
> a new "b2bua:ed" request where system headers such as Route-headers can be 
> overridden. However, the documentation is not really clear what the 
> behavior is when you supply an empty value-list for a particular header. 
> Consider the following example:
> Incoming INVITE which has two route headers like so:
> INVITE 
> sip:
>  SIP/2.0
> ...
> Route: <route 1>
> Route: <route 2>
> If I wanted to use the b2buahelper to create the second leg but do not want 
> to the Route headers to be present in the new request one could assume that 
> the following would work:
> Map<String, List<String>> headerMap = ...
> headerMap.put("Route", new ArrayList<String>());
> SipServletRequest req = helper.createRequest(origRequest, linked, 
> headerMap);
> I would now assume that the previous two routes have been wiped out. It is 
> not clear in the specification that this is what is supposed to happen and 
> at least one container implementation had not implemented it this way.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

jonbo372 (JIRA) 02/25/2014

<Possible follow-up(s)>

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

jonbo372 (JIRA) 02/25/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

echeung (JIRA) 02/25/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

jverbil (JIRA) 02/25/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

wchen (JIRA) 02/26/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

nitzann (JIRA) 02/26/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

bpulito (JIRA) 02/26/2014

[JIRA] Commented: (SIPSERVLET_SPEC-32) It is not 100% clear in the documentation whether an empty list for a particular header in B2BuaHelper.createRequest(..., headerMap) will clear that header out.

jonbo372 (JIRA) 02/26/2014
 
 
Close
loading
Please Confirm
Close