From 330de968e590f2d1ffcea5f7c0de5e9933529def Mon Sep 17 00:00:00 2001 From: hasheddan Date: Sat, 14 Jan 2023 12:10:00 -0500 Subject: [PATCH] Fix gorestful typos in the APIServerHandler.Director docstring Fixes up a few misspellings of gorestful in the Director field docstring for APIServerHandler. Signed-off-by: hasheddan Kubernetes-commit: b1e3326eaeee982d3d5c1618022c306d50fe631e --- pkg/server/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/handler.go b/pkg/server/handler.go index 9f37df1cd..847a624e3 100644 --- a/pkg/server/handler.go +++ b/pkg/server/handler.go @@ -53,13 +53,13 @@ type APIServerHandler struct { // Director is here so that we can properly handle fall through and proxy cases. // This looks a bit bonkers, but here's what's happening. We need to have /apis handling registered in gorestful in order to have // swagger generated for compatibility. Doing that with `/apis` as a webservice, means that it forcibly 404s (no defaulting allowed) - // all requests which are not /apis or /apis/. We need those calls to fall through behind goresful for proper delegation. Trying to + // all requests which are not /apis or /apis/. We need those calls to fall through behind gorestful for proper delegation. Trying to // register for a pattern which includes everything behind it doesn't work because gorestful negotiates for verbs and content encoding // and all those things go crazy when gorestful really just needs to pass through. In addition, openapi enforces unique verb constraints // which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the // containing webservice faces all the same problems listed above. // This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to - // decide if the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to NonGoRestfulMux mux in + // decide if the route is likely to be handled by gorestful and route there if needed. Otherwise, it goes to NonGoRestfulMux mux in // order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think // we should consider completely removing gorestful. // Other servers should only use this opaquely to delegate to an API server.