/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.message.HttpServletRequestKnob
 *  com.l7tech.message.Message
 *  com.l7tech.policy.variable.Syntax$SyntaxErrorHandler
 */
package com.l7tech.server.policy.variable;

import com.l7tech.message.HttpServletRequestKnob;
import com.l7tech.message.Message;
import com.l7tech.policy.variable.Syntax;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.server.policy.variable.MessageSelector;

class e4
extends MessageSelector.AbstractMessageAttributeSelector {
    e4() {
    }

    @Override
    public ExpandVariables.Selector.Selection select(Message message, String string, Syntax.SyntaxErrorHandler syntaxErrorHandler, boolean bl2) {
        HttpServletRequestKnob httpServletRequestKnob = (HttpServletRequestKnob)message.getKnob(HttpServletRequestKnob.class);
        if (httpServletRequestKnob == null) {
            return this.handleBadVariable(string, syntaxErrorHandler, bl2);
        }
        return new ExpandVariables.Selector.Selection(this.a(httpServletRequestKnob.getHttpServletRequest().getProtocol()));
    }

    private String a(String string) {
        int n2 = string.indexOf(47);
        return n2 != -1 ? string.substring(n2 + 1) : null;
    }
}

