mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
if the ok returned by RequestInfoFrom is false, the requestInfo is nil
This commit is contained in:
parent
ba8410ea5f
commit
e2bf6ca204
@ -235,7 +235,7 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
if !ok {
|
||||
responsewriters.ErrorNegotiated(
|
||||
apierrors.NewInternalError(fmt.Errorf("no RequestInfo found in the context")),
|
||||
Codecs, schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}, w, req,
|
||||
Codecs, schema.GroupVersion{}, w, req,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user