extract QueryString

This commit is contained in:
斟酌 鵬兄 2015-05-30 20:07:42 +08:00
parent 6661c425be
commit 4b6d913ef9
2 changed files with 8 additions and 3 deletions

View File

@ -38,7 +38,7 @@ var Router = function( http )
this.routeObj = {};
this.reRoute = false;
this.relaying = new RelayPoint( http.request.raw.url );
this.relaying = new RelayPoint( http.request.raw.url.split( "?" )[0] );
};
util.inherits( Router, events.EventEmitter );

View File

@ -75,14 +75,19 @@ Framework.prototype.run = function()
method = "POST";
}
var url = this.HTTP.request.raw.url;
Dragonfly.Info(
( this.HTTP.request.raw.headers[ "x-forwarded-for" ] || this.HTTP.request.remoteAddr ) + " "
+ method + ": " + encodeURI( this.HTTP.request.raw.url )
+ method + ": " + encodeURI( url )
+ " - " + this.HTTP.request.raw.headers["user-agent"]
, Dragonfly.Visibility.VISIBLE
);
if( method == "GET" ) _self.parseResult();
if( method == "GET" )
{
_self.queryStr = url.split( "?" )[1];
_self.parseResult();
}
};
Framework.prototype.addHandler = function( name, method )