Trim spaces in language() function

Currently, a header such as `Accept-Language: da, en-gb;q=0.8, en;q=0.7` is not correctly parsed, although it is valid.