Skip to content

Commit 7bd1128

Browse files
committed
git commit -sa -m "fix(epp): flatten conditional-decode switch into if/else"
Signed-off-by: Dmitri Pikus <DPIKUS@il.ibm.com>
1 parent dbfce5b commit 7bd1128

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/epp/requestcontrol/director.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,9 @@ func (d *Director) HandleRequest(ctx context.Context, reqCtx *handlers.RequestCo
307307
// so it fires regardless of which profile handler is configured.
308308
if routing.IsConditionalDecode(reqCtx.Request.Headers) {
309309
decider := d.requestControlPlugins.ConditionalDecodeDecider()
310-
switch {
311-
case decider == nil:
310+
if decider == nil {
312311
logger.V(logutil.DEBUG).Info("conditional-decode: no decider configured, forwarding")
313-
default:
312+
} else {
314313
endpoint := primaryDecodeEndpoint(logger, result)
315314
if endpoint == nil || decider.ShouldRejectConditionalDecode(ctx, reqCtx.SchedulingRequest, endpoint) {
316315
logger.V(logutil.DEBUG).Info("conditional-decode: chosen decode worker has no cached prefix, returning 412")

0 commit comments

Comments
 (0)