From 225edd231710701e9a785349b66e53558771a973 Mon Sep 17 00:00:00 2001 From: OttoMao Date: Thu, 19 Nov 2015 14:03:40 +0800 Subject: [PATCH] bugfix for web gui --- CHANGELOG | 4 ++++ lib/recorder.js | 4 +++- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0cfcaab..ef3007b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +19 Nov: AnyProxy 3.8.1: + + * bugfix for image content in web GUI + 16 Nov: AnyProxy 3.8.0: * optimize the memory strategy diff --git a/lib/recorder.js b/lib/recorder.js index 29fe21e..06100b3 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -152,11 +152,13 @@ function Recorder(option){ } result.type = "text"; result.content = bodyContent.toString(); - }else if(imageMatch){ + }else if(imageMatch && /image/i.test(imageMatch)){ result.type = "image"; result.mime = imageMatch; result.content = bodyContent; + }else{ + result.content = bodyContent.toString(); } }catch(e){} diff --git a/package.json b/package.json index 67d03aa..1ba7793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anyproxy", - "version": "3.8.0", + "version": "3.8.1", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "main": "proxy.js", "bin": {