>>I think the double quotes are allowed in the Reason Phrase.
>>
>>Reason-Phrase   =  *(reserved / unreserved / escaped
>>                 / UTF8-NONASCII / UTF8-CONT / SP / HTAB)


I don't think they are allowed.
They are only allowed if escaped - so they're not allowed "naked".

      reserved    =  ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+"
                     / "$" / ","
      unreserved  =  alphanum / mark
      mark        =  "-" / "_" / "." / "!" / "~" / "*" / "'"
                     / "(" / ")"

single quotes are allowed.

There are lots of fields where implementations could be more tolerant
but it is not up to implementors to try to think of every
"idiotic but tolerable" combination.

People often quote "be liberal with what you receive and strict with
what you send".
Well that's really nice but the strict part is the most important.
So, to me, this means that people should try hard to not send rubbish.

The only time you have to be liberal with what you receive is
when everyone has made the same mistake (which can happen because
specs aren't always really clear) or because ratified standards
are too complicated or have taken too long.

But in this case, neither is true.  So best follow the standard
or risk interop problems.


 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Aaron Clauson
Sent: 09 June 2010 11:53
To: [email protected]
Subject: Re: [Sip-implementors] regarding Reason-Phrase

> -----Original Message-----
> From: [email protected] [mailto:sip- 
> [email protected]] On Behalf Of Harbhanu
> Sent: Wednesday, 9 June 2010 8:11 PM
> To: 'Alex Balashov'
> Cc: [email protected]
> Subject: Re: [Sip-implementors] regarding Reason-Phrase
> 
> I absolutely agree to your point, but here we need to decide its 
> handling incase we get this format from network
> 
> Would it be reasonable to ignore/drop a response *just because* the 
> Reason-Phrase is a quoted string?
> How do other commercial or widely used stacks handles this?

I think the double quotes are allowed in the Reason Phrase.

Reason-Phrase   =  *(reserved / unreserved / escaped
                   / UTF8-NONASCII / UTF8-CONT / SP / HTAB)

In either case you'd be better off accepting them as it's an
informational field only and doesn't affect the processing of the
response. The Status Code is the definitive field for the response type,
the Reason Phrase is meant for users and is arbitrary.

Aaron

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to