HTTP Header Length
Posted: Wed Aug 13, 2008 3:55 pm
I've been hunting around google for the last 30 or so minutes and coming up empty handed.
Is there a max length on the HTTP User Agent header?
If I want to store this info in my database and use it as a tool to verify a session, how long does my database field need to be? I've got it set to a varchar(96) currently, but not sure if that is sufficient. Obviously, checking the user agent against whats stored in the DB will fail if the user agent is greater than 96 characters.
I could take a substr() of the clients user agent for comparison, but I dont believe that to be the best solution.
I've been looking at the HTTP RFC on w3.org. If you've got a better source, or I missed it in the doc, please let me know.
Is there a max length on the HTTP User Agent header?
If I want to store this info in my database and use it as a tool to verify a session, how long does my database field need to be? I've got it set to a varchar(96) currently, but not sure if that is sufficient. Obviously, checking the user agent against whats stored in the DB will fail if the user agent is greater than 96 characters.
I could take a substr() of the clients user agent for comparison, but I dont believe that to be the best solution.
I've been looking at the HTTP RFC on w3.org. If you've got a better source, or I missed it in the doc, please let me know.