(w http.ResponseWriter, r *http.Request)
| 12 | } |
| 13 | |
| 14 | func (q *ValidateQueryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
| 15 | if err := validateQuery(r.URL.RawQuery); err != nil { |
| 16 | http.Error(w, "Invalid query", http.StatusBadRequest) |
| 17 | return |
| 18 | } |
| 19 | q.Handler.ServeHTTP(w, r) |
| 20 | } |
| 21 | |
| 22 | type ValidateQueryLogHandler struct { |
| 23 | Handler http.Handler |