简体   繁体   中英

Is the following sintax rfc 3261 compatible?

could you please tell me if the following syntax is compatible with rfc3261? Thanks.

401 Unauthorized:

Digest realm="movistar.tel",\r\n   nonce="35e21fba60422a1f2D6a1fde23235c885d287d50e45fd49d56a354",\r\n   algorithm=MD5,\r\n   qop="auth"

or should be

Digest realm="movistar.tel",nonce="35e21fba60422a1f2D6a1fde23235c885d287d50e45fd49d56a354",algorithm=MD5,qop="auth"

I'm trying to analyze using "https://github.com/nygge/abnfc/blob/master/samples/sip/rfc3261.abnf" without success.

Please, can you help me to understand this?. Sorry my bad english. Thanks.

The rule is defined in section 25.1 of rfc3261

In most place CRLF can be added for readability. Make sur at least a WSP is located right after this CRLF. This helps to differentiate new headers from LWS when parsing.

SIP header field values can be folded onto multiple lines if the
continuation line begins with a space or horizontal tab.  All linear
white space, including folding, has the same semantics as SP.  A
recipient MAY replace any linear white space with a single SP before
interpreting the field value or forwarding the message downstream.
This is intended to behave exactly as HTTP/1.1 as described in RFC
2616 [8].  The SWS construct is used when linear white space is
optional, generally between tokens and separators.

   LWS  =  [*WSP CRLF] 1*WSP ; linear whitespace
   SWS  =  [LWS] ; sep whitespace

CONCLUSION: both lines seems to be valid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM