Issue 337: Extract charset out of the correct key=value pair.

This makes sure that if the content type line contains more than one key=value pair, charset is extracted from the right one.