Quote
Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/3;FBCR/&#20013-&#33775-&#38651-&#20449-;FBID/phone;FBLC/zh_TW;FBOP

WOW! - My god, thats a lot of additional garbage. IMHO, stuff that has no business being in the user agent header.
A lot of garbage in that user agent. The useful stuff is towards the beginning.

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.

Googling this topic, i found a few results that mention webservers generally truncate over 200 chars by default. And with a reference to this this *cough*cough* very old IE7 UA specification tech article:
https://docs.microsoft.com/en-us/pr...ternet-explorer-7/bb496341(v=technet.10)

Apparently Apache limits the maximum field length to 8k:
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize

IIS is 16K by default, iirc.

Since I did not write that script and haven't revisited it for anything other than page presentation and to parse IPv6 vars, I will take a peek in to it again and see how large the database field allows, and truncate anything to just before that value. Im going to take a wile guess and assume that its set to 200 chars. Your posted UA example is 257 chars.

thank you.

Last edited by isaac; 05/07/2019 3:26 AM. Reason: clarity. spelling. add links.

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com