Archived
server: the control-vector switch answers 404 where it has no vector
The route's own comment, server.h and the dashboard's page all say a deployment without a vector answers 404, and the page uses exactly that to tell "no vector here" (hide the panel) from "not signed in" (show it, disabled). The handler answered 501 instead, so such a deployment showed a panel claiming the vector was present. The route now assembles the same 404 the server uses for a model it does not serve, and the case that had no coverage -- a deployment without a vector -- checks it. The unreachable 405 arm goes: only GET and POST are registered.
This commit is contained in:
1 parent
cac79bb3ba
commit
6964d05f75
2 files changed
+13
-6
No files matched your search
@@ -4538,6 +4538,9 @@ TEST(the_control_vector_field_overrides_the_default_or_is_refused) {
|
||||
f.sched.join_all();
|
||||
CHECK_EQ(r.status, 400);
|
||||
CHECK(r.body.find("control_vector") != std::string::npos);
|
||||
/* The route itself is present and answers 404: that is what the page tests for before it
|
||||
* hides the panel, and what distinguishes "no vector here" from "not signed in". */
|
||||
CHECK_EQ(f.get("/admin/control-vector").status, 404);
|
||||
}
|
||||
{
|
||||
/* A vector loaded, default off: the request's own choice wins and reaches the engine. */
|
||||
|
||||
Reference in new issue
Block a user