Subject: [Simple][MSRP]How to handle attribute lines with the same flag in SDP?

From: "Xiang Ting" <[email-masked]>
Date: Tue, 11 Apr 2006 22:47:06 +0800

In SIP,multiple header field rows with the same field-name MAY be
present in a message (if the entire field-value for that header field is
defined as a comma-separated list ).
It MUST be possible to combine the multiple header field rows into one
"field-name: field-value" pair.
Implementations MUST be able to process multiple header field rows
with the same name in any combination of the single-value-per-line or
comma-separated value forms.
While in RFC2327 and draft-ietf-simple-message-sessions , there is no
specific rule that defines how should implementations deal with attribute
which can take multiple values separated by space.
e.g.
If the following example appears ,how should implementations treat it?
a=accept-types:message/cpim
a=accept-types:text/plain
There are alternative means now.
One is only accept the first and ignore the others.The other is combining
them into one attribute line spacing these accept-types with a space, as
below:
a=accept-types:message/cpim text/plain

But if the accept-types are the same,e.g.
a=accept-types:message/cpim
a=accept-types:message/cpim
then,how to deal with it ?

Thanks in advance.

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Cullen Jennings <[email-masked]>
Date: Tue, 11 Apr 2006 12:48:34 -0700

Adding Adam....

---

From: Adam Roach <[email-masked]>
Date: Tue, 11 Apr 2006 17:17:05 -0500

>then,how to deal with it ?

I'm not sure about what would be technically 100% correct handling from
a standards perspective.

>From an implementation perspective, I would suggest that you will have
the best luck interoperating if you:

   1. Never send SDP of this form

   2. Treat received multiple "a=accept-types:" lines as a single line
      with multiple values (as you describe above), and

   3. Ignore duplicates (meaning that your final example would result in
      believing the other end supported only "message/cpim").

/a

---

From: 이종필 <[email-masked]>
Date: Wed, 12 Apr 2006 19:17:19 +0900

Hi. Xiang Ting.

I think that is implementation dependant. If not detailed specified in
RFC..
But  I recommend as below.

First...
a=accept-types:message/cpim a=accept-types:text/plain

If UA received this message, then UA have two attribute by parsing  one
line. That is role of SIP  parser. 
If parser didn't support that, that is the problem of parser.

And UA recognize two attribute ,then each attribute attached listed
structure in media field.
After all, UA can use that attribute.

Seciond...
a=accept-types:message/cpim a=accept-types:message/cpim

If UA received this message, then UA have two attribute by parsing one
line, even though exactly same attribute value. This is role of SIP
Parser.
And SIP parser can detect incoming message has two attribute in one
line. That is possible that recognize string such as "  a=" ("blank + a
+ '=').
If SIP parser is genious, no problem.

Third...

Recommandation is below....

Each UA may use above style, each attribute in a line.
But sometimes proxy didn't send above information (two attributes) in
each line. Even though UA SIP Parser have to detect that attributes
each by each.

Commonly UA have a list attributes for one media field. UA can use each
attribute for itself.

I hope will be help/.

JP. 

-----Original Message-----
From: Xiang Ting [mailto:[email-masked]] 
Sent: Tuesday, April 11, 2006 11:47 PM
To: [email-masked]
Cc: [email-masked]; [email-masked]
Subject: [Simple][MSRP]How to handle attribute lines with the same flag
in SDP?

In SIP,multiple header field rows with the same field-name MAY be
present in a message (if the entire field-value for that header field
is defined as a comma-separated list ). It MUST be possible to combine
the multiple header field rows into one
"field-name: field-value" pair.
Implementations MUST be able to process multiple header field rows with
the same name in any combination of the single-value-per-line or comma-
separated value forms. While in RFC2327 and draft-ietf-simple-message-
sessions , there is no specific rule that defines how should
implementations deal with attribute which can take multiple values
separated by space. e.g. If the following example appears ,how should
implementations treat it? a=accept-types:message/cpim a=accept-
types:text/plain There are alternative means now. One is only accept
the first and ignore the others.The other is combining them into one
attribute line spacing these accept-types with a space, as
below:
a=accept-types:message/cpim text/plain

But if the accept-types are the same,e.g. a=accept-types:message/cpim
a=accept-types:message/cpim then,how to deal with it ?

Thanks in advance.

---

From: "Xiang Ting" <[email-masked]>
Date: Wed, 12 Apr 2006 20:36:03 +0800

Thank your for your reply.

> a=accept-types:message/cpim a=accept-types:message/cpim
I do not agree with you about your opinion, According to RFC 2327 the
format of attribute is "a=<flag>: <value>", so if one more "a="
appears in the same line, the parser will take "message/cpim
a=accept-types:message/cpim" as the value of this attribute.

---

From: Paul Kyzivat <[email-masked]>
Date: Wed, 12 Apr 2006 09:14:55 -0400

>       believing the other end supported only "message/cpim").

SDP-new doesn't address this. And given the range of ways in which 
attributes are used, I don't think a single approach works for all.

- repeats are important for some attributes (e.g. rtpmap)

- repeats are meaningless for others (e.g. sendonly)

- repeats are problematic for some others (e.g. desired-status)

IMO this ought to be specified on an attribute-by-attribute basis. Of 
course it currently isn't. Is it too late to get some words about this 
into draft-ietf-simple-message-sessions? (I would suggest that a 
specification state that this attribute MUST NOT appear more than once 
per stream. Best practices can deal with the case where this is violated.)

	Paul

---

From: Ben Campbell <[email-masked]>
Date: Wed, 12 Apr 2006 08:24:30 -0500

On Apr 12, 2006, at 8:14 AM, Paul Kyzivat wrote:

> IMO this ought to be specified on an attribute-by-attribute basis.  
> Of course it currently isn't. Is it too late to get some words  
> about this into draft-ietf-simple-message-sessions? (I would  
> suggest that a specification state that this attribute MUST NOT  
> appear more than once per stream. Best practices can deal with the  
> case where this is violated.)

I was writing up a similar comment, but you beat me to it. I agree  
that the meaning of repeated SDP a-line attributes is attribute  
specific. In the case of MSRP, the meaning of this is undefined. Just  
as in programming, if it is undefined, you shouldn't do it :-)

Also, the original posting in this thread seemed to conflate the  
ability to repeat SIP headers with an expectation of the same feature  
in SDP.  SDP attributes and SIP headers follow different syntax  
rules. One should not assume that the existence of a syntax feature  
in one implies anything about the other.

Ben.

---

From: 이종필 <[email-masked]>
Date: Thu, 13 Apr 2006 19:11:35 +0900

Thank you for your comment.

About your comment for second item

Your opinion is below..

I do not agree with you about your opinion, According to RFC 2327 the
format of attribute is "a=<flag>: <value>", so if one more "a=" appears
in the same line, the parser will take "message/cpim a=accept-
types:message/cpim" as the value of this attribute.

Of course RFC defined as above your comment. right.
I mean even though UA received above message, UA have to recognize that
line has two attributes.
Commonly UA SIP parser will have like this, as your comment.
<flag> = a
<value> = message/cpim
<flag> = a
<value> = accept-types:message/cpim

In my experience, I have to apply as my comment. I have been wxperience
commercial service in Japan with SIP Proxy Server. 

RFC is RFC.. Field is Field.

JP.

-----Original Message-----
From: Xiang Ting [mailto:[email-masked]] 
Sent: Wednesday, April 12, 2006 9:36 PM 
To: 이종필
Cc: [email-masked]; [email-masked]; [email-masked]
Subject: Re: [Simple][MSRP]How to handle attribute lines with the same
flag in SDP?

On 4/12/06, 이종필 <[email-masked]> wrote:
> RFC.. But  I recommend as below.
>
> First...
> If UA received this message, then UA have two attribute by parsing  
> one line. That is role of SIP  parser. If parser didn't support that, 
> that is the problem of parser.
>
> structure in media field. After all, UA can use that attribute.
>
> Seciond...
I do not agree with you about your opinion, According to RFC 2327 the
format of attribute is "a=<flag>: <value>", so if one more "a=" appears
in the same line, the parser will take "message/cpim a=accept-
types:message/cpim" as the value of this attribute.

> Parser. And SIP parser can detect incoming message has two attribute 
> in one line. That is possible that recognize string such as "  a=" 
> ("blank + a
> + '=').
> Commonly UA have a list attributes for one media field. UA can use 
> each attribute for itself.
>
> I hope will be help/.
>
> JP.
>
> Subject: [Simple][MSRP]How to handle attribute lines with the same 
> flag in SDP?
>
>
> comma- separated value forms. While in RFC2327 and 
> draft-ietf-simple-message- sessions , there is no specific rule that 
> defines how should implementations deal with attribute which can take 
> multiple values separated by space. e.g. If the following example 
> appears ,how should implementations treat it? 
> a=accept-types:message/cpim a=accept- types:text/plain There are 
> alternative means now. One is only accept the first and ignore the 
> others.The other is combining them into one attribute line spacing 
> these accept-types with a space, as
> below: