// Path: src/main/java/info/jdavid/ok/server/header/Connection.java
// @SuppressWarnings({ "WeakerAccess", "unused" })
// public final class Connection {
// 
//   private Connection() {}
// 
//   public static final String HEADER = "Connection";
// 
//   public static final String CLOSE = "Close";
//   public static final String KEEP_ALIVE = "Keep-Alive";
// 
// }


import javax.annotation.Nullable;
import info.jdavid.ok.server.header.Connection;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okio.Buffer;
   */
  @SuppressWarnings("unused")
  protected Response handleBlockedClientIp(final String method, final HttpUrl url) {
    return FORBIDDEN;
  }


  /**
   * Returns whether the request is allowed to be insecure (http rather than https) or not.
   * @param method the request method (get, post, ...).
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @param insecureOnly whether the server accepts only insecure connections or whether https is enabled.
   * @return whether the insecure request is allowed or not.
   */
  protected boolean allowInsecure(final String method, final HttpUrl url, final Headers requestHeaders,
                                  final boolean insecureOnly) {
    return insecureOnly || isAcmeChallenge(method, url, requestHeaders);
  }

  /**
   * Returns whether the request is an acme challenge (domain owner verification for certificates like
   * let's encrypt).
   * @param method the request method.
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @return true if the url is for an acme challenge, false if it isn't.
   */
  @SuppressWarnings("unused")
  protected boolean isAcmeChallenge(final String method, final HttpUrl url, final Headers requestHeaders) {
// Path: src/main/java/info/jdavid/ok/server/header/Connection.java
// @SuppressWarnings({ "WeakerAccess", "unused" })
// public final class Connection {
// 
//   private Connection() {}
// 
//   public static final String HEADER = "Connection";
// 
//   public static final String CLOSE = "Close";
//   public static final String KEEP_ALIVE = "Keep-Alive";
// 
// }


// Path: src/main/java/info/jdavid/ok/server/AbstractRequestHandler.java
import javax.annotation.Nullable;
import info.jdavid.ok.server.header.Connection;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okio.Buffer;

   */
  @SuppressWarnings("unused")
  protected Response handleBlockedClientIp(final String method, final HttpUrl url) {
    return FORBIDDEN;
  }


  /**
   * Returns whether the request is allowed to be insecure (http rather than https) or not.
   * @param method the request method (get, post, ...).
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @param insecureOnly whether the server accepts only insecure connections or whether https is enabled.
   * @return whether the insecure request is allowed or not.
   */
  protected boolean allowInsecure(final String method, final HttpUrl url, final Headers requestHeaders,
                                  final boolean insecureOnly) {
    return insecureOnly || isAcmeChallenge(method, url, requestHeaders);
  }

  /**
   * Returns whether the request is an acme challenge (domain owner verification for certificates like
   * let's encrypt).
   * @param method the request method.
   * @param url the request url.
   * @param requestHeaders the request headers.
   * @return true if the url is for an acme challenge, false if it isn't.
   */
  @SuppressWarnings("unused")
  protected boolean isAcmeChallenge(final String method, final HttpUrl url, final Headers requestHeaders) {
    return "GET".equals(method) && url.encodedPath().startsWith("/.well-known/acme-challenge/");