Changed way to get charset from response

Obtaining charset through getattr instead of accessing it directly

Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Signed-off-by: Alexandre Almeida <alexandreab@live.com>
That won't work. The last attribute of getattr should be the fallback.