diff --git a/http_handler.go b/http_handler.go index c4147ce67..f57f1b666 100644 --- a/http_handler.go +++ b/http_handler.go @@ -549,7 +549,7 @@ func newRouter(handler *Handler) http.Handler { router.HandleFunc("/sql", handler.chkAuthZ(handler.handlePostSQL, authz.Admin)).Methods("POST").Name("PostSQL") } // internal endpoint - router.HandleFunc("/sql", handler.chkAuthZ(handler.handlePostSQLPlanOperator, authz.Admin)).Headers("X-FeatureBase-Plan-Operator", "").Methods("POST").Name("PostSQLPlanOperator") + router.HandleFunc("/sql-exec-graph", handler.chkAuthZ(handler.handlePostSQLPlanOperator, authz.Admin)).Methods("POST").Name("PostSQLPlanOperator") router.HandleFunc("/query-history", handler.chkAuthZ(handler.handleGetPastQueries, authz.Admin)).Methods("GET").Name("GetPastQueries") router.HandleFunc("/version", handler.handleGetVersion).Methods("GET").Name("GetVersion") diff --git a/sql3/planner/executionplanner.go b/sql3/planner/executionplanner.go index 1a86d112a..347e758d3 100644 --- a/sql3/planner/executionplanner.go +++ b/sql3/planner/executionplanner.go @@ -324,7 +324,7 @@ func (e *ExecutionPlanner) remotePlanExec(ctx context.Context, addr string, op t } // Create HTTP request. - u := fmt.Sprintf("%s/sql", addr) + u := fmt.Sprintf("%s/sql-exec-graph", addr) req, err := http.NewRequest("POST", u, bytes.NewReader(b)) if err != nil { return nil, errors.Wrap(err, "creating request") @@ -337,7 +337,6 @@ func (e *ExecutionPlanner) remotePlanExec(ctx context.Context, addr string, op t req.Header.Set("Content-Type", "application/octet-stream") req.Header.Set("Accept", "application/octet-stream") req.Header.Set("User-Agent", "pilosa/"+e.systemAPI.Version()) - req.Header.Set("X-FeatureBase-Plan-Operator", fmt.Sprintf("%T", op)) // Execute request against the host. resp, err := http.DefaultClient.Do(req.WithContext(ctx))