diff --git a/services/httpd/handler.go b/services/httpd/handler.go index 89d1916504d..c11f367d057 100644 --- a/services/httpd/handler.go +++ b/services/httpd/handler.go @@ -810,7 +810,7 @@ func (h *Handler) async(q *influxql.Query, results <-chan *query.Result) { // bucket2drbp extracts a bucket and retention policy from a properly formatted // string. // -// The 2.x compatible endpoints encode the databse and retention policy names +// The 2.x compatible endpoints encode the database and retention policy names // in the database URL query value. It is encoded using a forward slash like // "database/retentionpolicy" and we should be able to simply split that string // on the forward slash. @@ -853,6 +853,7 @@ func (h *Handler) serveWriteV2(w http.ResponseWriter, r *http.Request, user meta default: err := fmt.Sprintf("invalid precision %q (use ns, us, ms or s)", precision) h.httpError(w, err, http.StatusBadRequest) + return } db, rp, err := bucket2dbrp(r.URL.Query().Get("bucket")) @@ -872,6 +873,7 @@ func (h *Handler) serveWriteV1(w http.ResponseWriter, r *http.Request, user meta default: err := fmt.Sprintf("invalid precision %q (use n, u, ms, s, m or h)", precision) h.httpError(w, err, http.StatusBadRequest) + return } db := r.URL.Query().Get("db")