move response data from memory to local cache file

This commit is contained in:
OttoMao
2015-10-24 23:37:43 +08:00
parent 31daeebdd5
commit cfc817cb1f
13 changed files with 248 additions and 60 deletions

View File

@@ -24,6 +24,7 @@ function userRequestHandler(req,userRes){
in http server : http://www.example.com/a/b/c
in https server : /a/b/c
*/
var host = req.headers.host,
protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http",
fullUrl = protocol === "http" ? req.url : (protocol + '://' + host + req.url),
@@ -33,6 +34,9 @@ function userRequestHandler(req,userRes){
resourceInfoId = -1,
reqData;
// console.log(req.url);
// console.log(path);
//record
resourceInfo = {
host : host,