// Path: src/main/java/info/jdavid/ok/server/header/ETag.java
// @SuppressWarnings({ "WeakerAccess" })
// public final class ETag {
// 
//   private ETag() {}
// 
//   public static final String HEADER = "ETag";
// 
//   public static final String IF_MATCH = "If-Match";
//   public static final String IF_NONE_MATCH = "If-None-Match";
// 
// }


import java.io.IOException;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import javax.net.ssl.SSLSocket;
import info.jdavid.ok.server.header.ETag;
import okhttp3.*;
import okhttp3.internal.Util;
import okhttp3.internal.http2.Http2Connection;
import okhttp3.internal.http2.Http2Stream;
import okhttp3.internal.http2.Header;
import okhttp3.internal.http.HttpMethod;
import okhttp3.internal.http.RequestLine;
import okio.Buffer;
import okio.BufferedSink;
import okio.BufferedSource;
import okio.ByteString;
import okio.Okio;
import okio.Timeout;
import static okhttp3.internal.http2.Header.TARGET_AUTHORITY;
import static okhttp3.internal.http2.Header.TARGET_METHOD;
import static okhttp3.internal.http2.Header.TARGET_PATH;
import static okhttp3.internal.http2.Header.TARGET_SCHEME;
            if (useBody) {
              response = new Response.Builder().statusLine(StatusLines.BAD_REQUEST).noBody().build();
            }
            else {
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), null);
            }
          }
          else {
            if (useBody) {
              final Buffer body = new Buffer();
              if (stream.isOpen()) source.readFully(body, length);
              body.flush();
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), body);
            }
            else {
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), null);
            }
          }
        }
      }

      final List<Header> responseHeaders = responseHeaders(response);
      source.close();
      stream.writeHeaders(responseHeaders, true,true);
      final BufferedSink sink = Okio.buffer(stream.getSink());
      try {
        response.writeBody(source, sink);
// Path: src/main/java/info/jdavid/ok/server/header/ETag.java
// @SuppressWarnings({ "WeakerAccess" })
// public final class ETag {
// 
//   private ETag() {}
// 
//   public static final String HEADER = "ETag";
// 
//   public static final String IF_MATCH = "If-Match";
//   public static final String IF_NONE_MATCH = "If-None-Match";
// 
// }


// Path: src/main/java/info/jdavid/ok/server/Http2.java
import java.io.IOException;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import javax.net.ssl.SSLSocket;
import info.jdavid.ok.server.header.ETag;
import okhttp3.*;
import okhttp3.internal.Util;
import okhttp3.internal.http2.Http2Connection;
import okhttp3.internal.http2.Http2Stream;
import okhttp3.internal.http2.Header;
import okhttp3.internal.http.HttpMethod;
import okhttp3.internal.http.RequestLine;
import okio.Buffer;
import okio.BufferedSink;
import okio.BufferedSource;
import okio.ByteString;
import okio.Okio;
import okio.Timeout;
import static okhttp3.internal.http2.Header.TARGET_AUTHORITY;
import static okhttp3.internal.http2.Header.TARGET_METHOD;
import static okhttp3.internal.http2.Header.TARGET_PATH;
import static okhttp3.internal.http2.Header.TARGET_SCHEME;

            if (useBody) {
              response = new Response.Builder().statusLine(StatusLines.BAD_REQUEST).noBody().build();
            }
            else {
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), null);
            }
          }
          else {
            if (useBody) {
              final Buffer body = new Buffer();
              if (stream.isOpen()) source.readFully(body, length);
              body.flush();
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), body);
            }
            else {
              response = handler.handle(clientIp, true, false,true,
                                        method, requestUrl, requestHeaders.build(), null);
            }
          }
        }
      }

      final List<Header> responseHeaders = responseHeaders(response);
      source.close();
      stream.writeHeaders(responseHeaders, true,true);
      final BufferedSink sink = Okio.buffer(stream.getSink());
      try {
        response.writeBody(source, sink);
        requestHeaders.removeAll(ETag.IF_NONE_MATCH);