mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
conv gbk to utf on webInterface
This commit is contained in:
@@ -73,15 +73,16 @@ function Recorder(option){
|
||||
|
||||
if(!id || !info.resBody) return;
|
||||
//add to body map
|
||||
//do not save image data
|
||||
//ignore image data
|
||||
if(/image/.test(info.resHeader['content-type'])){
|
||||
self.recordBodyMap[id] = "(image)";
|
||||
}else{
|
||||
self.recordBodyMap[id] = info.resBody.toString();
|
||||
self.recordBodyMap[id] = info.resBody;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
self.getBody = function(id){
|
||||
if(id < 0){
|
||||
return "";
|
||||
@@ -90,6 +91,10 @@ function Recorder(option){
|
||||
return self.recordBodyMap[id] || "";
|
||||
};
|
||||
|
||||
self.getSingleRecord = function(id,cb){
|
||||
db.find({_id:parseInt(id)},cb);
|
||||
}
|
||||
|
||||
self.getSummaryList = function(cb){
|
||||
db.find({},cb);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user