# HG changeset patch # User Emmanuel Gil Peyrot # Date 1310818070 -7200 # Node ID 46c42ec52680adbd80de23d8f2e2d23a44df1bb5 # Parent e4916f1763e57426ecbec6435977852cebc4035e Fix the MIME type and encoding of gravatar avatars. diff --git a/avatar.js b/avatar.js --- a/avatar.js +++ b/avatar.js @@ -123,8 +123,7 @@ if (config.useGravatar) if (r.statusCode != 200) return svgError(res, message + ' Additionaly, no gravatar available.'); - res.writeHead(200, r.headers['Content-Type']); - r.setEncoding('utf8'); + res.writeHead(200, {'Content-Type': r.headers['content-type']}); r.on('data', function(chunk) { res.write(chunk); });