From a5895af1132b52c4886a568349f7cd5c5ece2d4e Mon Sep 17 00:00:00 2001 From: hoteas Date: Wed, 14 Nov 2018 16:10:41 +0000 Subject: [PATCH] --- .idea/workspace.xml | 28 ++++++++++++++++++---------- application.go | 8 ++++++-- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5c0df5c..cac36f4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,12 +4,8 @@ - - - + - - - @@ -692,6 +698,7 @@ + @@ -738,7 +745,8 @@ - diff --git a/application.go b/application.go index aea543d..8dcd786 100644 --- a/application.go +++ b/application.go @@ -266,6 +266,11 @@ func (this *Application) handler(w http.ResponseWriter, req *http.Request) { //header默认设置 header := w.Header() header.Set("Content-Type", "text/html; charset=utf-8") + + //url去掉参数并序列化 + context.HandlerStr, context.RouterString = this.urlSer(context.HandlerStr) + + //访问拦截true继续false暂停 connectListenerLen := len(this.connectListener) if connectListenerLen != 0 { @@ -278,8 +283,7 @@ func (this *Application) handler(w http.ResponseWriter, req *http.Request) { } } } - o, s = this.urlSer(context.HandlerStr) - context.RouterString = s + //接口服务 //if len(s) == 3 { // //如果满足规则则路由到对应控制器去