Commit e9b872c4 authored by ginuerzh's avatar ginuerzh

change error to code

parent 8ba90995
......@@ -162,7 +162,7 @@ func (h *httpHandler) handleRequest(conn net.Conn, req *http.Request) {
// probing resistance is enabled
if ss := strings.SplitN(h.options.ProbeResist, ":", 2); len(ss) == 2 {
switch ss[0] {
case "error":
case "code":
resp.StatusCode, _ = strconv.Atoi(ss[1])
case "web":
url := ss[1]
......
......@@ -327,7 +327,7 @@ func (h *http2Handler) roundTrip(w http.ResponseWriter, r *http.Request) {
// probing resistance is enabled
if ss := strings.SplitN(h.options.ProbeResist, ":", 2); len(ss) == 2 {
switch ss[0] {
case "error":
case "code":
resp.StatusCode, _ = strconv.Atoi(ss[1])
case "web":
url := ss[1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment