I could not find anything in the RFC docs about whether the User-Agent field needed to be formatted the way it commonly is. For example, could I just do:
User-Agent: Mozilla windows NT
and still pass a valid request?
I could not find anything in the RFC docs about whether the User-Agent field needed to be formatted the way it commonly is. For example, could I just do:
User-Agent: Mozilla windows NT
and still pass a valid request?
On
Sure, you can 'fake' a user agent. Check for yourself with this tool for instance: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
The formal definition of the
User-Agentheader is defined in RFC 2616 Section 14.43 as follows:productis defined in Section 3.8 as follows:tokenandcommentare defined in Section 2.2 as follows:Whitespace is a separator, so to answer your question,
Mozilla windows NTis NOT a valid product by the abovetokendefinition. If you want to follow the spec, you could instead format it more like this:Mozilla (Windows NT).