File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ func TestClientPublicIP(t *testing.T) {
188188 r := & http.Request {Header : http.Header {}}
189189 r .Header .Set ("X-Real-IP" , " 10.10.10.10 " )
190190 r .Header .Set ("X-Forwarded-For" , " 172.17.40.152, 192.168.5.45" )
191- r .RemoteAddr = " 40.40.40.40:42123 "
191+ r .RemoteAddr = "40.40.40.40:42123 "
192192
193193 if ip := ClientPublicIP (r ); ip != "40.40.40.40" {
194194 t .Errorf ("actual:40.40.40.40, expected:%s" , ip )
@@ -201,7 +201,7 @@ func TestClientPublicIP(t *testing.T) {
201201
202202 r .Header .Del ("X-Real-IP" )
203203 r .Header .Del ("X-Forwarded-For" )
204- r .RemoteAddr = " 127.0.0.1:42123 "
204+ r .RemoteAddr = "127.0.0.1:42123 "
205205 if ip := ClientPublicIP (r ); ip != "" {
206206 t .Errorf ("ip: 127.0.0.1" )
207207 }
You can’t perform that action at this time.
0 commit comments