How big can a user agent string get?
HTTP specification does not limit length of headers at all. However web-servers do limit header size they accept, throwing 413 Entity Too Large if it exceeds. Depending on web-server and their settings these limits vary from 4KB to 64KB (total for all headers).