Comparing version 0.2.17 to 0.2.18
@@ -86,4 +86,10 @@ 'use strict' | ||
} catch (err) { | ||
debug.enabled && debug('-> failed to decode body: %s', err.toString()) | ||
return callback(err, resp) | ||
debug.enabled && debug('-> failed to decode body: %s, fallback to utf-8', err.toString()) | ||
charset = 'utf-8' | ||
try { | ||
resp.body = _decodeBody(resp.body, charset) | ||
} catch (err) { | ||
debug.enabled && debug('-> failed to decode body with utf-8: %s', err.toString()) | ||
return callback(err, resp) | ||
} | ||
} | ||
@@ -90,0 +96,0 @@ } |
{ | ||
"name": "req-fast", | ||
"version": "0.2.17", | ||
"version": "0.2.18", | ||
"description": "This module is designed to be the fast, lightweight way to fetch the web content(HTML stream).", | ||
@@ -5,0 +5,0 @@ "main": "lib/req.js", |
41007
668
10