Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit fa58438

Browse files
committed
Remove some development code
1 parent 72bd95b commit fa58438

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

cgi.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,6 @@ func match(requestStr string, patterns []string) (ok bool, prefixStr, suffixStr
5757
return
5858
}
5959

60-
// func match(reqStr, patternStr string) (ok bool, prefixStr, suffixStr string) {
61-
// var str, last string
62-
// var err error
63-
// str = reqStr
64-
// last = ""
65-
// for last != str && !ok && err == nil {
66-
// ok, err = path.Match(patternStr, str)
67-
// if err == nil {
68-
// if !ok {
69-
// last = str
70-
// str = filepath.Dir(str)
71-
// }
72-
// }
73-
// }
74-
// if ok && err == nil {
75-
// return true, str, reqStr[len(str):]
76-
// }
77-
// return false, "", ""
78-
// }
79-
8060
// excluded returns true if the request string (reqStr) matches any of the
8161
// pattern strings (patterns), false otherwise. patterns use glob notation; see
8262
// path/Match for matching details. If the pattern is invalid (for example,
@@ -140,8 +120,6 @@ func setupCall(h handlerType, rule ruleType, lfStr, rtStr string,
140120
func (h handlerType) ServeHTTP(w http.ResponseWriter, r *http.Request) (code int, err error) {
141121
rep := httpserver.NewReplacer(r, nil, "")
142122
for _, rule := range h.rules {
143-
// for _, matchStr := range rule.matches {
144-
// ok, lfStr, rtStr := match(r.URL.Path, matchStr)
145123
ok, lfStr, rtStr := match(r.URL.Path, rule.matches)
146124
if ok {
147125
ok = !excluded(r.URL.Path, rule.exceptions)
@@ -159,7 +137,6 @@ func (h handlerType) ServeHTTP(w http.ResponseWriter, r *http.Request) (code int
159137
return
160138
}
161139
}
162-
// }
163140
}
164141
return h.next.ServeHTTP(w, r)
165142
}

0 commit comments

Comments
 (0)