After login, the corresponding 302 status code of the web server,When grequests continues to make requests, the “test” header in the HTTP request header repeats
http requests
GET /aaa/index.php HTTP/1.1
Host: 192.168.95.4
User-Agent: GRequests/0.10
Content-Type: application/x-www-form-urlencoded
Content-Type: application/x-www-form-urlencoded
Cookie: security=high; PHPSESSID=90949a1f57fa20a9e948f589e17a6786
Referer: http://192.168.95.4/aaa/login.php
Test: test
Test: test
Accept-Encoding: gzip, deflate
Connection: close
The reason is that the function "addRedirectFunctionality" in the utils. go file uses req. Header. Add (k, v) ,
Modified to req. Header.Set (k, v) resolves the problem of duplication of HTTP request headers
After login, the corresponding 302 status code of the web server,When grequests continues to make requests, the “test” header in the HTTP request header repeats http requests
The reason is that the function "addRedirectFunctionality" in the utils. go file uses req. Header. Add (k, v) , Modified to req. Header.Set (k, v) resolves the problem of duplication of HTTP request headers
My English is very poor