MCPcopy Create free account
hub / github.com/zalando/skipper / ServeHTTP

Method ServeHTTP

net/query.go:26–31  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

24}
25
26func (q *ValidateQueryLogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
27 if err := validateQuery(r.URL.RawQuery); err != nil {
28 log.Infof("Invalid query: %s -> %s %s %s", r.RemoteAddr, r.Host, r.URL.Path, r.Method)
29 }
30 q.Handler.ServeHTTP(w, r)
31}
32
33func validateQuery(s string) error {
34 _, err := url.ParseQuery(s)

Callers 1

TestQueryLogHandlerFunction · 0.95

Calls 3

validateQueryFunction · 0.85
InfofMethod · 0.65
ServeHTTPMethod · 0.45

Tested by 1

TestQueryLogHandlerFunction · 0.76