1
0
mirror of https://github.com/alibaba/anyproxy.git synced 2025-05-10 14:58:27 +00:00

update some comment for req.url

This commit is contained in:
OttoMao 2015-09-03 10:51:17 +08:00
parent 6b89a0b9d7
commit 9fc48d5e36

@ -18,7 +18,12 @@ var defaultRule = require("./rule_default.js"),
userRule = defaultRule; //init
function userRequestHandler(req,userRes){
/*
note
req.url is wired
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),
@ -418,10 +423,3 @@ module.exports.userRequestHandler = userRequestHandler;
module.exports.connectReqHandler = connectReqHandler;
module.exports.setRules = setRules;
module.exports.getRuleSummary = getRuleSummary;
/*
note
req.url is wired
in http server : http://www.example.com/a/b/c
in https server : /a/b/c
*/