mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #107176 from Iceber/fix-request-info
if the ok returned by RequestInfoFrom is false, the requestInfo is nil
This commit is contained in:
commit
d754543726
@ -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