dubeejw commented on issue #2591: User-Agent CLI/version header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#issuecomment-326173228
 
 
   ```
   Syntax of a product token
   
   The product identifier is described in the spec as
   
        product         = token["/' product-version]
        product-version = token
    
   This is fairly self explanatory except for the fact that we have no idea 
what the syntax of a token is! If you dig around you will find that token is 
defined in httpbis part1 as,
   
           token     = 1*tchar 
   
   Having fun yet?  So a token is one or more tchars.  A tchar is defined as,
   
        tchar     = "!" / "#" / "$" / "%" / "&" / "'" / "*"
                       / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
                       / DIGIT / ALPHA
                       ; any VCHAR, except delimiters
   
   The terms DIGIT, ALPHA and VCHAR are defined in yet another IETF spec here, 
but what are these delimiters that we are not allowed to use?  The delimiters 
that are not allowed to appear in a token are defined as:
   
    (DQUOTE and "(),/:;<=>?@[\]{}")
   For those of you still paying attention, you may be saying, but I see 
semi-colons in user agent strings all the time.  That is because they are in 
the comment not in the product token.  The ?comment? has a different set of 
syntax rules.  The following is valid example of user-agent that is full of 
special characters,
   
   user-agent: foo&bar-product!/1.0a$*+ (a;comment,full=of/delimiters@{fun})
   
   ```
   
   http://bizcoder.com/the-much-maligned-user-agent-header
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to