mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
Fix off-by-one error
This commit is contained in:
parent
e3ace544ca
commit
5aebb242f8
1 changed files with 1 additions and 1 deletions
|
|
@ -218,7 +218,7 @@ const (
|
|||
func (h *Handler) addQueryContext(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
pathParts := strings.Split(r.URL.Path, "/")
|
||||
if len(pathParts) >= 3 && pathParts[3] == "query" {
|
||||
if len(pathParts) > 3 && pathParts[3] == "query" {
|
||||
req, err := h.readQueryRequest(r)
|
||||
ctx := context.WithValue(r.Context(), contextKeyQueryRequest, req)
|
||||
ctx = context.WithValue(ctx, contextKeyQueryError, err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue