* @return request target or null
*/
public static IRequestHandler requireProtocol(Protocol protocol)
{
RequestCycle requestCycle = RequestCycle.get();
WebRequest webRequest = (WebRequest)requestCycle.getRequest();
HttpServletRequest request = webRequest.getHttpServletRequest();
if (protocol == null || protocol == Protocol.PRESERVE_CURRENT ||
request.getScheme().equals(protocol.toString().toLowerCase()))
{
return null;
}