bugfix for records sorting

This commit is contained in:
OttoMao 2015-08-12 19:26:29 +08:00
parent ae070c90ab
commit 531f4d0421
5 changed files with 107 additions and 95 deletions

View File

@ -125,7 +125,7 @@ function userRequestHandler(req,userRes){
delete options.headers['accept-encoding']; //avoid gzipped response delete options.headers['accept-encoding']; //avoid gzipped response
}catch(e){} }catch(e){}
//update quest data //update request data
reqData = userRule.replaceRequestData(req,reqData) || reqData; reqData = userRule.replaceRequestData(req,reqData) || reqData;
options.headers = util.lower_keys(options.headers); options.headers = util.lower_keys(options.headers);
options.headers["content-length"] = reqData.length; //rewrite content length info options.headers["content-length"] = reqData.length; //rewrite content length info

View File

@ -1,6 +1,6 @@
{ {
"name": "anyproxy", "name": "anyproxy",
"version": "3.7.3Beta2", "version": "3.7.3Beta3",
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
"main": "proxy.js", "main": "proxy.js",
"bin": { "bin": {

View File

@ -117,7 +117,11 @@ var recorder;
function initRecordSet(){ function initRecordSet(){
$.getJSON("/lastestLog",function(res){ $.getJSON("/lastestLog",function(res){
if(typeof res == "object"){ if(typeof res == "object"){
recordSet = res; res.map(function(item){
if(item.id){
recordSet[item.id] = item;
}
});
eventCenter.dispatchEvent("recordSetUpdated"); eventCenter.dispatchEvent("recordSetUpdated");
} }
}); });

File diff suppressed because one or more lines are too long

View File

@ -117,7 +117,11 @@ var recorder;
function initRecordSet(){ function initRecordSet(){
$.getJSON("/lastestLog",function(res){ $.getJSON("/lastestLog",function(res){
if(typeof res == "object"){ if(typeof res == "object"){
recordSet = res; res.map(function(item){
if(item.id){
recordSet[item.id] = item;
}
});
eventCenter.dispatchEvent("recordSetUpdated"); eventCenter.dispatchEvent("recordSetUpdated");
} }
}); });