From e63404a368f838eb1da18a8c70c709a8ab1035de Mon Sep 17 00:00:00 2001 From: Darren Hurley Date: Mon, 23 Mar 2015 17:00:23 +0000 Subject: [PATCH] less greedy charset matching --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index ce1bfeb..1c109d3 100644 --- a/lib/response.js +++ b/lib/response.js @@ -115,7 +115,7 @@ Response.prototype._convert = function(encoding) { // header if (this.headers.has('content-type')) { - res = /charset=(.*)/i.exec(this.headers.get('content-type')); + res = /charset=([^;]*)/i.exec(this.headers.get('content-type')); } // no charset in content type, peek at response body