You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by ma...@apache.org on 2021/11/07 10:53:21 UTC

[dubbo-go-pixiu] 15/21: style:import name

This is an automated email from the ASF dual-hosted git repository.

mark4z pushed a commit to branch 0.4.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu.git

commit 280675fa00c40faf3089ef9a36900e596f483e31
Author: baerwang <17...@qq.com>
AuthorDate: Mon Oct 25 14:08:50 2021 +0800

    style:import name
    
    Former-commit-id: 1f9529fe9a9c58d1fb2a0d571f5335064d68ca91
---
 pkg/filter/csrf/csrf.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkg/filter/csrf/csrf.go b/pkg/filter/csrf/csrf.go
index 69d7358..8e3130a 100644
--- a/pkg/filter/csrf/csrf.go
+++ b/pkg/filter/csrf/csrf.go
@@ -21,7 +21,7 @@ import (
 	"encoding/base64"
 	"encoding/json"
 	"fmt"
-	http2 "net/http"
+	stdHttp "net/http"
 )
 
 import (
@@ -92,7 +92,7 @@ func (f *Filter) handleCsrf(ctx *http.HttpContext) {
 
 	if salt == "" {
 		bt, _ := json.Marshal(http.ErrResponse{Message: f.cfg.ErrorMsg})
-		ctx.WriteJSONWithStatus(http2.StatusForbidden, bt)
+		ctx.WriteJSONWithStatus(stdHttp.StatusForbidden, bt)
 		ctx.Abort()
 		return
 	}
@@ -101,7 +101,7 @@ func (f *Filter) handleCsrf(ctx *http.HttpContext) {
 
 	if token != tokenGetter(ctx, f.cfg.Key) {
 		bt, _ := json.Marshal(http.ErrResponse{Message: f.cfg.ErrorMsg})
-		ctx.WriteJSONWithStatus(http2.StatusForbidden, bt)
+		ctx.WriteJSONWithStatus(stdHttp.StatusForbidden, bt)
 		ctx.Abort()
 		return
 	}