From: Scott Lawrence <[EMAIL PROTECTED]>

   On Thu, 2007-08-23 at 19:46 +0800, Agarwal Manish-A19715 wrote:
   > User-Agent header has its own grammar. However this header does not have
   > much semantic significance other than display. May I know your views on
   > if User-Agent header value has some deviations (like a LWS is missing
   > etc ) from grammar.
   > Can the deviations be accepted? or we must strictly follow the grammar.
   > Any inputs on how other servers/clients handle this would be great.

   "Be conservative in what you send, and liberal in what you accept"

To flesh this out -- Of course, your code should generate a correct
User-Agent any time that it does so.  But since your code does not
need to understand the User-Agent header in order to process the
message, there is no reason to attempt to parse it and enforce the
grammar.  However, if you wanted to do so, you could check the syntax
of the header, and if it is faulty, provide a warning-type message in
hope that someone will report the fact to the maker of the software
that produced the header.

sipX follows this rule for User-Agent.  It also parses and enforces
the grammar for the From and To headers, though at least for the
proxy, it has no need to understand those headers.

As a practical matter, any user agent you write should produce a
User-Agent header that clearly identifies your code and the specific
version of the code.  That way, when someone discovers that your user
agent is misbehaving, he can tell you exactly which version of the
code is causing the problem.

Here is an example of sipX's User-Agent header:

        User-Agent: sipX/3.6.2 sipX/registry (Linux)

showing that it is the 3.6.2 version, generated by the "registry"
component, running on a Linux platform.

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

Reply via email to