_Z19destroy_global_poolv:
   39|      2|void destroy_global_pool() {
   40|      2|  if (g_pool) { mhd_pool_destroy(g_pool); g_pool = nullptr; }
  ------------------
  |  Branch (40:7): [True: 2, False: 0]
  ------------------
   41|      2|}
_Z21mark_post_parse_readyR14MHD_Connection:
   45|      6|void mark_post_parse_ready(MHD_Connection& c) {
   46|      6|  g_post_parse_ready.insert(&c);
   47|      6|}
_Z22clear_post_parse_readyRK14MHD_Connection:
   55|      6|void clear_post_parse_ready(const MHD_Connection& c) {
   56|      6|  g_post_parse_ready.erase(&c);
   57|      6|}
_Z22init_daemon_connectionR18FuzzedDataProviderR10MHD_DaemonR14MHD_Connection:
  151|      6|                                   MHD_Daemon& d, MHD_Connection& c) {
  152|       |  // Basic initialisation
  153|      6|  d = {};
  154|      6|  c = {};
  155|      6|  c.daemon = &d;
  156|      6|  c.pool = g_pool;
  157|       |
  158|       |  // Configure daemon memory pool
  159|      6|  d.conns.cfg.mem_pool_size = g_pool_size;
  160|      6|  d.conns.cfg.mem_pool_zeroing = MHD_MEMPOOL_ZEROING_ON_RESET;
  161|       |
  162|       |  // Confiugre daemon request
  163|      6|  d.req_cfg.large_buf.space_left = fdp.ConsumeIntegralInRange<size_t>(256, 65536);
  164|      6|  d.req_cfg.strictness = static_cast<enum MHD_ProtocolStrictLevel>(
  165|      6|      fdp.ConsumeIntegralInRange<int>(0, 2));
  166|       |
  167|       |  // Safe guard for buffer space
  168|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (168:7): [True: 3, False: 3]
  ------------------
  169|      3|    const size_t clamp = fdp.ConsumeIntegralInRange<size_t>(64, 512);
  170|      3|    if (d.req_cfg.large_buf.space_left > clamp)
  ------------------
  |  Branch (170:9): [True: 2, False: 1]
  ------------------
  171|      2|      d.req_cfg.large_buf.space_left = clamp;
  172|      3|  }
  173|       |
  174|       |  // Configure connection request and general settings
  175|      6|  c.discard_request = false;
  176|      6|  c.suspended = false;
  177|      6|  c.timeout.milsec = fdp.ConsumeIntegralInRange<uint32_t>(0, 4096);
  178|      6|  c.timeout.last_act = 0;
  179|       |
  180|       |  // Add dummy callback function
  181|      6|  d.req_cfg.cb = dummy_request_cb;
  182|      6|  d.req_cfg.cb_cls = nullptr;
  183|      6|}
_Z22init_connection_bufferR18FuzzedDataProviderR14MHD_Connection:
  185|      6|void init_connection_buffer(FuzzedDataProvider& fdp, MHD_Connection& c) {
  186|       |  // Prepare connection buffer in memory pool
  187|      6|  size_t required = 0;
  188|      6|  const size_t capacity = fdp.ConsumeIntegralInRange<size_t>(512, 16384);
  189|      6|  char* buf = static_cast<char*>(mhd_pool_try_alloc(c.pool, capacity, &required));
  190|      6|  if (!buf) {
  ------------------
  |  Branch (190:7): [True: 0, False: 6]
  ------------------
  191|      0|    c.read_buffer = nullptr;
  192|      0|    c.read_buffer_size = 0;
  193|      0|    c.read_buffer_offset = 0;
  194|      0|    return;
  195|      0|  }
  196|       |
  197|       |  // Randomly choose configuration
  198|      6|  std::string hdrs;
  199|      6|  const std::string method = pick_method(fdp);
  200|      6|  const std::string version = pick_http_version(fdp);
  201|      6|  const std::string target  = (method == "*") ? "*" : (fdp.ConsumeBool() ? "/upload" : "/x?y=z");
  ------------------
  |  Branch (201:31): [True: 0, False: 6]
  |  Branch (201:56): [True: 5, False: 1]
  ------------------
  202|       |
  203|       |  // Randomly break line endings in request line
  204|      6|  const bool bare_lf = fdp.ConsumeBool();
  205|      6|  const bool bare_cr = (!bare_lf) && fdp.ConsumeBool();
  ------------------
  |  Branch (205:24): [True: 4, False: 2]
  |  Branch (205:38): [True: 2, False: 2]
  ------------------
  206|      6|  auto EOL = [&](bool final=false) {
  207|      6|    if (bare_lf) {
  208|      6|      return std::string("\n");
  209|      6|    }
  210|      6|    if (bare_cr) {
  211|      6|      return std::string("\r");
  212|      6|    }
  213|       |
  214|      6|    return std::string("\r\n");
  215|      6|  };
  216|      6|  std::string req = method + " " + target + " " + version + EOL();
  217|       |
  218|       |  // Host headers
  219|      6|  int host_count = 0;
  220|      6|  if (version == "HTTP/1.1") {
  ------------------
  |  Branch (220:7): [True: 1, False: 5]
  ------------------
  221|      1|    host_count = fdp.ConsumeIntegralInRange<int>(0,2);
  222|      5|   } else {
  223|      5|    host_count = fdp.ConsumeIntegralInRange<int>(0,1);
  224|      5|   }
  225|       |
  226|      7|  for (int i = 0; i < host_count; ++i) {
  ------------------
  |  Branch (226:19): [True: 1, False: 6]
  ------------------
  227|      1|    if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (227:9): [True: 1, False: 0]
  ------------------
  228|      1|      hdrs += " Host: fuzz" + std::to_string(i) + EOL();
  229|      1|    } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|      hdrs += "Host : fuzz" + std::to_string(i) + EOL();
  231|      0|    } else {
  232|      0|      hdrs += "Host: fuzz" + std::to_string(i) + EOL();
  233|      0|    }
  234|      1|  }
  235|       |
  236|       |  // Transfer-Encoding and Content-Length headers
  237|      6|  const bool add_te = fdp.ConsumeBool();
  238|      6|  const bool add_cl = fdp.ConsumeBool();
  239|      6|  std::string te_val = fdp.PickValueInArray({"chunked","gzip","br","compress"});
  240|      6|  if (add_te) {
  ------------------
  |  Branch (240:7): [True: 2, False: 4]
  ------------------
  241|      2|    hdrs += "Transfer-Encoding: " + te_val + EOL();
  242|      2|  }
  243|      6|  if (add_cl) {
  ------------------
  |  Branch (243:7): [True: 0, False: 6]
  ------------------
  244|      0|    std::string cl;
  245|      0|    switch (fdp.ConsumeIntegralInRange<int>(0,3)) {
  246|      0|      case 0: cl = "0"; break;
  ------------------
  |  Branch (246:7): [True: 0, False: 0]
  ------------------
  247|      0|      case 1: cl = std::to_string(fdp.ConsumeIntegralInRange<uint32_t>(0, 1<<20));
  ------------------
  |  Branch (247:7): [True: 0, False: 0]
  ------------------
  248|      0|              break;
  249|      0|      case 2: cl = "18446744073709551616"; break;
  ------------------
  |  Branch (249:7): [True: 0, False: 0]
  ------------------
  250|      0|      default: cl = "xyz"; break;
  ------------------
  |  Branch (250:7): [True: 0, False: 0]
  ------------------
  251|      0|    }
  252|      0|    hdrs += "Content-Length: " + cl + EOL();
  253|      0|  }
  254|       |
  255|       |  // Random minimum headers
  256|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (256:7): [True: 4, False: 2]
  ------------------
  257|      4|    hdrs += (fdp.ConsumeBool() ? "Expect: 100-continue" : "Expect: something-weird") + EOL();
  ------------------
  |  Branch (257:14): [True: 2, False: 2]
  ------------------
  258|      4|  }
  259|       |
  260|      6|  bool detect_mpart = false;
  261|      6|  switch (c.rq.app_act.head_act.data.post_parse.enc) {
  262|      0|    case MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA:
  ------------------
  |  Branch (262:5): [True: 0, False: 6]
  ------------------
  263|      0|      g_mpart_boundary = "fuzz" + std::to_string(fdp.ConsumeIntegral<uint32_t>());
  264|      0|      hdrs += "Content-Type: multipart/form-data; boundary=" + g_mpart_boundary + EOL();
  265|      0|      break;
  266|      0|    case MHD_HTTP_POST_ENCODING_FORM_URLENCODED:
  ------------------
  |  Branch (266:5): [True: 0, False: 6]
  ------------------
  267|      0|      hdrs += "Content-Type: application/x-www-form-urlencoded" + EOL();
  268|      0|      break;
  269|      1|    case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (269:5): [True: 1, False: 5]
  ------------------
  270|      1|      hdrs += "Content-Type: text/plain" + EOL();
  271|      1|      break;
  272|      5|    default: case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (272:5): [True: 0, False: 6]
  |  Branch (272:14): [True: 5, False: 1]
  ------------------
  273|      5|      detect_mpart = fdp.ConsumeBool();
  274|      5|      if (detect_mpart) {
  ------------------
  |  Branch (274:11): [True: 2, False: 3]
  ------------------
  275|      2|        g_mpart_boundary = "fuzz" + std::to_string(fdp.ConsumeIntegral<uint32_t>());
  276|      2|        hdrs += "Content-Type: multipart/form-data; boundary=" + g_mpart_boundary + EOL();
  277|      3|      } else {
  278|      3|        hdrs += std::string("Content-Type: ")
  279|      3|             + (fdp.ConsumeBool() ? "application/x-www-form-urlencoded" : "text/plain") + EOL();
  ------------------
  |  Branch (279:17): [True: 0, False: 3]
  ------------------
  280|      3|      }
  281|      5|      break;
  282|      6|  }
  283|       |
  284|       |  // Randomly add some chunked headers
  285|      6|  const bool add_te_chunked = fdp.ConsumeBool();
  286|      6|  if (add_te_chunked) {
  ------------------
  |  Branch (286:7): [True: 5, False: 1]
  ------------------
  287|      5|    hdrs += "Transfer-Encoding: chunked" + EOL();
  288|      5|  }
  289|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (289:7): [True: 0, False: 6]
  ------------------
  290|      0|    const uint32_t cl = fdp.ConsumeIntegralInRange<uint32_t>(0, 256);
  291|      0|    hdrs += "Content-Length: " + std::to_string(cl) + EOL();
  292|      0|  }
  293|      6|  if (add_te_chunked && fdp.ConsumeBool()) {
  ------------------
  |  Branch (293:7): [True: 5, False: 1]
  |  Branch (293:25): [True: 2, False: 3]
  ------------------
  294|      2|    if (fdp.ConsumeBool())
  ------------------
  |  Branch (294:9): [True: 2, False: 0]
  ------------------
  295|      2|      hdrs += "Trailer: X-Fuzz-Trace" + EOL();
  296|      0|    else
  297|      0|      hdrs += "Trailer: X-One, X-Two" + EOL();
  298|      2|  }
  299|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (299:7): [True: 1, False: 5]
  ------------------
  300|      1|    hdrs += (fdp.ConsumeBool() ? "Expect: 100-continue" : "Expect: something-weird") + EOL();
  ------------------
  |  Branch (300:14): [True: 1, False: 0]
  ------------------
  301|      1|  }
  302|       |
  303|       |  // Connection ending line
  304|      6|  hdrs += "Connection: close" + EOL();
  305|      6|  std::string end = EOL() + EOL();
  306|       |
  307|       |  // Write into the read buffer
  308|      6|  std::string full = req + hdrs + end;
  309|      6|  const size_t n = (full.size() <= capacity) ? full.size() : capacity;
  ------------------
  |  Branch (309:20): [True: 6, False: 0]
  ------------------
  310|      6|  memcpy(buf, full.data(), n);
  311|       |
  312|      6|  c.read_buffer = buf;
  313|      6|  c.read_buffer_size = capacity;
  314|      6|  c.read_buffer_offset = n;
  315|      6|}
_Z26init_parsing_configurationR18FuzzedDataProviderR14MHD_Connection:
  317|      6|void init_parsing_configuration(FuzzedDataProvider& fdp, MHD_Connection& c) {
  318|      6|  MHD_HTTP_PostEncoding enc;
  319|       |
  320|       |  // Configure connection encoding abd methods
  321|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (321:7): [True: 2, False: 4]
  ------------------
  322|      2|    c.rq.app_act.head_act.act = mhd_ACTION_POST_PARSE;
  323|      4|  } else {
  324|      4|    c.rq.app_act.head_act.act = mhd_ACTION_NO_ACTION;
  325|      4|  }
  326|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (326:7): [True: 1, False: 5]
  ------------------
  327|      1|    enc = MHD_HTTP_POST_ENCODING_TEXT_PLAIN;
  328|      5|  } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (328:14): [True: 0, False: 5]
  ------------------
  329|      0|    enc = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
  330|      5|  } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (330:14): [True: 0, False: 5]
  ------------------
  331|      0|    enc = MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA;
  332|      5|  } else {
  333|      5|    enc = MHD_HTTP_POST_ENCODING_OTHER;
  334|      5|  }
  335|       |
  336|      6|  c.rq.app_act.head_act.data.post_parse.buffer_size =
  337|      6|    fdp.ConsumeIntegralInRange<size_t>(1, 4096);
  338|      6|  c.rq.app_act.head_act.data.post_parse.max_nonstream_size =
  339|      6|    fdp.ConsumeIntegralInRange<size_t>(1, 4096);
  340|       |
  341|       |  // Confiugre head action for connection post parsing process
  342|      6|  c.rq.app_act.head_act.data.post_parse.enc = enc;
  343|      6|  c.rq.app_act.head_act.data.post_parse.stream_reader = dummy_reader;
  344|      6|  c.rq.app_act.head_act.data.post_parse.reader_cls = nullptr;
  345|      6|  c.rq.app_act.head_act.data.post_parse.done_cb = dummy_done;
  346|      6|  c.rq.app_act.head_act.data.post_parse.done_cb_cls = nullptr;
  347|      6|}
_Z25prepare_headers_and_parseR14MHD_Connectionm:
  349|      6|void prepare_headers_and_parse(MHD_Connection& connection, size_t size) {
  350|       |  // Manually add a parameter for parsing
  351|      6|  auto add_hdr = [&](const char* name_c, const std::string& val_s) {
  352|      6|    const size_t nlen = strlen(name_c);
  353|      6|    const size_t vlen = val_s.size();
  354|      6|    char* nbuf = static_cast<char*>(mhd_stream_alloc_memory(&connection, nlen + 1));
  355|      6|    char* vbuf = static_cast<char*>(mhd_stream_alloc_memory(&connection, vlen + 1));
  356|      6|    if (!nbuf || !vbuf) {
  357|      6|      return;
  358|      6|    }
  359|      6|    memcpy(nbuf, name_c, nlen); nbuf[nlen] = '\0';
  360|      6|    memcpy(vbuf, val_s.data(), vlen); vbuf[vlen] = '\0';
  361|      6|    struct MHD_String name;
  362|      6|    name.len  = nlen;
  363|      6|    name.cstr = nbuf;
  364|      6|    struct MHD_String value;
  365|      6|    value.len  = vlen;
  366|      6|    value.cstr = vbuf;
  367|      6|    mhd_stream_add_field(&connection.h1_stream, MHD_VK_HEADER, &name, &value);
  368|      6|  };
  369|      6|  add_hdr("Host", "fuzz");
  370|      6|  if ((size & 3u) == 0u) {
  ------------------
  |  Branch (370:7): [True: 6, False: 0]
  ------------------
  371|      6|    add_hdr("Transfer-Encoding", "chunked");
  372|      6|  }
  373|      6|  if ((size & 7u) == 0u) {
  ------------------
  |  Branch (373:7): [True: 6, False: 0]
  ------------------
  374|      6|    add_hdr("Content-Length", "0");
  375|      6|  }
  376|       |
  377|      6|  bool force_mpart = (connection.rq.app_act.head_act.data.post_parse.enc
  378|      6|                        == MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA);
  379|      6|  if (!force_mpart) {
  ------------------
  |  Branch (379:7): [True: 6, False: 0]
  ------------------
  380|      6|    force_mpart = ((size & 0x3Fu) == 0u);
  381|      6|  }
  382|      6|  if (force_mpart) {
  ------------------
  |  Branch (382:7): [True: 6, False: 0]
  ------------------
  383|      6|    if (g_mpart_boundary.empty()) {
  ------------------
  |  Branch (383:9): [True: 1, False: 5]
  ------------------
  384|      1|      g_mpart_boundary = "fuzz" + std::to_string(size ^ 0x9e3779b97f4a7c15ULL);
  385|      1|    }
  386|      6|    std::string ct = "multipart/form-data; boundary=" + g_mpart_boundary;
  387|      6|    add_hdr("Content-Type", ct);
  388|      6|  }
  389|       |
  390|       |  // If we wrote a real HTTP header for multipart, parse it so Content-Type is visible
  391|      6|  connection.stage = mhd_HTTP_STAGE_INIT;
  392|      6|  bool got_line = mhd_stream_get_request_line(&connection);
  393|      6|  if (destroy_error_response(connection)) {
  ------------------
  |  Branch (393:7): [True: 2, False: 4]
  ------------------
  394|      2|    return;
  395|      2|  }
  396|      4|  if (got_line && connection.stage == mhd_HTTP_STAGE_REQ_LINE_RECEIVED) {
  ------------------
  |  Branch (396:7): [True: 4, False: 0]
  |  Branch (396:19): [True: 1, False: 3]
  ------------------
  397|      1|    mhd_stream_switch_to_rq_headers_proc(&connection);
  398|      1|  }
  399|      4|  mhd_stream_parse_request_headers(&connection);
  400|       |
  401|       |  // Only proceed to post-parse if header parsing did not bail out
  402|      4|  destroy_error_response(connection);
  403|      4|}
_Z24prepare_body_and_processR14MHD_ConnectionRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmb:
  405|      6|void prepare_body_and_process(MHD_Connection& connection, std::string& body, size_t body_size, bool use_stream_body) {
  406|       |  // Use streaming if boundary is not empty
  407|      6|  if (!g_mpart_boundary.empty()) {
  ------------------
  |  Branch (407:7): [True: 6, False: 0]
  ------------------
  408|      6|    std::string wrapped;
  409|      6|    wrapped.reserve(body.size() + g_mpart_boundary.size() * 2 + 128);
  410|      6|    wrapped += "\r\n--"; wrapped += g_mpart_boundary; wrapped += "\r\n";
  411|      6|    wrapped += "Content-Disposition: form-data; name=\"x\"; filename=\"f\"\r\n";
  412|      6|    wrapped += "Content-Type: application/octet-stream\r\n\r\n";
  413|      6|    wrapped += body; wrapped += "\r\n";
  414|      6|    wrapped += "--"; wrapped += g_mpart_boundary; wrapped += "--\r\n";
  415|      6|    body.swap(wrapped);
  416|      6|    body_size = body.size();
  417|      6|  }
  418|       |
  419|      6|  if (!use_stream_body) {
  ------------------
  |  Branch (419:7): [True: 6, False: 0]
  ------------------
  420|       |    // Fuzz mhd_stream_prepare_for_post_parse once and mhd_stream_post_parse
  421|      6|    mhd_stream_prepare_for_post_parse(&connection);
  422|      6|    mhd_stream_post_parse(&connection, &body_size, &body[0]);
  423|      6|    mark_post_parse_ready(connection);
  424|      6|  } else {
  425|       |    // Try prepare the body by streaming connection buffer
  426|      0|    const bool want_chunked = (connection.rq.have_chunked_upload == MHD_YES);
  427|       |
  428|      0|    std::string to_feed;
  429|      0|    if (want_chunked) {
  ------------------
  |  Branch (429:9): [True: 0, False: 0]
  ------------------
  430|      0|      auto append_chunk = [&](const char* data, size_t len) {
  431|      0|        char hex[32];
  432|      0|        const int n = snprintf(hex, sizeof(hex), "%zx", len);
  433|      0|        to_feed.append(hex, (size_t)n);
  434|      0|        if ((len & 3u) == 0u) {
  435|      0|          to_feed += ";ext=1";
  436|      0|        }
  437|      0|        to_feed += "\r\n";
  438|      0|        to_feed.append(data, len);
  439|      0|        to_feed += "\r\n";
  440|      0|      };
  441|      0|      if (body_size <= 32) {
  ------------------
  |  Branch (441:11): [True: 0, False: 0]
  ------------------
  442|      0|        append_chunk(body.data(), body_size);
  443|      0|      } else {
  444|      0|        const size_t mid = body_size / 2;
  445|      0|        append_chunk(body.data(), mid);
  446|      0|        append_chunk(body.data() + mid, body_size - mid);
  447|      0|      }
  448|      0|      to_feed += "0\r\n";
  449|      0|      if (body_size & 1) {
  ------------------
  |  Branch (449:11): [True: 0, False: 0]
  ------------------
  450|      0|        to_feed += "X-Fuzz-Trace: 1\r\n\r\n";
  451|      0|      } else {
  452|      0|        to_feed += "\r\n";
  453|      0|      }
  454|      0|    } else {
  455|       |      // Non-chunked body is handled as is
  456|      0|      to_feed.assign(body.data(), body_size);
  457|      0|    }
  458|       |
  459|       |    // Stage into the connection read buffer (allocate if needed).
  460|      0|    size_t feed_sz = to_feed.size();
  461|      0|    bool staged = false;
  462|      0|    if (connection.read_buffer && connection.read_buffer_size >= feed_sz) {
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  |  Branch (462:35): [True: 0, False: 0]
  ------------------
  463|      0|      memcpy(connection.read_buffer, to_feed.data(), feed_sz);
  464|      0|      connection.read_buffer_offset = feed_sz;
  465|      0|      staged = true;
  466|      0|    } else {
  467|      0|      size_t need = 0;
  468|      0|      char *nb = (char*) mhd_pool_try_alloc(connection.pool, feed_sz, &need);
  469|      0|      if (nb) {
  ------------------
  |  Branch (469:11): [True: 0, False: 0]
  ------------------
  470|      0|        memcpy(nb, to_feed.data(), feed_sz);
  471|      0|        connection.read_buffer = nb;
  472|      0|        connection.read_buffer_size = feed_sz;
  473|      0|        connection.read_buffer_offset = feed_sz;
  474|      0|        staged = true;
  475|      0|      }
  476|      0|    }
  477|       |
  478|      0|    if (staged) {
  ------------------
  |  Branch (478:9): [True: 0, False: 0]
  ------------------
  479|       |      // Use stream body approach if success
  480|      0|      const size_t min_needed = body_size + 1;
  481|      0|      if (ensure_lbuf_capacity(connection, min_needed)) {
  ------------------
  |  Branch (481:11): [True: 0, False: 0]
  ------------------
  482|       |        // Only post parse the request if buffer is enough
  483|      0|        connection.stage = mhd_HTTP_STAGE_BODY_RECEIVING;
  484|      0|        connection.rq.have_chunked_upload = MHD_NO;
  485|      0|        connection.rq.cntn.cntn_size = (uint64_t) body_size;
  486|      0|        mhd_stream_prepare_for_post_parse(&connection);
  487|      0|        mhd_stream_process_request_body(&connection);
  488|      0|        mark_post_parse_ready(connection);
  489|      0|      } else {
  490|       |        // Fall back if not enough buffer
  491|      0|        size_t tmp = body_size;
  492|      0|        mhd_stream_prepare_for_post_parse(&connection);
  493|      0|        mhd_stream_post_parse(&connection, &tmp, body.data());
  494|      0|        mark_post_parse_ready(connection);
  495|      0|      }
  496|      0|    } else {
  497|       |      // Use post prase approach if stream body failed
  498|      0|      mhd_stream_prepare_for_post_parse(&connection);
  499|      0|      mhd_stream_post_parse(&connection, &body_size, &body[0]);
  500|      0|      mark_post_parse_ready(connection);
  501|      0|    }
  502|      0|  }
  503|      6|}
_Z13final_cleanupR14MHD_ConnectionR10MHD_Daemon:
  505|      6|void final_cleanup(MHD_Connection& connection, MHD_Daemon& daemon) {
  506|       |  // Post process response
  507|      6|  mhd_stream_switch_from_recv_to_send(&connection);
  508|      6|  mhd_stream_process_req_recv_finished(&connection);
  509|      6|  mhd_stream_release_write_buffer(&connection);
  510|       |
  511|       |  // Release buffers in daemon to avoid memory leakage
  512|      6|  if (connection.rq.cntn.lbuf.data != nullptr || connection.rq.cntn.lbuf.size != 0) {
  ------------------
  |  Branch (512:7): [True: 0, False: 6]
  |  Branch (512:50): [True: 0, False: 6]
  ------------------
  513|      0|    mhd_daemon_free_lbuf(&daemon, &connection.rq.cntn.lbuf);
  514|      0|  }
  515|       |
  516|       |  // Clean post parse body status
  517|      6|  clear_post_parse_ready(connection);
  518|      6|}
connection_helper.cpp:_ZL11pick_methodR18FuzzedDataProvider:
   71|      6|static std::string pick_method(FuzzedDataProvider& fdp) {
   72|      6|  static const char* kMethods[] = {
   73|      6|    "GET","POST","PUT","HEAD","DELETE","CONNECT","OPTIONS","TRACE","*"
   74|      6|  };
   75|      6|  return std::string(fdp.PickValueInArray(kMethods));
   76|      6|}
connection_helper.cpp:_ZL17pick_http_versionR18FuzzedDataProvider:
   79|      6|static std::string pick_http_version(FuzzedDataProvider& fdp) {
   80|       |  // Common + a chance to be malformed to trigger version errors.
   81|      6|  switch (fdp.ConsumeIntegralInRange<int>(0, 5)) {
   82|      1|    case 0: return "HTTP/1.1";
  ------------------
  |  Branch (82:5): [True: 1, False: 5]
  ------------------
   83|      1|    case 1: return "HTTP/1.0";
  ------------------
  |  Branch (83:5): [True: 1, False: 5]
  ------------------
   84|      0|    case 2: return "HTTP/2.0";
  ------------------
  |  Branch (84:5): [True: 0, False: 6]
  ------------------
   85|      0|    case 3: return "HTTP/0.9";
  ------------------
  |  Branch (85:5): [True: 0, False: 6]
  ------------------
   86|      4|    case 4: return "HTTX/1.1";
  ------------------
  |  Branch (86:5): [True: 4, False: 2]
  ------------------
   87|      0|    default: {
  ------------------
  |  Branch (87:5): [True: 0, False: 6]
  ------------------
   88|      0|      std::string s = "HTTP/";
   89|      0|      s.push_back(char('0' + fdp.ConsumeIntegralInRange<int>(0,9)));
   90|      0|      s.push_back('.');
   91|      0|      s.push_back(char('0' + fdp.ConsumeIntegralInRange<int>(0,9)));
   92|      0|      return s;
   93|      0|    }
   94|      6|  }
   95|      6|}
connection_helper.cpp:_ZZ22init_connection_bufferR18FuzzedDataProviderR14MHD_ConnectionENK3$_0clEb:
  206|     45|  auto EOL = [&](bool final=false) {
  207|     45|    if (bare_lf) {
  ------------------
  |  Branch (207:9): [True: 17, False: 28]
  ------------------
  208|     17|      return std::string("\n");
  209|     17|    }
  210|     28|    if (bare_cr) {
  ------------------
  |  Branch (210:9): [True: 14, False: 14]
  ------------------
  211|     14|      return std::string("\r");
  212|     14|    }
  213|       |
  214|     14|    return std::string("\r\n");
  215|     28|  };
connection_helper.cpp:_ZZ25prepare_headers_and_parseR14MHD_ConnectionmENK3$_0clEPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  351|     24|  auto add_hdr = [&](const char* name_c, const std::string& val_s) {
  352|     24|    const size_t nlen = strlen(name_c);
  353|     24|    const size_t vlen = val_s.size();
  354|     24|    char* nbuf = static_cast<char*>(mhd_stream_alloc_memory(&connection, nlen + 1));
  355|     24|    char* vbuf = static_cast<char*>(mhd_stream_alloc_memory(&connection, vlen + 1));
  356|     24|    if (!nbuf || !vbuf) {
  ------------------
  |  Branch (356:9): [True: 0, False: 24]
  |  Branch (356:18): [True: 0, False: 24]
  ------------------
  357|      0|      return;
  358|      0|    }
  359|     24|    memcpy(nbuf, name_c, nlen); nbuf[nlen] = '\0';
  360|     24|    memcpy(vbuf, val_s.data(), vlen); vbuf[vlen] = '\0';
  361|     24|    struct MHD_String name;
  362|     24|    name.len  = nlen;
  363|     24|    name.cstr = nbuf;
  364|     24|    struct MHD_String value;
  365|     24|    value.len  = vlen;
  366|     24|    value.cstr = vbuf;
  367|     24|    mhd_stream_add_field(&connection.h1_stream, MHD_VK_HEADER, &name, &value);
  368|     24|  };
connection_helper.cpp:_ZL22destroy_error_response14MHD_Connection:
   60|     10|static bool destroy_error_response(MHD_Connection c) {
   61|     10|  if (c.stage == mhd_HTTP_STAGE_START_REPLY) {
  ------------------
  |  Branch (61:7): [True: 6, False: 4]
  ------------------
   62|      6|    MHD_response_destroy(c.rp.response);
   63|      6|    c.rp.response = nullptr;
   64|      6|    return true;
   65|      6|  }
   66|       |
   67|      4|  return false;
   68|     10|}

LLVMFuzzerInitialize:
   33|      2|extern "C" int LLVMFuzzerInitialize() {
   34|      2|  g_pool = mhd_pool_create(g_pool_size, MHD_MEMPOOL_ZEROING_ON_RESET);
   35|      2|  atexit(destroy_global_pool);
   36|      2|  return 0;
   37|      2|}
LLVMFuzzerTestOneInput:
   39|      6|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   40|      6|  if (size == 0 || g_pool == nullptr) {
  ------------------
  |  Branch (40:7): [True: 0, False: 6]
  |  Branch (40:20): [True: 0, False: 6]
  ------------------
   41|      0|    return 0;
   42|      0|  }
   43|       |
   44|      6|  FuzzedDataProvider fdp(data, size);
   45|       |
   46|       |  // Reseting the memory pool for each iteartion
   47|      6|  mhd_pool_destroy(g_pool);
   48|      6|  g_pool = mhd_pool_create(g_pool_size, MHD_MEMPOOL_ZEROING_ON_RESET);
   49|       |
   50|       |  // Initialising the daemon, connection and other MHD components
   51|      6|  MHD_Daemon daemon;
   52|      6|  MHD_Connection connection;
   53|      6|  init_daemon_connection(fdp, daemon, connection);
   54|      6|  init_parsing_configuration(fdp, connection);
   55|      6|  init_connection_buffer(fdp, connection);
   56|      6|  prepare_headers_and_parse(connection, size);
   57|       |
   58|       |  // Randomly choose how many targets to fuzz
   59|      6|  std::vector<int> selectors;
   60|     19|  for (int i = 0; i < fdp.ConsumeIntegralInRange<int>(1, 8); i++) {
  ------------------
  |  Branch (60:19): [True: 13, False: 6]
  ------------------
   61|     13|    selectors.push_back(fdp.ConsumeIntegralInRange<int>(0, 5));
   62|     13|  }
   63|       |
   64|       |  // Generate random flags
   65|      6|  bool use_stream_body = fdp.ConsumeBool();
   66|      6|  bool is_nodelay = fdp.ConsumeBool();
   67|      6|  bool is_cork = fdp.ConsumeBool();
   68|       |
   69|       |  // Use remaining bytes to generate random body for fuzzing
   70|      6|  std::string body = fdp.ConsumeRemainingBytesAsString();
   71|      6|  size_t body_size = body.size();
   72|      6|  if (body_size == 0) {
  ------------------
  |  Branch (72:7): [True: 0, False: 6]
  ------------------
   73|      0|    return 0;
   74|      0|  }
   75|      6|  prepare_body_and_process(connection, body, body_size, use_stream_body);
   76|       |
   77|     13|  for (int selector : selectors) {
  ------------------
  |  Branch (77:21): [True: 13, False: 6]
  ------------------
   78|     13|    switch (selector) {
   79|      4|      case 0: {
  ------------------
  |  Branch (79:7): [True: 4, False: 9]
  ------------------
   80|      4|        mhd_conn_event_loop_state_update(&connection);
   81|      4|        break;
   82|      0|      }
   83|      1|      case 1: {
  ------------------
  |  Branch (83:7): [True: 1, False: 12]
  ------------------
   84|      1|        if (connection.rq.app_act.head_act.act == mhd_ACTION_NO_ACTION &&
  ------------------
  |  Branch (84:13): [True: 0, False: 1]
  ------------------
   85|      0|            connection.daemon && connection.daemon->req_cfg.cb) {
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  |  Branch (85:34): [True: 0, False: 0]
  ------------------
   86|      0|          mhd_stream_call_app_request_cb(&connection);
   87|      0|        }
   88|      1|        break;
   89|      0|      }
   90|      2|      case 2: {
  ------------------
  |  Branch (90:7): [True: 2, False: 11]
  ------------------
   91|      2|        if (connection.rq.app_act.head_act.act == mhd_ACTION_POST_PARSE &&
  ------------------
  |  Branch (91:13): [True: 0, False: 2]
  ------------------
   92|      0|            connection.rq.app_act.head_act.data.post_parse.done_cb != nullptr &&
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            is_post_parse_ready(connection)) {
  ------------------
  |  Branch (93:13): [True: 0, False: 0]
  ------------------
   94|      0|          mhd_stream_process_req_recv_finished(&connection);
   95|      0|        }
   96|      2|        break;
   97|      0|      }
   98|      6|      default: case 3: {
  ------------------
  |  Branch (98:7): [True: 6, False: 7]
  |  Branch (98:16): [True: 0, False: 13]
  ------------------
   99|      6|        mhd_conn_tls_check(&connection);
  100|      6|        break;
  101|      6|      }
  102|     13|    }
  103|     13|  }
  104|       |
  105|      6|  final_cleanup(connection, daemon);
  106|      6|  return 0;
  107|      6|}

_Z32mhd_conn_deinit_activity_timeoutP14MHD_Connection:
  151|      3|{
  152|      3|  struct MHD_Daemon *const restrict d = c->daemon;
  153|       |
  154|      3|#if defined(MHD_SUPPORT_THREADS)
  155|      3|  mhd_assert (!mhd_D_HAS_WORKERS (d));
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  156|      3|#endif /* MHD_SUPPORT_THREADS */
  157|       |
  158|      3|  if (0u == c->timeout.milsec)
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|  {
  160|      0|    mhd_assert (!c->timeout.in_cstm_tmout_list);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  161|      0|    return;
  162|      0|  }
  163|       |
  164|      3|  if (mhd_D_HAS_THR_PER_CONN (d))
  ------------------
  |  | 1531|      3|          (mhd_WM_INT_INTERNAL_EVENTS_THREAD_PER_CONNECTION == \
  |  |  ------------------
  |  |  |  Branch (1531:11): [True: 0, False: 3]
  |  |  ------------------
  |  | 1532|      3|           ((d)->wmode_int))
  ------------------
  165|      0|  {
  166|      0|    mhd_assert (!c->timeout.in_cstm_tmout_list);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  167|      0|    return;
  168|      0|  }
  169|       |
  170|      3|  if (!c->timeout.in_cstm_tmout_list)
  ------------------
  |  Branch (170:7): [True: 3, False: 0]
  ------------------
  171|      3|    mhd_DLINKEDL_DEL_D (&(d->conns.def_timeout),
  ------------------
  |  |  215|      3|#define mhd_DLINKEDL_DEL_D(p_list, p_obj, links_name) do {  \
  |  |  216|      3|        mhd_ASSUME (NULL != (p_list)->first);             \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  217|      3|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  218|      3|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|      3|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|      3|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  221|      3|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      3|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      3|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  224|      3|        if (NULL != (p_obj)->links_name.next)             \
  |  |  ------------------
  |  |  |  Branch (224:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  225|      3|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.next->links_name.prev); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  228|      0|                      (p_obj)->links_name.prev);        \
  |  |  229|      0|          (p_obj)->links_name.next->links_name.prev =   \
  |  |  230|      0|            (p_obj)->links_name.prev; } else            \
  |  |  231|      3|        { mhd_ASSUME ((p_obj) == (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  232|      3|          (p_list)->last = (p_obj)->links_name.prev; }  \
  |  |  233|      3|        if (NULL != (p_obj)->links_name.prev)           \
  |  |  ------------------
  |  |  |  Branch (233:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  234|      3|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.prev->links_name.next); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  237|      0|                      (p_obj)->links_name.prev);        \
  |  |  238|      0|          (p_obj)->links_name.prev->links_name.next =   \
  |  |  239|      0|            (p_obj)->links_name.next; } else            \
  |  |  240|      3|        { mhd_ASSUME ((p_obj) == (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   80|      3|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  241|      3|          (p_list)->first = (p_obj)->links_name.next; } \
  |  |  242|      3|        (p_obj)->links_name.prev = NULL;                \
  |  |  243|      3|        (p_obj)->links_name.next = NULL;  } while (0)
  |  |  ------------------
  |  |  |  Branch (243:52): [Folded, False: 3]
  |  |  ------------------
  ------------------
  172|      3|                        c,
  173|      3|                        timeout.tmout_list);
  174|      0|  else
  175|      0|    mhd_DLINKEDL_DEL_D (&(d->conns.cust_timeout), \
  ------------------
  |  |  215|      0|#define mhd_DLINKEDL_DEL_D(p_list, p_obj, links_name) do {  \
  |  |  216|      0|        mhd_ASSUME (NULL != (p_list)->first);             \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  224|      0|        if (NULL != (p_obj)->links_name.next)             \
  |  |  ------------------
  |  |  |  Branch (224:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  225|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.next->links_name.prev); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  228|      0|                      (p_obj)->links_name.prev);        \
  |  |  229|      0|          (p_obj)->links_name.next->links_name.prev =   \
  |  |  230|      0|            (p_obj)->links_name.prev; } else            \
  |  |  231|      0|        { mhd_ASSUME ((p_obj) == (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  232|      0|          (p_list)->last = (p_obj)->links_name.prev; }  \
  |  |  233|      0|        if (NULL != (p_obj)->links_name.prev)           \
  |  |  ------------------
  |  |  |  Branch (233:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  234|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.prev->links_name.next); \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  237|      0|                      (p_obj)->links_name.prev);        \
  |  |  238|      0|          (p_obj)->links_name.prev->links_name.next =   \
  |  |  239|      0|            (p_obj)->links_name.next; } else            \
  |  |  240|      0|        { mhd_ASSUME ((p_obj) == (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  241|      0|          (p_list)->first = (p_obj)->links_name.next; } \
  |  |  242|      0|        (p_obj)->links_name.prev = NULL;                \
  |  |  243|      0|        (p_obj)->links_name.next = NULL;  } while (0)
  |  |  ------------------
  |  |  |  Branch (243:52): [Folded, False: 0]
  |  |  ------------------
  ------------------
  176|      3|                        c,
  177|      3|                        timeout.tmout_list);
  178|       |
  179|      3|  c->timeout.in_cstm_tmout_list = false;
  180|      3|}

_Z18mhd_conn_tls_checkP14MHD_Connection:
   67|      6|{
   68|      6|  mhd_assert (mhd_C_HAS_TLS (c));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   69|      6|  mhd_assert (mhd_D_HAS_TLS (c->daemon));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   70|      6|  mhd_assert ((mhd_CONN_STATE_TLS_HANDSHAKE_RECV == c->conn_state) \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   71|      6|              || (mhd_CONN_STATE_TLS_HANDSHAKE_SEND == c->conn_state) \
   72|      6|              || (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state));
   73|       |
   74|      6|  if (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state)
  ------------------
  |  Branch (74:7): [True: 0, False: 6]
  ------------------
   75|      0|    return mhd_COMM_LAYER_OK; /* TLS is already connected */
   76|       |
   77|      6|  if (0 != (mhd_SOCKET_NET_STATE_ERROR_READY & c->sk.ready))
  ------------------
  |  Branch (77:7): [True: 0, False: 6]
  ------------------
   78|      0|  {
   79|       |    /* Some socket error has been detected. Do not try to handshake. */
   80|      0|    if (mhd_SOCKET_ERR_NO_ERROR == c->sk.state.discnt_err)
  ------------------
  |  Branch (80:9): [True: 0, False: 0]
  ------------------
   81|      0|      c->sk.state.discnt_err = mhd_socket_error_get_from_socket (c->sk.fd);
   82|      0|    mhd_conn_start_closing_skt_err (c);
  ------------------
  |  |  396|      0|        mhd_conn_start_closing ((c), mhd_CONN_CLOSE_SOCKET_ERR, NULL)
  ------------------
   83|      0|    return mhd_COMM_LAYER_BROKEN;
   84|      0|  }
   85|       |  /* Check whether the socket is ready for the required send/recv operation */
   86|      6|  if (0 == (((mhd_CONN_FLAG_RECV | mhd_CONN_FLAG_SEND)
  ------------------
  |  |  111|      6|#define mhd_CONN_FLAG_RECV      (1u << 0)
  ------------------
                if (0 == (((mhd_CONN_FLAG_RECV | mhd_CONN_FLAG_SEND)
  ------------------
  |  |  112|      6|#define mhd_CONN_FLAG_SEND      (1u << 1)
  ------------------
  |  Branch (86:7): [True: 6, False: 0]
  ------------------
   87|      6|             & ((unsigned int)c->conn_state)
   88|      6|             & ((unsigned int)c->sk.ready))))
   89|      6|    return mhd_COMM_LAYER_PROCESSING;
   90|       |
   91|      0|  switch (mhd_tls_conn_handshake (c->tls))
  ------------------
  |  |  216|      0|        mhd_TLS_FUNC (_conn_handshake)((c_tls))
  |  |  ------------------
  |  |  |  |  251|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#define mhd_MACRO_CONCAT3(a, b, c)      mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   64|      0|#define mhd_MACRO_CONCAT3_(a, b, c)     a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|      0|  {
   93|      0|  case mhd_TLS_PROCED_SUCCESS:
  ------------------
  |  Branch (93:3): [True: 0, False: 0]
  ------------------
   94|      0|    c->conn_state = mhd_CONN_STATE_TLS_CONNECTED;
   95|      0|    if (!c->sk.props.is_nonblck)
  ------------------
  |  Branch (95:9): [True: 0, False: 0]
  ------------------
   96|      0|    {
   97|       |      /* The socket is blocking (and polling is not edge-triggering),
   98|       |         probably all available data has been processed already. */
   99|      0|      c->sk.ready = (enum mhd_SocketNetState) /* Clear 'recv-ready' and 'send-ready' */
  100|      0|                    (((unsigned int)c->sk.ready)
  101|      0|                     & (~(enum mhd_SocketNetState)
  102|      0|                        mhd_SOCKET_NET_STATE_SEND_READY)
  103|      0|                     & (~(enum mhd_SocketNetState)
  104|      0|                        mhd_SOCKET_NET_STATE_RECV_READY));
  105|      0|    }
  106|      0|#ifdef mhd_HAVE_TLS_ACME
  107|      0|    if (mhd_tls_conn_is_acme (c->tls))
  ------------------
  |  |  324|      0|        mhd_TLS_FUNC (_conn_is_acme)((c_tls))
  |  |  ------------------
  |  |  |  |  251|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#define mhd_MACRO_CONCAT3(a, b, c)      mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   64|      0|#define mhd_MACRO_CONCAT3_(a, b, c)     a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (324:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  108|      0|    {
  109|      0|      mhd_conn_start_closing_acme_alpn_challenge_completed (c);
  ------------------
  |  |  437|      0|      mhd_conn_start_closing ((c), \
  |  |  438|      0|                              mhd_CONN_CLOSE_ACME_ALPN_CHALLENGE_COMPLETED, \
  |  |  439|      0|                              NULL)
  ------------------
  110|      0|      return mhd_COMM_LAYER_BROKEN;
  111|      0|    }
  112|      0|#endif /* mhd_HAVE_TLS_ACME */
  113|      0|    if (mhd_tls_conn_has_data_in (c->tls))
  ------------------
  |  |  252|      0|        mhd_TLS_FUNC (_conn_has_data_in)((c_tls))
  |  |  ------------------
  |  |  |  |  251|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#define mhd_MACRO_CONCAT3(a, b, c)      mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   64|      0|#define mhd_MACRO_CONCAT3_(a, b, c)     a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (252:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  114|      0|      c->tls_has_data_in = mhd_TLS_BUF_HAS_DATA_IN;
  115|       |    /* TLS is connected now, set event loop state based on HTTP protocol.
  116|       |       Some early application-level data could be processing in this round. */
  117|      0|    mhd_conn_event_loop_state_update (c);
  118|       |
  119|      0|    return mhd_COMM_LAYER_OK;
  120|      0|    break;
  121|      0|  case mhd_TLS_PROCED_RECV_MORE_NEEDED:
  ------------------
  |  Branch (121:3): [True: 0, False: 0]
  ------------------
  122|      0|    c->sk.ready = (enum mhd_SocketNetState) /* Clear 'recv-ready' */
  123|      0|                  (((unsigned int)c->sk.ready)
  124|      0|                   & (~(enum mhd_SocketNetState)
  125|      0|                      mhd_SOCKET_NET_STATE_RECV_READY));
  126|      0|    mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
  127|       |  /* Intentional fallthrough */
  128|      0|  case mhd_TLS_PROCED_RECV_INTERRUPTED:
  ------------------
  |  Branch (128:3): [True: 0, False: 0]
  ------------------
  129|      0|    c->conn_state = mhd_CONN_STATE_TLS_HANDSHAKE_RECV;
  130|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  131|      0|    break;
  132|      0|  case mhd_TLS_PROCED_SEND_MORE_NEEDED:
  ------------------
  |  Branch (132:3): [True: 0, False: 0]
  ------------------
  133|      0|    c->sk.ready = (enum mhd_SocketNetState) /* Clear 'send-ready' */
  134|      0|                  (((unsigned int)c->sk.ready)
  135|      0|                   & (~(enum mhd_SocketNetState)
  136|      0|                      mhd_SOCKET_NET_STATE_SEND_READY));
  137|      0|    mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
  138|       |  /* Intentional fallthrough */
  139|      0|  case mhd_TLS_PROCED_SEND_INTERRUPTED:
  ------------------
  |  Branch (139:3): [True: 0, False: 0]
  ------------------
  140|      0|    c->conn_state = mhd_CONN_STATE_TLS_HANDSHAKE_SEND;
  141|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  142|      0|    break;
  143|      0|  case mhd_TLS_PROCED_FAILED:
  ------------------
  |  Branch (143:3): [True: 0, False: 0]
  ------------------
  144|      0|    c->conn_state = mhd_CONN_STATE_TLS_FAILED;
  145|      0|    mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  146|      0|                 MHD_SC_TLS_CONNECTION_HANDSHAKED_FAILED, \
  147|      0|                 "Failed to perform TLS handshake on the new connection");
  148|      0|    c->sk.state.discnt_err = mhd_SOCKET_ERR_TLS;
  149|      0|    mhd_conn_start_closing_skt_err (c);
  ------------------
  |  |  396|      0|        mhd_conn_start_closing ((c), mhd_CONN_CLOSE_SOCKET_ERR, NULL)
  ------------------
  150|      0|    return mhd_COMM_LAYER_BROKEN;
  151|      0|    break;
  152|      0|  default:
  ------------------
  |  Branch (152:3): [True: 0, False: 0]
  ------------------
  153|      0|    mhd_assert (0 && "Should be unreachable");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  154|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  155|      0|    return mhd_COMM_LAYER_BROKEN;
  156|      0|  }
  157|       |
  158|      0|  mhd_conn_mark_ready_update (c);
  159|      0|  return mhd_COMM_LAYER_PROCESSING;
  160|      0|}

_Z28mhd_daemon_get_master_daemonP10MHD_Daemon:
   63|      2|{
   64|      2|#ifdef MHD_SUPPORT_THREADS
   65|      2|  if (mhd_D_HAS_MASTER (d))
  ------------------
  |  | 1545|      2|#define mhd_D_HAS_MASTER(d) mhd_D_TYPE_HAS_MASTER_DAEMON ((d)->threading.d_type)
  |  |  ------------------
  |  |  |  | 1010|      2|          (mhd_DAEMON_TYPE_WORKER == (t))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1010:11): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|      0|    return d->threading.hier.master;
   67|      2|#endif /* MHD_SUPPORT_THREADS */
   68|      2|  return d;
   69|      2|}
_Z23mhd_daemon_reclaim_lbufP10MHD_Daemonm:
  144|      1|{
  145|      1|  struct MHD_Daemon *const masterd = mhd_daemon_get_master_daemon (d);
  146|      1|  mhd_assert (0 != reclaimed_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  147|      1|  mhd_mutex_lock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  293|      1|#  define mhd_mutex_lock_chk(pmutex) do {        \
  |  |  294|      1|            if (! mhd_mutex_lock((pmutex)))       \
  |  |  ------------------
  |  |  |  |  252|      1|#    define mhd_mutex_lock(pmutex) (0 == pthread_mutex_lock((pmutex)))
  |  |  ------------------
  |  |  |  Branch (294:17): [True: 0, False: 1]
  |  |  ------------------
  |  |  295|      1|              MHD_PANIC ("Failed to lock mutex."); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  296|      1|          } while (0)
  |  |  ------------------
  |  |  |  Branch (296:20): [Folded, False: 1]
  |  |  ------------------
  ------------------
  148|      1|  masterd->req_cfg.large_buf.space_left += reclaimed_size;
  149|      1|  mhd_mutex_unlock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  303|      1|#  define mhd_mutex_unlock_chk(pmutex) do {        \
  |  |  304|      1|            if (! mhd_mutex_unlock((pmutex)))       \
  |  |  ------------------
  |  |  |  |  267|      1|#    define mhd_mutex_unlock(pmutex) (0 == pthread_mutex_unlock((pmutex)))
  |  |  ------------------
  |  |  |  Branch (304:17): [True: 0, False: 1]
  |  |  ------------------
  |  |  305|      1|              MHD_PANIC ("Failed to unlock mutex."); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      1|          } while (0)
  |  |  ------------------
  |  |  |  Branch (306:20): [Folded, False: 1]
  |  |  ------------------
  ------------------
  150|      1|}
_Z28mhd_daemon_extend_lbuf_up_toP10MHD_DaemonmP10mhd_Buffer:
  212|      1|{
  213|      1|  void *new_alloc;
  214|      1|  size_t grow_size;
  215|      1|  mhd_assert (NULL != buf->data || 0 == buf->size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  216|      1|  mhd_assert (0 != buf->size || NULL == buf->data);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  217|      1|  mhd_assert (0 != desired_grow_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  218|       |
  219|      1|  grow_size = mhd_daemon_claim_lbuf_up_to (d, desired_grow_size);
  220|       |
  221|      1|  new_alloc = NULL;
  222|      1|  if (NULL == buf->data)
  ------------------
  |  Branch (222:7): [True: 1, False: 0]
  ------------------
  223|      1|  {
  224|      1|    while ((0 != grow_size)
  ------------------
  |  Branch (224:12): [True: 1, False: 0]
  ------------------
  225|      1|           && (NULL == (new_alloc = malloc (grow_size))))
  ------------------
  |  Branch (225:15): [True: 0, False: 1]
  ------------------
  226|      0|    {
  227|      0|      size_t reduce = grow_size / 2;
  228|      0|      if (sizeof(void *) >= (grow_size - reduce))
  ------------------
  |  Branch (228:11): [True: 0, False: 0]
  ------------------
  229|      0|        reduce = grow_size;
  230|      0|      mhd_daemon_reclaim_lbuf (d,
  231|      0|                               reduce);
  232|      0|      grow_size -= reduce;
  233|      0|    }
  234|      1|  }
  235|      0|  else
  236|      0|  {
  237|      0|    while ((0 != grow_size)
  ------------------
  |  Branch (237:12): [True: 0, False: 0]
  ------------------
  238|      0|           && (NULL == (new_alloc = realloc (buf->data,
  ------------------
  |  Branch (238:15): [True: 0, False: 0]
  ------------------
  239|      0|                                             buf->size + grow_size))))
  240|      0|    {
  241|      0|      size_t reduce = grow_size / 2;
  242|      0|      if (sizeof(void *) >= (grow_size - reduce))
  ------------------
  |  Branch (242:11): [True: 0, False: 0]
  ------------------
  243|      0|        reduce = grow_size;
  244|      0|      mhd_daemon_reclaim_lbuf (d,
  245|      0|                               reduce);
  246|      0|      grow_size -= reduce;
  247|      0|    }
  248|      0|  }
  249|       |
  250|      1|  if (NULL != new_alloc)
  ------------------
  |  Branch (250:7): [True: 1, False: 0]
  ------------------
  251|      1|  {
  252|      1|    mhd_assert (0 != grow_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  253|      1|    buf->data = (char *)new_alloc;
  254|      1|    buf->size += grow_size;
  255|      1|  }
  256|       |
  257|      1|  return grow_size;
  258|      1|}
_Z20mhd_daemon_free_lbufP10MHD_DaemonP10mhd_Buffer:
  265|      1|{
  266|      1|  if (0 == buf->size)
  ------------------
  |  Branch (266:7): [True: 0, False: 1]
  ------------------
  267|      0|  {
  268|      0|    mhd_assert (NULL == buf->data);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  269|      0|    return;
  270|      0|  }
  271|      1|  free (buf->data);
  272|       |  buf->data = NULL;
  273|      1|  mhd_daemon_reclaim_lbuf (d, buf->size);
  274|      1|  buf->size = 0;
  275|      1|}
daemon_funcs.c:_ZL27mhd_daemon_claim_lbuf_up_toP10MHD_Daemonm:
  118|      1|{
  119|      1|  size_t ret;
  120|      1|  struct MHD_Daemon *const masterd = mhd_daemon_get_master_daemon (d);
  121|      1|  mhd_assert (0 != requested_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  122|      1|  if (0 == masterd->req_cfg.large_buf.space_left)
  ------------------
  |  Branch (122:7): [True: 0, False: 1]
  ------------------
  123|      0|    return false; /* Shortcut for typical use without large buffer */
  124|       |
  125|      1|  mhd_mutex_lock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  293|      1|#  define mhd_mutex_lock_chk(pmutex) do {        \
  |  |  294|      1|            if (! mhd_mutex_lock((pmutex)))       \
  |  |  ------------------
  |  |  |  |  252|      1|#    define mhd_mutex_lock(pmutex) (0 == pthread_mutex_lock((pmutex)))
  |  |  ------------------
  |  |  |  Branch (294:17): [True: 0, False: 1]
  |  |  ------------------
  |  |  295|      1|              MHD_PANIC ("Failed to lock mutex."); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  296|      1|          } while (0)
  |  |  ------------------
  |  |  |  Branch (296:20): [Folded, False: 1]
  |  |  ------------------
  ------------------
  126|      1|  if (masterd->req_cfg.large_buf.space_left >= requested_size)
  ------------------
  |  Branch (126:7): [True: 0, False: 1]
  ------------------
  127|      0|  {
  128|      0|    ret = requested_size;
  129|      0|    masterd->req_cfg.large_buf.space_left -= requested_size;
  130|      0|  }
  131|      1|  else
  132|      1|  {
  133|      1|    ret = masterd->req_cfg.large_buf.space_left;
  134|      1|    masterd->req_cfg.large_buf.space_left = 0;
  135|      1|  }
  136|      1|  mhd_mutex_unlock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  303|      1|#  define mhd_mutex_unlock_chk(pmutex) do {        \
  |  |  304|      1|            if (! mhd_mutex_unlock((pmutex)))       \
  |  |  ------------------
  |  |  |  |  267|      1|#    define mhd_mutex_unlock(pmutex) (0 == pthread_mutex_unlock((pmutex)))
  |  |  ------------------
  |  |  |  Branch (304:17): [True: 0, False: 1]
  |  |  ------------------
  |  |  305|      1|              MHD_PANIC ("Failed to unlock mutex."); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  306|      1|          } while (0)
  |  |  ------------------
  |  |  |  Branch (306:20): [Folded, False: 1]
  |  |  ------------------
  ------------------
  137|      1|  return ret;
  138|      1|}

_Z10mhd_loggerP10MHD_Daemon14MHD_StatusCodePKcz:
   59|     24|{
   60|     24|  if (NULL != daemon->log_params.v_log_cb)
  ------------------
  |  Branch (60:7): [True: 0, False: 24]
  ------------------
   61|      0|  {
   62|      0|    va_list vargs;
   63|      0|    va_start (vargs, fm);
   64|      0|    daemon->log_params.v_log_cb (daemon->log_params.v_log_cb_cls,
   65|      0|                                 sc, fm, vargs);
   66|       |    va_end (vargs);
   67|      0|  }
   68|     24|}

_Z21mhd_parse_http_methodmPKc:
  314|      6|{
  315|      6|  mhd_assert ('\0' == mtd[len]);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  316|       |  /* The required terminating zero makes four-byte loads safe at length 3 */
  317|      6|  if (mhd_COND_ALMOST_ALWAYS (3u <= len))
  ------------------
  |  |  183|      6|#define mhd_COND_ALMOST_ALWAYS(cond)    mhd_COND_PRED_TRUE_P ((cond), 0.99)
  |  |  ------------------
  |  |  |  |  142|      6|          __builtin_expect_with_probability (! ! (cond), ! 0, (prob))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:11): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|      6|  {
  319|       |    /* Rows 0..4 cover lengths 3..7.  Longer names use row 5, whose stored
  320|       |       codes are zero, so they always yield OTHER. */
  321|      6|    const size_t row = ((7u < len) ? 8u : len) - 3u;
  ------------------
  |  Branch (321:25): [True: 0, False: 6]
  ------------------
  322|      6|    const uint_least32_t first_bytes = mhd_H_M_LOAD32 (mtd);
  ------------------
  |  |  145|      6|#  define mhd_H_M_LOAD32(p) mhd_GET_32BIT_LE_UNALIGN (p)
  ------------------
  323|      6|    const uint_least32_t last_bytes = mhd_H_M_LOAD32 (mtd + len - 3u);
  ------------------
  |  |  145|      6|#  define mhd_H_M_LOAD32(p) mhd_GET_32BIT_LE_UNALIGN (p)
  ------------------
  324|       |    /* The first and the last bytes can overlap.  At lengths 3..7 they cover
  325|       |       every letter, so the key includes the entire name. */
  326|      6|    const uint_least64_t key =
  327|      6|      ((uint_least64_t)first_bytes) | (((uint_least64_t)last_bytes) << 32u);
  328|       |    /* Subtracting an equality result (0 or 1) from unsigned zero gives an
  329|       |       all-zero or all-ones mask.  The candidate keys differ, so at most one
  330|       |       of mask0 and mask1 can be non-zero. */
  331|      6|    const unsigned int mask0 =
  332|      6|      0u - (unsigned int)(mhd_h_m_tbl_64[row] == key);
  333|      6|    const unsigned int mask1 =
  334|      6|      0u - (unsigned int)(mhd_h_m_tbl_64[5u + row] == key);
  335|       |
  336|       |    /* The stored codes are code ^ OTHER.  Each mask retains the stored code
  337|       |       of its matching candidate and clears it otherwise.  With no match the
  338|       |       result is OTHER; one match gives OTHER ^ (code ^ OTHER), restoring the
  339|       |       code.  An unused candidate's stored code is zero, so even a matching
  340|       |       key leaves OTHER. */
  341|      6|    return (enum mhd_HTTP_Method)(mhd_HTTP_METHOD_OTHER
  342|      6|                                  ^ (mhd_H_M_CODE64 (2u * row) & mask0)
  ------------------
  |  |  303|      6|            ((uint8_t) ((8u == sizeof(mhd_h_m_tbl_64[0])) ?              \
  |  |  ------------------
  |  |  |  Branch (303:25): [True: 6, Folded]
  |  |  ------------------
  |  |  304|      6|                        ((const uint8_t *) (mhd_h_m_tbl_64 + 7u))[(i)] : \
  |  |  305|      6|                        mhd_H_M_CODE64_BY_VAL (i)))
  |  |  ------------------
  |  |  |  |  296|      0|          ((uint8_t) (mhd_h_m_tbl_64[7u + (i) / 8u] >> (8u * ((i) % 8u))))
  |  |  ------------------
  ------------------
  343|      6|                                  ^ (mhd_H_M_CODE64 (2u * row + 1u) & mask1));
  ------------------
  |  |  303|      6|            ((uint8_t) ((8u == sizeof(mhd_h_m_tbl_64[0])) ?              \
  |  |  ------------------
  |  |  |  Branch (303:25): [True: 6, Folded]
  |  |  ------------------
  |  |  304|      6|                        ((const uint8_t *) (mhd_h_m_tbl_64 + 7u))[(i)] : \
  |  |  305|      6|                        mhd_H_M_CODE64_BY_VAL (i)))
  |  |  ------------------
  |  |  |  |  296|      0|          ((uint8_t) (mhd_h_m_tbl_64[7u + (i) / 8u] >> (8u * ((i) % 8u))))
  |  |  ------------------
  ------------------
  344|      6|  }
  345|      0|  return mhd_PARSE_HTTP_METHOD_OUTSIDE_3_7 (len, mtd);
  ------------------
  |  |  183|      0|  ((mhd_COND_VERY_RARELY ((1u == (len)) && ('*' == (mtd)[0]))) ? \
  |  |  ------------------
  |  |  |  |  200|      0|#define mhd_COND_VERY_RARELY(cond)      mhd_COND_PRED_FALSE_P ((cond), 0.95)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|          __builtin_expect_with_probability (! ! (cond), 0, (prob))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:51): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (144:51): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (183:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|      mhd_HTTP_METHOD_ASTERISK : mhd_HTTP_METHOD_OTHER)
  ------------------
  346|      6|}

_Z15mhd_pool_createm18mhd_MemPoolZeroing:
  317|      8|{
  318|      8|  struct mhd_MemoryPool *pool;
  319|      8|  size_t alloc_size;
  320|       |
  321|      8|  mhd_assert (max > 0);
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  322|      8|  mhd_assert (mhd_RED_ZONE_SIZE < (max + mhd_RED_ZONE_SIZE));
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  323|      8|  max += mhd_RED_ZONE_SIZE;
  ------------------
  |  |  139|      8|#  define mhd_RED_ZONE_SIZE (0)
  ------------------
  324|      8|  alloc_size = 0;
  325|      8|  pool = (struct mhd_MemoryPool *)malloc (sizeof (struct mhd_MemoryPool));
  326|      8|  if (NULL == pool)
  ------------------
  |  Branch (326:7): [True: 0, False: 8]
  ------------------
  327|      0|    return NULL;
  328|      8|  pool->zeroing = zeroing;
  329|      8|#ifdef mhd_USE_LARGE_ALLOCS
  330|      8|  pool->is_large_alloc = false;
  331|      8|  if ((max <= 32 * 1024)
  ------------------
  |  Branch (331:7): [True: 8, False: 0]
  ------------------
  332|      0|      || (max < MHD_sys_page_size_ * 4 / 3))
  ------------------
  |  Branch (332:10): [True: 0, False: 0]
  ------------------
  333|      8|  {
  334|      8|    pool->memory = (uint8_t *)mhd_MAP_FAILED;
  ------------------
  |  |  123|      8|#    define mhd_MAP_FAILED MAP_FAILED
  ------------------
  335|      8|  }
  336|      0|  else
  337|      0|  {
  338|       |    /* Round up allocation to page granularity. */
  339|      0|    alloc_size = max + MHD_sys_page_size_ - 1;
  340|      0|    alloc_size -= alloc_size % MHD_sys_page_size_;
  341|      0|#  if defined(mhd_MAP_ANONYMOUS)
  342|      0|    pool->memory = (uint8_t *)mmap (NULL,
  343|      0|                                    alloc_size,
  344|      0|                                    PROT_READ | PROT_WRITE,
  345|      0|                                    MAP_PRIVATE | mhd_MAP_ANONYMOUS,
  ------------------
  |  |  108|      0|#  define mhd_MAP_ANONYMOUS MAP_ANONYMOUS
  ------------------
  346|      0|                                    -1,
  347|      0|                                    0);
  348|       |#  else  /* ! mhd_MAP_ANONYMOUS */
  349|       |    pool->memory = (uint8_t *)VirtualAlloc (NULL,
  350|       |                                            alloc_size,
  351|       |                                            MEM_COMMIT | MEM_RESERVE,
  352|       |                                            PAGE_READWRITE);
  353|       |#  endif /* ! mhd_MAP_ANONYMOUS */
  354|      0|  }
  355|      8|  if (mhd_MAP_FAILED != pool->memory)
  ------------------
  |  |  123|      8|#    define mhd_MAP_FAILED MAP_FAILED
  ------------------
  |  Branch (355:7): [True: 0, False: 8]
  ------------------
  356|      0|    pool->is_large_alloc = true;
  357|      8|  else
  358|      8|#endif /* mhd_USE_LARGE_ALLOCS */
  359|      8|  if (!0)
  ------------------
  |  Branch (359:7): [True: 8, Folded]
  ------------------
  360|      8|  {
  361|      8|    alloc_size = mhd_ROUND_TO_ALIGN (max);
  ------------------
  |  |  133|      8|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  ------------------
  |  |  |  |   62|      8|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  |  |  134|      8|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  ------------------
  |  |  |  |   62|      8|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  ------------------
  |  |  |  |   62|      8|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  ------------------
  362|      8|    if (MHD_MEMPOOL_ZEROING_NEVER == zeroing)
  ------------------
  |  Branch (362:9): [True: 0, False: 8]
  ------------------
  363|      0|      pool->memory = (uint8_t *)malloc (alloc_size);
  364|      8|    else
  365|      8|      pool->memory = (uint8_t *)mhd_calloc (1, alloc_size);
  ------------------
  |  |   64|      8|#  define mhd_calloc calloc
  ------------------
  366|      8|    if (((uint8_t *)NULL) == pool->memory)
  ------------------
  |  Branch (366:9): [True: 0, False: 8]
  ------------------
  367|      0|    {
  368|      0|      free (pool);
  369|      0|      return NULL;
  370|      0|    }
  371|      8|  }
  372|      8|  mhd_assert (0 == (((uintptr_t)pool->memory) % mhd_MEMPOOL_ALIGN_SIZE));
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  373|      8|  pool->pos = 0;
  374|      8|  pool->end = alloc_size;
  375|      8|  pool->size = alloc_size;
  376|      8|  mhd_assert (0 < alloc_size);
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  377|      8|  mhd_POISON_MEMORY (pool->memory, pool->size);
  ------------------
  |  |  141|      8|#  define mhd_POISON_MEMORY(pointer, size) (void) 0
  ------------------
  378|      8|  return pool;
  379|      8|}
_Z16mhd_pool_destroyP14mhd_MemoryPool:
  384|      8|{
  385|      8|  if (NULL == pool)
  ------------------
  |  Branch (385:7): [True: 0, False: 8]
  ------------------
  386|      0|    return;
  387|       |
  388|      8|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  389|      8|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  390|      8|  mhd_assert (pool->pos == mhd_ROUND_TO_ALIGN (pool->pos));
  ------------------
  |  |   66|      8|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  391|      8|  mhd_UNPOISON_MEMORY (pool->memory, pool->size);
  ------------------
  |  |  142|      8|#  define mhd_UNPOISON_MEMORY(pointer, size) (void) 0
  ------------------
  392|      8|#ifdef mhd_USE_LARGE_ALLOCS
  393|      8|  if (pool->is_large_alloc)
  ------------------
  |  Branch (393:7): [True: 0, False: 8]
  ------------------
  394|      0|  {
  395|      0|#  if defined(mhd_MAP_ANONYMOUS)
  396|      0|    munmap (pool->memory,
  397|      0|            pool->size);
  398|       |#  else
  399|       |    VirtualFree (pool->memory,
  400|       |                 0,
  401|       |                 MEM_RELEASE);
  402|       |#  endif
  403|      0|  }
  404|      8|  else
  405|      8|#endif /* mhd_USE_LARGE_ALLOCS*/
  406|      8|  if (!0)
  ------------------
  |  Branch (406:7): [True: 8, Folded]
  ------------------
  407|      8|    free (pool->memory);
  408|       |
  409|      8|  free (pool);
  410|      8|}
_Z18mhd_pool_try_allocP14mhd_MemoryPoolmPm:
  497|     79|{
  498|     79|  void *ret;
  499|     79|  size_t asize;
  500|       |
  501|     79|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  502|     79|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  503|     79|  mhd_assert (pool->pos == mhd_ROUND_TO_ALIGN (pool->pos));
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  504|     79|  asize = mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE (size);
  ------------------
  |  |  140|     79|#  define mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE(n) mhd_ROUND_TO_ALIGN (n)
  |  |  ------------------
  |  |  |  |  133|     79|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|     79|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |  134|     79|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|     79|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|     79|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  505|     79|  if ((0 == asize) && (0 != size))
  ------------------
  |  Branch (505:7): [True: 0, False: 79]
  |  Branch (505:23): [True: 0, False: 0]
  ------------------
  506|      0|  { /* size is too close to SIZE_MAX, very unlikely */
  507|      0|    *required_bytes = SIZE_MAX;
  508|      0|    return NULL;
  509|      0|  }
  510|     79|  if (asize > pool->end - pool->pos)
  ------------------
  |  Branch (510:7): [True: 0, False: 79]
  ------------------
  511|      0|  {
  512|      0|    mhd_assert ((pool->end - pool->pos) == \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  513|      0|                mhd_ROUND_TO_ALIGN (pool->end - pool->pos));
  514|      0|    if (asize <= pool->end)
  ------------------
  |  Branch (514:9): [True: 0, False: 0]
  ------------------
  515|      0|      *required_bytes = asize - (pool->end - pool->pos);
  516|      0|    else
  517|      0|      *required_bytes = SIZE_MAX;
  518|      0|    return NULL;
  519|      0|  }
  520|     79|  *required_bytes = 0;
  521|     79|  ret = &pool->memory[pool->end - asize];
  522|     79|  pool->end -= asize;
  523|     79|  mhd_UNPOISON_MEMORY (ret, size);
  ------------------
  |  |  142|     79|#  define mhd_UNPOISON_MEMORY(pointer, size) (void) 0
  ------------------
  524|     79|  return ret;
  525|     79|}
_Z19mhd_pool_deallocateP14mhd_MemoryPoolPvm:
  620|     12|{
  621|     12|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  622|     12|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  623|     12|  mhd_assert (block != NULL || block_size == 0);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  624|     12|  mhd_assert (pool->size >= block_size);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  625|     12|  mhd_assert (pool->pos == mhd_ROUND_TO_ALIGN (pool->pos));
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  626|       |
  627|     12|  if (NULL != block)
  ------------------
  |  Branch (627:7): [True: 6, False: 6]
  ------------------
  628|      6|  {   /* Have previously allocated data */
  629|      6|    const size_t block_offset = mp_ptr_diff_ (block, pool->memory);
  ------------------
  |  |  153|      6|          ((size_t) (((const uint8_t*) (p1)) - ((const uint8_t*) (p2))))
  ------------------
  630|      6|    mhd_assert (mp_ptr_le_ (pool->memory, block));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  631|      6|    mhd_assert (block_offset <= pool->size);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  632|      6|    mhd_assert ((block_offset != pool->pos) || (block_size == 0));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  633|       |    /* Zero-out deallocated region */
  634|      6|    if (0 != block_size)
  ------------------
  |  Branch (634:9): [True: 6, False: 0]
  ------------------
  635|      6|    {
  636|      6|      if (MHD_MEMPOOL_ZEROING_ON_RESET < pool->zeroing)
  ------------------
  |  Branch (636:11): [True: 0, False: 6]
  ------------------
  637|      0|        memset (block, 0, block_size);
  638|      6|      mhd_POISON_MEMORY (block, block_size);
  ------------------
  |  |  141|      6|#  define mhd_POISON_MEMORY(pointer, size) (void) 0
  ------------------
  639|      6|    }
  640|      0|#if !defined(MHD_FAVOR_SMALL_CODE) && !defined(MHD_ASAN_POISON_ACTIVE)
  641|      0|    else
  642|      0|      return; /* Zero size, no need to do anything */
  643|      6|#endif /* ! MHD_FAVOR_SMALL_CODE && ! MHD_ASAN_POISON_ACTIVE */
  644|      6|    if (block_offset <= pool->pos)
  ------------------
  |  Branch (644:9): [True: 0, False: 6]
  ------------------
  645|      0|    {
  646|       |      /* "Normal" block, not allocated "from the end". */
  647|      0|      const size_t alg_end =
  648|      0|        mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE (block_offset + block_size);
  ------------------
  |  |  140|      0|#  define mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE(n) mhd_ROUND_TO_ALIGN (n)
  |  |  ------------------
  |  |  |  |  133|      0|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |  134|      0|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  649|      0|      mhd_assert (alg_end <= pool->pos);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  650|      0|      if (alg_end == pool->pos)
  ------------------
  |  Branch (650:11): [True: 0, False: 0]
  ------------------
  651|      0|      {
  652|       |        /* The last allocated block, return deallocated block to the pool */
  653|      0|        size_t alg_start = mhd_ROUND_TO_ALIGN (block_offset);
  ------------------
  |  |  133|      0|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  ------------------
  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  |  |  134|      0|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  ------------------
  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  ------------------
  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  ------------------
  ------------------
  654|      0|        mhd_assert (alg_start >= block_offset);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  655|       |#if defined(MHD_ASAN_POISON_ACTIVE)
  656|       |        if (alg_start != block_offset)
  657|       |        {
  658|       |          mhd_POISON_MEMORY (pool->memory + block_offset, \
  659|       |                             alg_start - block_offset);
  660|       |        }
  661|       |        else if (0 != alg_start)
  662|       |        {
  663|       |          bool need_red_zone_before;
  664|       |          mhd_assert (mhd_RED_ZONE_SIZE <= alg_start);
  665|       |#  if defined(HAVE___ASAN_REGION_IS_POISONED)
  666|       |          need_red_zone_before =
  667|       |            (NULL == __asan_region_is_poisoned (pool->memory
  668|       |                                                + alg_start
  669|       |                                                - mhd_RED_ZONE_SIZE,
  670|       |                                                mhd_RED_ZONE_SIZE));
  671|       |#  elif defined(HAVE___ASAN_ADDRESS_IS_POISONED)
  672|       |          need_red_zone_before =
  673|       |            (0 == __asan_address_is_poisoned (pool->memory + alg_start - 1));
  674|       |#  else  /* ! HAVE___ASAN_ADDRESS_IS_POISONED */
  675|       |          need_red_zone_before = true; /* Unknown, assume new red zone needed */
  676|       |#  endif /* ! HAVE___ASAN_ADDRESS_IS_POISONED */
  677|       |          if (need_red_zone_before)
  678|       |          {
  679|       |            mhd_POISON_MEMORY (pool->memory + alg_start, mhd_RED_ZONE_SIZE);
  680|       |            alg_start += mhd_RED_ZONE_SIZE;
  681|       |          }
  682|       |        }
  683|       |#endif /* MHD_ASAN_POISON_ACTIVE */
  684|      0|        mhd_assert (alg_start <= pool->pos);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  685|      0|        mhd_assert (alg_start == mhd_ROUND_TO_ALIGN (alg_start));
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  686|      0|        pool->pos = alg_start;
  687|      0|      }
  688|      0|    }
  689|      6|    else
  690|      6|    {
  691|       |      /* Allocated "from the end" block. */
  692|       |      /* The size and the pointers of such block should not be manipulated by
  693|       |         MHD code (block split is disallowed). */
  694|      6|      mhd_assert (block_offset >= pool->end);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  695|      6|      mhd_assert (mhd_ROUND_TO_ALIGN (block_offset) == block_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  696|      6|      if (block_offset == pool->end)
  ------------------
  |  Branch (696:11): [True: 0, False: 6]
  ------------------
  697|      0|      {
  698|       |        /* The last allocated block, return deallocated block to the pool */
  699|      0|        const size_t alg_end =
  700|      0|          mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE (block_offset + block_size);
  ------------------
  |  |  140|      0|#  define mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE(n) mhd_ROUND_TO_ALIGN (n)
  |  |  ------------------
  |  |  |  |  133|      0|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |  134|      0|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      0|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|      0|        pool->end = alg_end;
  702|      0|      }
  703|      6|    }
  704|      6|  }
  705|     12|}

http_method_parse.c:_ZL24mhd_GET_32BIT_LE_UNALIGNPKv:
  312|     12|{
  313|     12|  uint32_t aligned_src;
  314|     12|  memcpy (&aligned_src, addr, sizeof(aligned_src));
  315|     12|  return mhd_GET_32BIT_LE (&aligned_src);
  ------------------
  |  |  294|     12|          (*(const uint32_t*) (addr))
  ------------------
  316|     12|}

_Z25mhd_socket_set_hard_closei:
  149|      3|{
  150|      3|#if defined(HAVE_DCLR_SOL_SOCKET) && defined(HAVE_DCLR_SO_LINGER)
  151|      3|  struct linger par;
  152|       |
  153|      3|  par.l_onoff = 1;
  154|      3|  par.l_linger = 0;
  155|       |
  156|      3|  return 0 == mhd_setsockopt (sckt, SOL_SOCKET, SO_LINGER,
  ------------------
  |  |  183|      3|          setsockopt ((sk),(l),(o_name),(po_value),(o_len))
  ------------------
  157|      3|                              (const void *)&par, sizeof (par));
  158|       |#else  /* ! SOL_SOCKET || ! SO_LINGER */
  159|       |  (void)sckt;
  160|       |  return false;
  161|       |#endif /* ! SOL_SOCKET || ! SO_LINGER */
  162|      3|}

_Z28mhd_str_equal_caseless_bin_nPKcS0_m:
 1084|     16|{
 1085|     16|  size_t i;
 1086|       |
 1087|    184|  for (i = 0; i < len; ++i)
  ------------------
  |  Branch (1087:15): [True: 168, False: 16]
  ------------------
 1088|    168|  {
 1089|    168|    const char c1 = str1[i];
 1090|    168|    const char c2 = str2[i];
 1091|    168|    if (charsequalcaseless (c1, c2))
  ------------------
  |  Branch (1091:9): [True: 168, False: 0]
  ------------------
 1092|    168|      continue;
 1093|      0|    else
 1094|      0|      return 0;
 1095|    168|  }
 1096|     16|  return !0;
 1097|     16|}
_Z19mhd_str_to_uint64_nPKcmPm:
 1565|      4|{
 1566|      4|  uint_fast64_t res;
 1567|      4|  size_t i;
 1568|       |
 1569|      4|  if (!maxlen || !isasciidigit (str[0]))
  ------------------
  |  Branch (1569:7): [True: 0, False: 4]
  |  Branch (1569:18): [True: 0, False: 4]
  ------------------
 1570|      0|    return 0;
 1571|       |
 1572|      4|  res = 0;
 1573|      4|  i = 0;
 1574|      4|  do
 1575|      4|  {
 1576|      4|    const int digit = (unsigned char)str[i] - '0';
 1577|      4|    uint_fast64_t prev_res = res;
 1578|       |
 1579|      4|    res *= 10;
 1580|      4|    if (res / 10 != prev_res)
  ------------------
  |  Branch (1580:9): [True: 0, False: 4]
  ------------------
 1581|      0|      return 0;
 1582|      4|    res += (unsigned int)digit;
 1583|      4|    if (res < (unsigned int)digit)
  ------------------
  |  Branch (1583:9): [True: 0, False: 4]
  ------------------
 1584|      0|      return 0;
 1585|      4|    i++;
 1586|      4|  } while ((i < maxlen)
  ------------------
  |  Branch (1586:12): [True: 0, False: 4]
  ------------------
 1587|      0|           && isasciidigit (str[i]));
  ------------------
  |  Branch (1587:15): [True: 0, False: 0]
  ------------------
 1588|       |
 1589|      4|  *out_val = res;
 1590|      4|  return i;
 1591|      4|}
_Z28mhd_str_pct_decode_lenient_nPKcmPcmPb:
 2125|      3|{
 2126|      3|  size_t r;
 2127|      3|  size_t w;
 2128|      3|  r = 0;
 2129|      3|  w = 0;
 2130|      3|  if (NULL != broken_encoding)
  ------------------
  |  Branch (2130:7): [True: 0, False: 3]
  ------------------
 2131|      0|    *broken_encoding = false;
 2132|      3|#ifndef MHD_FAVOR_SMALL_CODE
 2133|      3|  if (buf_size >= pct_encoded_len)
  ------------------
  |  Branch (2133:7): [True: 3, False: 0]
  ------------------
 2134|      3|  {
 2135|      7|    while (r < pct_encoded_len)
  ------------------
  |  Branch (2135:12): [True: 4, False: 3]
  ------------------
 2136|      4|    {
 2137|      4|      const char chr = pct_encoded[r];
 2138|      4|      if ('%' == chr)
  ------------------
  |  Branch (2138:11): [True: 0, False: 4]
  ------------------
 2139|      0|      {
 2140|      0|        if (2 >= pct_encoded_len - r)
  ------------------
  |  Branch (2140:13): [True: 0, False: 0]
  ------------------
 2141|      0|        {
 2142|      0|          if (NULL != broken_encoding)
  ------------------
  |  Branch (2142:15): [True: 0, False: 0]
  ------------------
 2143|      0|            *broken_encoding = true;
 2144|      0|          decoded[w] = chr; /* Copy "as is" */
 2145|      0|        }
 2146|      0|        else
 2147|      0|        {
 2148|      0|          const char c1 = pct_encoded[++r];
 2149|      0|          const char c2 = pct_encoded[++r];
 2150|      0|          const int h = xdigittovalue (c1);
 2151|      0|          const int l = xdigittovalue (c2);
 2152|      0|          unsigned char out;
 2153|      0|          if ((0 > h) || (0 > l))
  ------------------
  |  Branch (2153:15): [True: 0, False: 0]
  |  Branch (2153:26): [True: 0, False: 0]
  ------------------
 2154|      0|          {
 2155|      0|            r -= 2;
 2156|      0|            if (NULL != broken_encoding)
  ------------------
  |  Branch (2156:17): [True: 0, False: 0]
  ------------------
 2157|      0|              *broken_encoding = true;
 2158|      0|            decoded[w] = chr; /* Copy "as is" */
 2159|      0|          }
 2160|      0|          else
 2161|      0|          {
 2162|      0|            out =
 2163|      0|              (unsigned char)
 2164|      0|              (((uint8_t)(((uint8_t)((unsigned int)h)) << 4))
 2165|      0|               | ((uint8_t)((unsigned int)l)));
 2166|      0|            decoded[w] = (char)out;
 2167|      0|          }
 2168|      0|        }
 2169|      0|      }
 2170|      4|      else
 2171|      4|        decoded[w] = chr;
 2172|      4|      ++r;
 2173|      4|      ++w;
 2174|      4|    }
 2175|      3|    return w;
 2176|      3|  }
 2177|      0|#endif /* ! MHD_FAVOR_SMALL_CODE */
 2178|      0|  while (r < pct_encoded_len)
  ------------------
  |  Branch (2178:10): [True: 0, False: 0]
  ------------------
 2179|      0|  {
 2180|      0|    const char chr = pct_encoded[r];
 2181|      0|    if (w >= buf_size)
  ------------------
  |  Branch (2181:9): [True: 0, False: 0]
  ------------------
 2182|      0|      return 0;
 2183|      0|    if ('%' == chr)
  ------------------
  |  Branch (2183:9): [True: 0, False: 0]
  ------------------
 2184|      0|    {
 2185|      0|      if (2 >= pct_encoded_len - r)
  ------------------
  |  Branch (2185:11): [True: 0, False: 0]
  ------------------
 2186|      0|      {
 2187|      0|        if (NULL != broken_encoding)
  ------------------
  |  Branch (2187:13): [True: 0, False: 0]
  ------------------
 2188|      0|          *broken_encoding = true;
 2189|      0|        decoded[w] = chr; /* Copy "as is" */
 2190|      0|      }
 2191|      0|      else
 2192|      0|      {
 2193|      0|        const char c1 = pct_encoded[++r];
 2194|      0|        const char c2 = pct_encoded[++r];
 2195|      0|        const int h = xdigittovalue (c1);
 2196|      0|        const int l = xdigittovalue (c2);
 2197|      0|        if ((0 > h) || (0 > l))
  ------------------
  |  Branch (2197:13): [True: 0, False: 0]
  |  Branch (2197:24): [True: 0, False: 0]
  ------------------
 2198|      0|        {
 2199|      0|          r -= 2;
 2200|      0|          if (NULL != broken_encoding)
  ------------------
  |  Branch (2200:15): [True: 0, False: 0]
  ------------------
 2201|      0|            *broken_encoding = true;
 2202|      0|          decoded[w] = chr; /* Copy "as is" */
 2203|      0|        }
 2204|      0|        else
 2205|      0|        {
 2206|      0|          unsigned char out;
 2207|      0|          out =
 2208|      0|            (unsigned char)
 2209|      0|            (((uint8_t)(((uint8_t)((unsigned int)h)) << 4))
 2210|      0|             | ((uint8_t)((unsigned int)l)));
 2211|      0|          decoded[w] = (char)out;
 2212|      0|        }
 2213|      0|      }
 2214|      0|    }
 2215|      0|    else
 2216|      0|      decoded[w] = chr;
 2217|      0|    ++r;
 2218|      0|    ++w;
 2219|      0|  }
 2220|      0|  return w;
 2221|      0|}
mhd_str.c:_ZL18charsequalcaselesscc:
  840|    168|{
  841|    168|  if (c1 == c2)
  ------------------
  |  Branch (841:7): [True: 168, False: 0]
  ------------------
  842|    168|    return true;
  843|       |  /* Fold case on both sides */
  844|      0|  c1 = ((char)(~0x20u & (unsigned char)c1));
  845|      0|  c2 = ((char)(~0x20u & (unsigned char)c2));
  846|      0|  return (c1 == c2) && isasciiupper (c1);
  ------------------
  |  Branch (846:10): [True: 0, False: 0]
  |  Branch (846:24): [True: 0, False: 0]
  ------------------
  847|    168|}
mhd_str.c:_ZL12isasciidigitc:
  136|      4|{
  137|      4|  return (c <= '9') && (c >= '0');
  ------------------
  |  Branch (137:10): [True: 4, False: 0]
  |  Branch (137:24): [True: 4, False: 0]
  ------------------
  138|      4|}

_Z33mhd_stream_prepare_for_post_parseP14MHD_Connection:
  448|      6|{
  449|      6|  mhd_assert (mhd_ACTION_POST_PARSE == c->rq.app_act.head_act.act);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  450|      6|  if (MHD_HTTP_POST_ENCODING_OTHER ==
  ------------------
  |  Branch (450:7): [True: 5, False: 1]
  ------------------
  451|      6|      c->rq.app_act.head_act.data.post_parse.enc)
  452|      5|  {
  453|      5|    if (!detect_post_enc (c))
  ------------------
  |  Branch (453:9): [True: 5, False: 0]
  ------------------
  454|      5|    {
  455|      5|      mhd_assert (MHD_POST_PARSE_RES_OK != c->rq.u_proc.post.parse_result);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  456|      5|      c->discard_request = true;
  457|      5|      c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
  458|      5|      return false;
  459|      5|    }
  460|      5|  }
  461|      1|  else if (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ==
  ------------------
  |  Branch (461:12): [True: 0, False: 1]
  ------------------
  462|      1|           c->rq.app_act.head_act.data.post_parse.enc)
  463|      0|  {
  464|      0|    if (!detect_mpart_boundary_from_the_header (c))
  ------------------
  |  Branch (464:9): [True: 0, False: 0]
  ------------------
  465|      0|    {
  466|      0|      mhd_assert (MHD_POST_PARSE_RES_OK != c->rq.u_proc.post.parse_result);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  467|      0|      c->discard_request = true;
  468|      0|      c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
  469|      0|      return false;
  470|      0|    }
  471|      0|  }
  472|      1|  else
  473|      1|    c->rq.u_proc.post.enc = c->rq.app_act.head_act.data.post_parse.enc;
  474|       |
  475|      1|  mhd_assert (MHD_HTTP_POST_ENCODING_OTHER != \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  476|      1|              c->rq.u_proc.post.enc);
  477|      1|  mhd_assert ((MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA != \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  478|      1|               c->rq.u_proc.post.enc) \
  479|      1|              || (4 < c->rq.u_proc.post.e_d.m_form.delim.size));
  480|       |
  481|      1|  init_post_parse_data (c);
  482|       |
  483|      1|  return true;
  484|      6|}
_Z21mhd_stream_post_parseP14MHD_ConnectionPmPc:
 2593|      6|{
 2594|      6|  struct mhd_PostParserData *const p_data = &(c->rq.u_proc.post);
 2595|      6|  size_t lbuf_left;
 2596|       |
 2597|      6|  mhd_assert (MHD_HTTP_POST_ENCODING_OTHER != p_data->enc);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2598|      6|  mhd_assert (c->rq.cntn.lbuf.size <= p_data->lbuf_limit);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2599|       |
 2600|      6|  if ((MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA == p_data->enc)
  ------------------
  |  Branch (2600:7): [True: 0, False: 6]
  ------------------
 2601|      0|      && (mhd_POST_MPART_ST_EPILOGUE == p_data->e_d.m_form.st))
  ------------------
  |  Branch (2601:10): [True: 0, False: 0]
  ------------------
 2602|      0|  {
 2603|       |    /* No need to process the data */
 2604|      0|    *pdata_size = 0; /* All data has been "processed" */
 2605|      0|    return false; /* Continue normal processing */
 2606|      0|  }
 2607|       |
 2608|       |  // TODO: support process in the connection buffer
 2609|       |
 2610|      6|  mhd_assert (c->rq.cntn.lbuf.size >= p_data->lbuf_used);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2611|      6|  lbuf_left = c->rq.cntn.lbuf.size - p_data->lbuf_used;
 2612|       |
 2613|      6|  if (*pdata_size + 1 > lbuf_left)
  ------------------
  |  Branch (2613:7): [True: 6, False: 0]
  ------------------
 2614|      6|    (void)extend_lbuf_up_to (c,
 2615|      6|                             *pdata_size + 1 - lbuf_left,
 2616|      6|                             &(c->rq.cntn.lbuf));
 2617|       |
 2618|      6|  while ((0 != *pdata_size)
  ------------------
  |  Branch (2618:10): [True: 6, False: 0]
  ------------------
 2619|      6|         && (c->rq.cntn.lbuf.size > p_data->lbuf_used))
  ------------------
  |  Branch (2619:13): [True: 1, False: 5]
  ------------------
 2620|      1|  {
 2621|      1|    size_t data_size_before_parse;
 2622|      1|    size_t copy_size = *pdata_size;
 2623|      1|    lbuf_left = c->rq.cntn.lbuf.size - p_data->lbuf_used;
 2624|      1|    if (lbuf_left < copy_size)
  ------------------
  |  Branch (2624:9): [True: 1, False: 0]
  ------------------
 2625|      1|      copy_size = lbuf_left;
 2626|       |
 2627|      1|    memcpy (c->rq.cntn.lbuf.data + p_data->lbuf_used,
 2628|      1|            buf,
 2629|      1|            copy_size);
 2630|      1|    p_data->lbuf_used += copy_size;
 2631|      1|    *pdata_size -= copy_size;
 2632|       |
 2633|      1|    data_size_before_parse = p_data->lbuf_used;
 2634|      1|    switch (p_data->enc)
 2635|      1|    {
 2636|      0|    case MHD_HTTP_POST_ENCODING_FORM_URLENCODED:
  ------------------
  |  Branch (2636:5): [True: 0, False: 1]
  ------------------
 2637|      0|      if (parse_post_urlenc (c,
  ------------------
  |  Branch (2637:11): [True: 0, False: 0]
  ------------------
 2638|      0|                             &(p_data->lbuf_used),
 2639|      0|                             c->rq.cntn.lbuf.data))
 2640|      0|        return true;
 2641|      0|      break;
 2642|      0|    case MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA:
  ------------------
  |  Branch (2642:5): [True: 0, False: 1]
  ------------------
 2643|      0|      if (parse_post_mpart (c,
  ------------------
  |  Branch (2643:11): [True: 0, False: 0]
  ------------------
 2644|      0|                            &(p_data->lbuf_used),
 2645|      0|                            c->rq.cntn.lbuf.data))
 2646|      0|        return true;
 2647|      0|      break;
 2648|      1|    case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (2648:5): [True: 1, False: 0]
  ------------------
 2649|      1|      if (parse_post_text (c,
  ------------------
  |  Branch (2649:11): [True: 1, False: 0]
  ------------------
 2650|      1|                           &(p_data->lbuf_used),
 2651|      1|                           c->rq.cntn.lbuf.data))
 2652|      1|        return true;
 2653|      0|      break;
 2654|      0|    case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (2654:5): [True: 0, False: 1]
  ------------------
 2655|      0|    default:
  ------------------
  |  Branch (2655:5): [True: 0, False: 1]
  ------------------
 2656|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
 2657|      0|      p_data->parse_result =
 2658|      0|        MHD_POST_PARSE_RES_PARTIAL_INVALID_POST_FORMAT;
 2659|      0|      c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
 2660|      0|      return true;
 2661|      1|    }
 2662|      0|    if (data_size_before_parse == p_data->lbuf_used)
  ------------------
  |  Branch (2662:9): [True: 0, False: 0]
  ------------------
 2663|      0|      break; /* Nothing consumed, not possible to add new data to the buffer now */
 2664|      0|  }
 2665|       |
 2666|      5|  if (0 != *pdata_size)
  ------------------
  |  Branch (2666:7): [True: 5, False: 0]
  ------------------
 2667|      5|    return report_low_lbuf_mem (c);
 2668|       |
 2669|      0|  return false; /* Continue normal processing */
 2670|      5|}
post_parser_funcs.c:_ZL15detect_post_encP14MHD_Connection:
  218|      5|{
  219|      5|  struct MHD_StringNullable hdr_cnt_tp;
  220|       |
  221|      5|  mhd_assert (mhd_HTTP_STAGE_BODY_RECEIVING > c->stage);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  222|       |
  223|      5|  if (!mhd_request_get_value_st (&(c->rq),
  ------------------
  |  |  101|      5|          mhd_request_get_value_n ((r),(k),mhd_SSTR_LEN (str),(str),(v_out))
  |  |  ------------------
  |  |  |  |   54|      5|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (223:7): [True: 5, False: 0]
  ------------------
  224|      5|                                 MHD_VK_HEADER,
  225|      5|                                 MHD_HTTP_HEADER_CONTENT_TYPE,
  226|      5|                                 &hdr_cnt_tp))
  227|      5|  {
  228|      5|    mhd_LOG_MSG (c->daemon, MHD_SC_REQ_POST_PARSE_FAILED_NO_CNTN_TYPE, \
  ------------------
  |  |   80|      5|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  229|      5|                 "The request POST data cannot be parsed because " \
  230|      5|                 "the request has no 'Content-Type:' header and no " \
  231|      5|                 "explicit POST encoding is set.");
  232|      5|    c->rq.u_proc.post.parse_result = MHD_POST_PARSE_RES_FAILED_NO_CNTN_TYPE;
  233|      5|    return false;  /* The "Content-Type:" is not defined by the client */
  234|      5|  }
  235|       |
  236|      0|  mhd_assert (NULL != hdr_cnt_tp.cstr);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  237|       |
  238|      0|  if (mhd_str_equal_caseless_n_st ("application/x-www-form-urlencoded",
  ------------------
  |  |  142|      0|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  143|      0|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  239|      0|                                   hdr_cnt_tp.cstr,
  240|      0|                                   hdr_cnt_tp.len))
  241|      0|  {
  242|      0|    c->rq.u_proc.post.enc = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
  243|      0|    return true;
  244|      0|  }
  245|       |
  246|      0|  if (1)
  ------------------
  |  Branch (246:7): [True: 0, Folded]
  ------------------
  247|      0|  {
  248|      0|    enum mhd_MPartDetectResult res;
  249|       |
  250|      0|    res = process_mpart_header (c,
  251|      0|                                (const struct MHD_String *)(const void *)
  252|      0|                                &hdr_cnt_tp);
  253|       |
  254|      0|    if (mhd_MPART_DET_OK == res)
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  ------------------
  255|      0|      return true;
  256|       |
  257|      0|    if (mhd_MPART_DET_ERROR_SET == res)
  ------------------
  |  Branch (257:9): [True: 0, False: 0]
  ------------------
  258|      0|      return false;
  259|       |
  260|      0|    mhd_assert (mhd_MPART_DET_NO_MPART == res);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  261|      0|  }
  262|       |
  263|      0|  if (1)
  ------------------
  |  Branch (263:7): [True: 0, Folded]
  ------------------
  264|      0|  {
  265|      0|    static const struct MHD_String txt_tkn = mhd_MSTR_INIT ("text/plain");
  ------------------
  |  |   59|      0|#define mhd_MSTR_INIT(sstr) { mhd_SSTR_LEN (sstr), (sstr)}
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  266|      0|    struct MHD_String h_cnt_tp_copy;
  267|      0|    mhd_assert (NULL != hdr_cnt_tp.cstr);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  268|      0|    h_cnt_tp_copy.len = hdr_cnt_tp.len;
  269|      0|    h_cnt_tp_copy.cstr = hdr_cnt_tp.cstr;
  270|       |
  271|      0|    if (mhd_str_starts_with_token_opt_param (&h_cnt_tp_copy,
  ------------------
  |  Branch (271:9): [True: 0, False: 0]
  ------------------
  272|      0|                                             &txt_tkn))
  273|      0|    {
  274|      0|      c->rq.u_proc.post.enc = MHD_HTTP_POST_ENCODING_TEXT_PLAIN;
  275|      0|      return true;
  276|      0|    }
  277|      0|  }
  278|      0|  mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  279|      0|               MHD_SC_REQ_POST_PARSE_FAILED_UNKNOWN_CNTN_TYPE, \
  280|      0|               "The request POST data cannot be parsed because " \
  281|      0|               "'Content-Type' header value is unknown or unsupported.");
  282|      0|  c->rq.u_proc.post.parse_result =
  283|      0|    MHD_POST_PARSE_RES_FAILED_UNKNOWN_CNTN_TYPE;
  284|      0|  return false;
  285|      0|}
post_parser_funcs.c:_ZL20init_post_parse_dataP14MHD_Connection:
  415|      1|{
  416|      1|  struct mhd_PostParserData *const pdata =
  417|      1|    &(c->rq.u_proc.post);
  418|       |
  419|      1|  mhd_assert (mhd_ACTION_POST_PARSE == c->rq.app_act.head_act.act);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  420|      1|  mhd_assert (MHD_HTTP_POST_ENCODING_OTHER != \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  421|      1|              c->rq.u_proc.post.enc);
  422|      1|  mhd_assert (0 == pdata->lbuf_used);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  423|       |
  424|      1|  pdata->lbuf_limit = c->rq.app_act.head_act.data.post_parse.buffer_size;
  425|       |
  426|      1|  switch (pdata->enc)
  427|      1|  {
  428|      0|  case MHD_HTTP_POST_ENCODING_FORM_URLENCODED:
  ------------------
  |  Branch (428:3): [True: 0, False: 1]
  ------------------
  429|      0|    reset_parse_field_data_urlenc (pdata);
  430|      0|    break;
  431|      0|  case MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA:
  ------------------
  |  Branch (431:3): [True: 0, False: 1]
  ------------------
  432|      0|    reset_parse_field_data_mpart_init (pdata);
  433|      0|    break;
  434|      1|  case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (434:3): [True: 1, False: 0]
  ------------------
  435|      1|    reset_parse_field_data_text (pdata);
  436|      1|    break;
  437|      0|  case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (437:3): [True: 0, False: 1]
  ------------------
  438|      0|  default:
  ------------------
  |  Branch (438:3): [True: 0, False: 1]
  ------------------
  439|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  440|      0|    break;
  441|      1|  }
  442|      1|}
post_parser_funcs.c:_ZL27reset_parse_field_data_textP18mhd_PostParserData:
  402|      2|{
  403|      2|  mhd_assert (MHD_HTTP_POST_ENCODING_TEXT_PLAIN == pdata->enc);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  404|      2|  memset (&(pdata->e_d.text), 0, sizeof(pdata->e_d.text));
  405|      2|  pdata->field_start = 0;
  406|      2|}
post_parser_funcs.c:_ZL17extend_lbuf_up_toP14MHD_ConnectionmP10mhd_Buffer:
  559|      6|{
  560|      6|  mhd_assert (mhd_ACTION_POST_PARSE == c->rq.app_act.head_act.act);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  561|      6|  mhd_assert (c->rq.u_proc.post.lbuf_limit >= buf->size);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  562|       |
  563|      6|  if (buf->size + desired_grow_size > c->rq.u_proc.post.lbuf_limit)
  ------------------
  |  Branch (563:7): [True: 6, False: 0]
  ------------------
  564|      6|    desired_grow_size = c->rq.u_proc.post.lbuf_limit - buf->size;
  565|       |
  566|      6|  if (0 == desired_grow_size)
  ------------------
  |  Branch (566:7): [True: 5, False: 1]
  ------------------
  567|      5|    return 0;
  568|       |
  569|      1|  return mhd_daemon_extend_lbuf_up_to (c->daemon,
  570|      1|                                       desired_grow_size,
  571|      1|                                       buf);
  572|      6|}
post_parser_funcs.c:_ZL15parse_post_textP14MHD_ConnectionPmPc:
 2373|      1|{
 2374|      1|  const int discp_lvl = c->daemon->req_cfg.strictness;
 2375|       |  /* Treat bare LF as the end of the line.
 2376|       |     The same logic used here as for parsing HTTP headers.
 2377|       |     Bare LF is processed as the end of the line or rejected as broken
 2378|       |     request. */
 2379|      1|  const bool bare_lf_as_crlf = mhd_ALLOW_BARE_LF_AS_CRLF (discp_lvl);
  ------------------
  |  | 1354|      1|#define mhd_ALLOW_BARE_LF_AS_CRLF(strictness) (0 >= strictness)
  ------------------
 2380|      1|  struct mhd_PostParserData *const p_data = &(c->rq.u_proc.post);
 2381|      1|  struct mhd_PostParserTextData *const tf = &(p_data->e_d.text); /**< the current "text" field */
 2382|      1|  size_t i;
 2383|      1|  bool enc_broken;
 2384|       |
 2385|      1|  mhd_assert (MHD_HTTP_POST_ENCODING_TEXT_PLAIN == c->rq.u_proc.post.enc);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2386|      1|  mhd_assert (MHD_POST_PARSE_RES_OK == p_data->parse_result);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2387|      1|  mhd_assert (!c->discard_request);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2388|      1|  mhd_assert (p_data->next_parse_pos < *pdata_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2389|       |
 2390|      1|  enc_broken = false;
 2391|      1|  i = p_data->next_parse_pos;
 2392|      4|  while (*pdata_size > i)
  ------------------
  |  Branch (2392:10): [True: 4, False: 0]
  ------------------
 2393|      4|  {
 2394|      4|    switch (tf->st)
 2395|      4|    {
 2396|      2|    case mhd_POST_TEXT_ST_NOT_STARTED:
  ------------------
  |  Branch (2396:5): [True: 2, False: 2]
  ------------------
 2397|      2|      mhd_assert (0 == p_data->field_start);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2398|      2|      mhd_assert (0 == p_data->value_off);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2399|      2|      p_data->field_start = i;
 2400|      2|      tf->name_idx = i;
 2401|      2|      tf->st = mhd_POST_TEXT_ST_NAME;
 2402|      2|      mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      2|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2403|       |    /* Intentional fallthrough */
 2404|      2|    case mhd_POST_TEXT_ST_NAME:
  ------------------
  |  Branch (2404:5): [True: 0, False: 4]
  ------------------
 2405|      2|      do /* Fast local loop */
 2406|      2|      {
 2407|      2|        if ('=' == buf[i])
  ------------------
  |  Branch (2407:13): [True: 0, False: 2]
  ------------------
 2408|      0|        {
 2409|      0|          tf->st = mhd_POST_TEXT_ST_AT_EQ;
 2410|      0|          break;
 2411|      0|        }
 2412|      2|        else if ('\r' == buf[i])
  ------------------
  |  Branch (2412:18): [True: 1, False: 1]
  ------------------
 2413|      1|        {
 2414|      1|          tf->st = mhd_POST_TEXT_ST_AT_CR;
 2415|      1|          break;
 2416|      1|        }
 2417|      1|        else if ('\n' == buf[i])
  ------------------
  |  Branch (2417:18): [True: 1, False: 0]
  ------------------
 2418|      1|        {
 2419|      1|          tf->st = mhd_POST_TEXT_ST_AT_LF_BARE;
 2420|      1|          break;
 2421|      1|        }
 2422|      2|      } while (*pdata_size > ++i);
  ------------------
  |  Branch (2422:16): [True: 0, False: 0]
  ------------------
 2423|      2|      mhd_assert ((*pdata_size == i) \
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2424|      2|                  || (mhd_POST_TEXT_ST_NAME != tf->st));
 2425|      2|      continue;
 2426|      0|    case mhd_POST_TEXT_ST_AT_EQ:
  ------------------
  |  Branch (2426:5): [True: 0, False: 4]
  ------------------
 2427|      0|      mhd_assert (i > tf->name_idx);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2428|      0|      mhd_assert (0 == tf->name_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2429|      0|      mhd_assert (0 == tf->value_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2430|      0|      buf[i] = 0; /* Zero-terminate the name */
 2431|      0|      tf->name_len = i - tf->name_idx;
 2432|      0|      tf->st = mhd_POST_TEXT_ST_EQ_FOUND;
 2433|      0|      ++i; /* Process the next char */
 2434|      0|      continue;
 2435|      0|    case mhd_POST_TEXT_ST_EQ_FOUND:
  ------------------
  |  Branch (2435:5): [True: 0, False: 4]
  ------------------
 2436|      0|      mhd_assert (0 == p_data->value_off);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2437|      0|      mhd_assert (0 == tf->value_idx);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2438|      0|      mhd_assert (0 == tf->value_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2439|      0|      mhd_assert (0 != i && "the 'value' should follow the 'name'");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2440|      0|      tf->value_idx = i;
 2441|      0|      tf->st = mhd_POST_TEXT_ST_VALUE;
 2442|      0|      mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2443|       |    /* Intentional fallthrough */
 2444|      0|    case mhd_POST_TEXT_ST_VALUE:
  ------------------
  |  Branch (2444:5): [True: 0, False: 4]
  ------------------
 2445|      0|      do /* Fast local loop */
 2446|      0|      {
 2447|      0|        if ('\r' == buf[i])
  ------------------
  |  Branch (2447:13): [True: 0, False: 0]
  ------------------
 2448|      0|        {
 2449|      0|          tf->st = mhd_POST_TEXT_ST_AT_CR;
 2450|      0|          break;
 2451|      0|        }
 2452|      0|        else if ('\n' == buf[i])
  ------------------
  |  Branch (2452:18): [True: 0, False: 0]
  ------------------
 2453|      0|        {
 2454|      0|          tf->st = mhd_POST_TEXT_ST_AT_LF_BARE;
 2455|      0|          break;
 2456|      0|        }
 2457|      0|      } while (*pdata_size > ++i);
  ------------------
  |  Branch (2457:16): [True: 0, False: 0]
  ------------------
 2458|      0|      mhd_assert ((*pdata_size == i) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2459|      0|                  || (mhd_POST_TEXT_ST_AT_CR == tf->st) \
 2460|      0|                  || (mhd_POST_TEXT_ST_AT_LF_BARE == tf->st));
 2461|      0|      continue;
 2462|      1|    case mhd_POST_TEXT_ST_AT_LF_BARE:
  ------------------
  |  Branch (2462:5): [True: 1, False: 3]
  ------------------
 2463|      1|      if (!bare_lf_as_crlf)
  ------------------
  |  Branch (2463:11): [True: 1, False: 0]
  ------------------
 2464|      1|      {
 2465|      1|        enc_broken = true;
 2466|      1|        break;
 2467|      1|      }
 2468|      0|      mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2469|       |    /* Intentional fallthrough */
 2470|      1|    case mhd_POST_TEXT_ST_AT_CR:
  ------------------
  |  Branch (2470:5): [True: 1, False: 3]
  ------------------
 2471|      1|      mhd_assert (0 == tf->value_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2472|      1|      buf[i] = 0; /* Zero-terminate the value (or the name) */
 2473|      1|      if (0 != tf->value_idx)
  ------------------
  |  Branch (2473:11): [True: 0, False: 1]
  ------------------
 2474|      0|        tf->value_len = i - tf->value_idx;
 2475|      1|      else
 2476|      1|        tf->name_len = i - tf->name_idx;
 2477|      1|      if ((0 == tf->name_len) && (0 == tf->value_len))
  ------------------
  |  Branch (2477:11): [True: 1, False: 0]
  |  Branch (2477:34): [True: 1, False: 0]
  ------------------
 2478|      1|      { /* Empty line */
 2479|      1|        ++i; /* Advance to the next char to be checked */
 2480|      1|        reset_parse_field_data_text (p_data);
 2481|      1|        tf->st = mhd_POST_TEXT_ST_NOT_STARTED;
 2482|      1|      }
 2483|      0|      else if (mhd_POST_TEXT_ST_AT_LF_BARE == tf->st)
  ------------------
  |  Branch (2483:16): [True: 0, False: 0]
  ------------------
 2484|      0|        tf->st = mhd_POST_TEXT_ST_FULL_LINE_FOUND;
 2485|      0|      else
 2486|      0|      {
 2487|      0|        tf->st = mhd_POST_TEXT_ST_CR_FOUND;
 2488|      0|        ++i; /* Process the next char */
 2489|      0|      }
 2490|      1|      continue;
 2491|      0|    case mhd_POST_TEXT_ST_CR_FOUND:
  ------------------
  |  Branch (2491:5): [True: 0, False: 4]
  ------------------
 2492|      0|      if ('\n' != buf[i])
  ------------------
  |  Branch (2492:11): [True: 0, False: 0]
  ------------------
 2493|      0|      {
 2494|      0|        enc_broken = true;
 2495|      0|        break;
 2496|      0|      }
 2497|      0|      tf->st = mhd_POST_TEXT_ST_FULL_LINE_FOUND;
 2498|      0|      mhd_FALLTHROUGH;
  ------------------
  |  | 1300|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2499|       |    /* Intentional fallthrough */
 2500|      0|    case mhd_POST_TEXT_ST_FULL_LINE_FOUND:
  ------------------
  |  Branch (2500:5): [True: 0, False: 4]
  ------------------
 2501|      0|      ++i; /* Advance to the next char to be checked */
 2502|      0|      if (process_complete_field (c,
  ------------------
  |  Branch (2502:11): [True: 0, False: 0]
  ------------------
 2503|      0|                                  buf,
 2504|      0|                                  &i,
 2505|      0|                                  pdata_size,
 2506|      0|                                  p_data->field_start,
 2507|      0|                                  tf->name_idx,
 2508|      0|                                  tf->name_len,
 2509|      0|                                  tf->value_idx,
 2510|      0|                                  tf->value_len))
 2511|      0|      {
 2512|      0|        if (c->suspended)
  ------------------
  |  Branch (2512:13): [True: 0, False: 0]
  ------------------
 2513|      0|          --i; /* Go back to the same position */
 2514|      0|        else
 2515|      0|          reset_parse_field_data_text (p_data);
 2516|      0|        p_data->next_parse_pos = i;
 2517|      0|        return true;
 2518|      0|      }
 2519|      0|      mhd_assert (*pdata_size >= i);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2520|      0|      reset_parse_field_data_text (p_data);
 2521|      0|      continue; /* Process the next char */
 2522|      0|    default:
  ------------------
  |  Branch (2522:5): [True: 0, False: 4]
  ------------------
 2523|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
 2524|      0|      enc_broken = true;
 2525|      0|      break;
 2526|      4|    }
 2527|      1|    mhd_assert (enc_broken);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2528|      1|    break;
 2529|      4|  }
 2530|       |
 2531|      1|  mhd_assert ((*pdata_size == i) || enc_broken);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2532|       |
 2533|      1|  if (enc_broken)
  ------------------
  |  Branch (2533:7): [True: 1, False: 0]
  ------------------
 2534|      1|  {
 2535|      1|    if (p_data->some_data_provided)
  ------------------
  |  Branch (2535:9): [True: 0, False: 1]
  ------------------
 2536|      0|    {
 2537|      0|      mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2538|      0|                   MHD_SC_REQ_POST_PARSE_PARTIAL_INVALID_POST_FORMAT, \
 2539|      0|                   "The request POST has broken encoding or format and " \
 2540|      0|                   "was parsed only partially.");
 2541|      0|      p_data->parse_result =
 2542|      0|        MHD_POST_PARSE_RES_PARTIAL_INVALID_POST_FORMAT;
 2543|      0|    }
 2544|      1|    else
 2545|      1|    {
 2546|      1|      mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      1|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2547|      1|                   MHD_SC_REQ_POST_PARSE_FAILED_INVALID_POST_FORMAT, \
 2548|      1|                   "The request POST has broken encoding or format and " \
 2549|      1|                   "cannot be parsed.");
 2550|      1|      p_data->parse_result =
 2551|      1|        MHD_POST_PARSE_RES_FAILED_INVALID_POST_FORMAT;
 2552|      1|    }
 2553|      1|    tf->st = mhd_POST_TEXT_ST_NOT_STARTED;
 2554|      1|    c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
 2555|      1|    return true;
 2556|      1|  }
 2557|       |
 2558|      0|  mhd_assert (mhd_POST_TEXT_ST_AT_EQ != tf->st);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2559|      0|  mhd_assert (mhd_POST_TEXT_ST_AT_CR != tf->st);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2560|      0|  mhd_assert (mhd_POST_TEXT_ST_AT_LF_BARE != tf->st);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2561|      0|  mhd_assert (mhd_POST_TEXT_ST_FULL_LINE_FOUND != tf->st);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2562|       |
 2563|      0|  mhd_assert (*pdata_size == i);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2564|       |
 2565|      0|  if ((mhd_POST_TEXT_ST_VALUE == tf->st)
  ------------------
  |  Branch (2565:7): [True: 0, False: 0]
  ------------------
 2566|      0|      && (i != tf->value_idx)
  ------------------
  |  Branch (2566:10): [True: 0, False: 0]
  ------------------
 2567|      0|      && is_value_streaming_needed (c, i - p_data->field_start))
  ------------------
  |  Branch (2567:10): [True: 0, False: 0]
  ------------------
 2568|      0|  {
 2569|      0|    if (process_partial_value (c,
  ------------------
  |  Branch (2569:9): [True: 0, False: 0]
  ------------------
 2570|      0|                               buf,
 2571|      0|                               &i,
 2572|      0|                               pdata_size,
 2573|      0|                               tf->name_idx,
 2574|      0|                               tf->name_len,
 2575|      0|                               tf->value_idx,
 2576|      0|                               i - tf->value_idx))
 2577|      0|    {
 2578|      0|      p_data->next_parse_pos = i;
 2579|      0|      return true;
 2580|      0|    }
 2581|      0|  }
 2582|       |
 2583|      0|  p_data->next_parse_pos = i;
 2584|      0|  return false; /* Continue parsing */
 2585|      0|}
post_parser_funcs.c:_ZL19report_low_lbuf_memP14MHD_Connection:
  584|      5|{
  585|      5|  mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      5|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  586|      5|               MHD_SC_REQ_POST_PARSE_FAILED_NO_LARGE_BUF_MEM, \
  587|      5|               "Not enough large shared buffer memory to " \
  588|      5|               "parse POST request.");
  589|      5|  c->rq.u_proc.post.parse_result =
  590|      5|    MHD_POST_PARSE_RES_FAILED_NO_LARGE_BUF_MEM;
  591|      5|  if (c->stage < mhd_HTTP_STAGE_FULL_REQ_RECEIVED)
  ------------------
  |  Branch (591:7): [True: 0, False: 5]
  ------------------
  592|      0|  {
  593|      0|    c->discard_request = true;
  594|      0|    c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
  595|       |
  596|      0|    return true;
  597|      0|  }
  598|      5|  return false;
  599|      5|}

_Z29mhd_stream_add_field_nullableP10MHD_Stream13MHD_ValueKindPK10MHD_StringPK18MHD_StringNullable:
   63|     25|{
   64|     25|  struct mhd_RequestField *f;
   65|     25|  struct MHD_Connection *const c =
   66|     25|    mhd_CNTNR_PTR (s, struct MHD_Connection, h1_stream);
  ------------------
  |  |   67|     25|        ((cntnr_type*) (void*)                              \
  |  |   68|     25|         (((char*) (0 ?                                     \
  |  |  ------------------
  |  |  |  Branch (68:21): [Folded, False: 25]
  |  |  ------------------
  |  |   69|     25|                    (&(((cntnr_type*) NULL)->membr_name)) : \
  |  |   70|     25|                    (membr_ptr))) - offsetof (cntnr_type,membr_name)))
  ------------------
   67|       |
   68|     25|  f = (struct mhd_RequestField *)
   69|     25|      mhd_stream_alloc_memory (c, sizeof(struct mhd_RequestField));
   70|     25|  if (NULL == f)
  ------------------
  |  Branch (70:7): [True: 0, False: 25]
  ------------------
   71|      0|    return false;
   72|       |
   73|     25|  f->field.nv.name = *name;
   74|     25|  f->field.nv.value = *value;
   75|     25|  f->field.kind = kind;
   76|     25|  mhd_DLINKEDL_INIT_LINKS (f, fields);
  ------------------
  |  |  313|     25|        do {(p_obj)->links_name.prev = NULL;       \
  |  |  314|     25|            (p_obj)->links_name.next = NULL;} while (0)
  |  |  ------------------
  |  |  |  Branch (314:54): [Folded, False: 25]
  |  |  ------------------
  ------------------
   77|       |
   78|     25|  mhd_DLINKEDL_INS_LAST (&(c->rq), f, fields);
  ------------------
  |  |  340|     25|        mhd_DLINKEDL_INS_LAST_D (&((p_own)->l_name),(p_obj),l_name)
  |  |  ------------------
  |  |  |  |  192|     25|#define mhd_DLINKEDL_INS_LAST_D(p_list, p_obj, links_name) do { \
  |  |  |  |  193|     25|        mhd_ASSUME (NULL == (p_obj)->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     25|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     25|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  194|     25|        mhd_ASSUME (NULL == (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     25|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     25|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  195|     25|        mhd_ASSUME ((p_obj) != (p_list)->first);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     25|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     25|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  196|     25|        mhd_ASSUME ((p_obj) != (p_list)->last);        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     25|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     25|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  197|     25|        if (NULL != (p_list)->last)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (197:13): [True: 19, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  198|     25|        { mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     19|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     19|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  199|     19|          mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     19|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     19|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|     19|          mhd_ASSUME ((p_obj) != (p_list)->last->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     19|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     19|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|     19|          mhd_ASSUME (NULL != (p_list)->first);                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|     19|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|     19|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  202|     19|          ((p_obj)->links_name.prev = (p_list)->last)           \
  |  |  |  |  203|     19|          ->links_name.next = (p_obj); } else \
  |  |  |  |  204|     25|        { mhd_ASSUME (NULL == (p_list)->first);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      6|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      6|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  205|      6|          (p_list)->first = (p_obj); }                      \
  |  |  |  |  206|     25|        (p_list)->last = (p_obj);  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (206:45): [Folded, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|       |
   80|     25|  return true;
   81|     25|}
_Z20mhd_stream_add_fieldP10MHD_Stream13MHD_ValueKindPK10MHD_StringS4_:
   89|     24|{
   90|     24|  struct MHD_StringNullable value2;
   91|       |
   92|     24|  value2.len = value->len;
   93|     24|  value2.cstr = value->cstr;
   94|       |
   95|     24|  return mhd_stream_add_field_nullable (s, kind, name, &value2);
   96|     24|}

_Z23mhd_request_get_value_nP11MHD_Request13MHD_ValueKindmPKcP18MHD_StringNullable:
   75|      5|{
   76|      5|  mhd_assert (strlen (key) == key_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   77|      5|  value_out->len = 0u;
   78|      5|  value_out->cstr = NULL;
   79|       |
   80|      5|  mhd_assert (strlen (key) == key_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   81|       |
   82|      5|#ifdef MHD_SUPPORT_HTTP2
   83|      5|  if (mhd_REQ_IS_HTTP2 (request))
  ------------------
  |  |  556|      5|#define mhd_REQ_IS_HTTP2(req)           mhd_HNDL_IS_HTTP2 (req)
  |  |  ------------------
  |  |  |  |   97|      5|#  define mhd_HNDL_IS_HTTP2(handle)     (mhd_HNDL_TAG_ (handle)->is_http2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   92|      5|        ((const struct mhd_HandleTag *) (const void *) (handle))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (97:41): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|      0|    return mhd_h2_request_get_value_n (request,
   85|      0|                                       kind,
   86|      0|                                       key_len,
   87|      0|                                       key,
   88|      0|                                       value_out);
   89|      5|#endif /* MHD_SUPPORT_HTTP2 */
   90|       |
   91|      5|  if (MHD_VK_POSTDATA != kind)
  ------------------
  |  Branch (91:7): [True: 5, False: 0]
  ------------------
   92|      5|  {
   93|      5|    struct mhd_RequestField *f;
   94|       |
   95|      5|    for (f = mhd_DLINKEDL_GET_FIRST (request, fields); NULL != f;
  ------------------
  |  |  362|      5|        mhd_DLINKEDL_GET_FIRST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  248|      5|#define mhd_DLINKEDL_GET_FIRST_D(p_list) ((p_list)->first)
  |  |  ------------------
  ------------------
  |  Branch (95:56): [True: 0, False: 5]
  ------------------
   96|      5|         f = mhd_DLINKEDL_GET_NEXT (f, fields))
  ------------------
  |  |  377|      0|#define mhd_DLINKEDL_GET_NEXT(p_obj, links_name) ((p_obj)->links_name.next)
  ------------------
   97|      0|    {
   98|      0|      if ((key_len == f->field.nv.name.len)
  ------------------
  |  Branch (98:11): [True: 0, False: 0]
  ------------------
   99|      0|          && (0 != (kind & f->field.kind))
  ------------------
  |  Branch (99:14): [True: 0, False: 0]
  ------------------
  100|      0|          && mhd_str_equal_caseless_bin_n (key,
  ------------------
  |  Branch (100:14): [True: 0, False: 0]
  ------------------
  101|      0|                                           f->field.nv.name.cstr,
  102|      0|                                           key_len))
  103|      0|      {
  104|      0|        *value_out = f->field.nv.value;
  105|      0|        return true;
  106|      0|      }
  107|      0|    }
  108|      5|  }
  109|       |
  110|      5|#if MHD_SUPPORT_POST_PARSER
  111|      5|  if (0 != (MHD_VK_POSTDATA & kind))
  ------------------
  |  Branch (111:7): [True: 0, False: 5]
  ------------------
  112|      0|  {
  113|      0|    struct mhd_RequestPostField *f;
  114|      0|    char *const buf = request->cntn.lbuf.data; // TODO: support processing in connection buffer
  115|      0|    for (f = mhd_DLINKEDL_GET_FIRST (request, post_fields); NULL != f;
  ------------------
  |  |  362|      0|        mhd_DLINKEDL_GET_FIRST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  248|      0|#define mhd_DLINKEDL_GET_FIRST_D(p_list) ((p_list)->first)
  |  |  ------------------
  ------------------
  |  Branch (115:61): [True: 0, False: 0]
  ------------------
  116|      0|         f = mhd_DLINKEDL_GET_NEXT (f, post_fields))
  ------------------
  |  |  377|      0|#define mhd_DLINKEDL_GET_NEXT(p_obj, links_name) ((p_obj)->links_name.next)
  ------------------
  117|      0|    {
  118|      0|      if ((key_len == f->field.name.len)
  ------------------
  |  Branch (118:11): [True: 0, False: 0]
  ------------------
  119|      0|          && mhd_str_equal_caseless_bin_n (key,
  ------------------
  |  Branch (119:14): [True: 0, False: 0]
  ------------------
  120|      0|                                           buf + f->field.name.pos,
  121|      0|                                           key_len))
  122|      0|      {
  123|      0|        value_out->cstr =
  124|      0|          (0 == f->field.value.pos) ?
  ------------------
  |  Branch (124:11): [True: 0, False: 0]
  ------------------
  125|      0|          NULL : (buf + f->field.value.pos);
  126|      0|        value_out->len = f->field.value.len;
  127|       |
  128|      0|        mhd_assert ((NULL != value_out->cstr) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  129|      0|                    || (0 == value_out->len));
  130|       |
  131|      0|        return true;
  132|      0|      }
  133|      0|    }
  134|      0|  }
  135|      5|#endif /* MHD_SUPPORT_POST_PARSER */
  136|       |
  137|      5|  return false;
  138|      5|}

_Z22respond_with_error_lenP14MHD_ConnectionjmPKcmPc:
   79|      6|{
   80|      6|  struct MHD_Response *err_res;
   81|       |
   82|      6|  mhd_assert (!c->stop_with_error);  /* Do not send error twice */
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   83|      6|  mhd_assert (mhd_HTTP_STAGE_REQ_RECV_FINISHED >= c->stage);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   84|       |
   85|       |  /* Discard most of the request data */
   86|       |
   87|      6|  if (NULL != c->rq.cntn.lbuf.data)
  ------------------
  |  Branch (87:7): [True: 0, False: 6]
  ------------------
   88|      0|    mhd_daemon_free_lbuf (c->daemon, &(c->rq.cntn.lbuf));
   89|      6|  c->rq.cntn.lbuf.data = NULL;
   90|       |
   91|      6|  c->write_buffer = NULL;
   92|      6|  c->write_buffer_size = 0;
   93|      6|  c->write_buffer_send_offset = 0;
   94|      6|  c->write_buffer_append_offset = 0;
   95|       |
   96|      6|  mhd_DLINKEDL_INIT_LIST (&(c->rq), fields);
  ------------------
  |  |  303|      6|        mhd_DLINKEDL_INIT_LIST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  156|      6|        do {(p_list)->first = NULL; (p_list)->last = NULL;} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (156:68): [Folded, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|      6|  c->rq.version = NULL;
   98|      6|  c->rq.method.len = 0;
   99|      6|  c->rq.method.cstr = NULL;
  100|      6|  c->rq.url = NULL;
  101|      6|  c->continue_message_write_offset = 0;
  102|      6|  if (0 != c->read_buffer_size)
  ------------------
  |  Branch (102:7): [True: 6, False: 0]
  ------------------
  103|      6|  {
  104|      6|    mhd_pool_deallocate (c->pool,
  105|      6|                         c->read_buffer,
  106|      6|                         c->read_buffer_size);
  107|      6|    c->read_buffer = NULL;
  108|      6|    c->read_buffer_size = 0;
  109|      6|    c->read_buffer_offset = 0;
  110|      6|  }
  111|       |
  112|      6|  c->stop_with_error = true;
  113|      6|  c->discard_request = true;
  114|      6|  if ((MHD_HTTP_STATUS_CONTENT_TOO_LARGE == http_code)
  ------------------
  |  Branch (114:7): [True: 4, False: 2]
  ------------------
  115|      2|      || (MHD_HTTP_STATUS_URI_TOO_LONG == http_code)
  ------------------
  |  Branch (115:10): [True: 0, False: 2]
  ------------------
  116|      2|      || (MHD_HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE == http_code))
  ------------------
  |  Branch (116:10): [True: 0, False: 2]
  ------------------
  117|      4|    c->rq.too_large = true;
  118|       |
  119|      6|  mhd_LOG_PRINT (c->daemon,
  ------------------
  |  |   97|      6|#  define mhd_LOG_PRINT mhd_logger
  ------------------
  120|      6|                 MHD_SC_REQ_PROCESSING_ERR_REPLY,
  121|      6|                 mhd_LOG_FMT ("Error processing request. Sending %u " \
  ------------------
  |  |  103|      6|#  define mhd_LOG_FMT(format_string) format_string
  ------------------
  122|      6|                              "error reply: %s"),
  123|      6|                 (unsigned int)http_code,
  124|      6|                 (NULL != msg) ? msg : "[EMPTY BODY]");
  ------------------
  |  Branch (124:18): [True: 6, False: 0]
  ------------------
  125|       |
  126|      6|  if (NULL != c->rp.response)
  ------------------
  |  Branch (126:7): [True: 0, False: 6]
  ------------------
  127|      0|  {
  128|      0|    mhd_response_dec_use_count (c->rp.response);
  129|      0|    c->rp.response = NULL;
  130|      0|  }
  131|      6|  err_res = mhd_response_special_for_error (http_code,
  132|      6|                                            msg_len,
  133|      6|                                            msg,
  134|      6|                                            add_hdr_line_len,
  135|      6|                                            add_hdr_line);
  136|      6|  if (NULL == err_res)
  ------------------
  |  Branch (136:7): [True: 0, False: 6]
  ------------------
  137|      0|  {
  138|      0|    if (NULL != add_hdr_line)
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|      0|      free (add_hdr_line);
  140|      0|    mhd_STREAM_ABORT (c, \
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  141|      0|                      mhd_CONN_CLOSE_NO_MEM_FOR_ERR_RESPONSE, \
  142|      0|                      "No memory to create error response.");
  143|      0|    return;
  144|      0|  }
  145|      6|  c->rp.response = err_res;
  146|      6|  c->stage = mhd_HTTP_STAGE_START_REPLY;
  147|      6|}

_Z31mhd_response_remove_all_headersP12MHD_Response:
  230|      6|{
  231|      6|  struct mhd_ResponseHeader *hdr;
  232|       |
  233|      6|  for (hdr = mhd_DLINKEDL_GET_LAST (r, headers); NULL != hdr;
  ------------------
  |  |  370|      6|        mhd_DLINKEDL_GET_LAST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  253|      6|#define mhd_DLINKEDL_GET_LAST_D(p_list) ((p_list)->last)
  |  |  ------------------
  ------------------
  |  Branch (233:50): [True: 0, False: 6]
  ------------------
  234|      6|       hdr = mhd_DLINKEDL_GET_LAST (r, headers))
  ------------------
  |  |  370|      0|        mhd_DLINKEDL_GET_LAST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  253|      0|#define mhd_DLINKEDL_GET_LAST_D(p_list) ((p_list)->last)
  |  |  ------------------
  ------------------
  235|      0|  {
  236|       |    mhd_DLINKEDL_DEL (r, hdr, headers);
  ------------------
  |  |  352|      0|        mhd_DLINKEDL_DEL_D (&((p_own)->l_name),(p_obj),l_name)
  |  |  ------------------
  |  |  |  |  215|      0|#define mhd_DLINKEDL_DEL_D(p_list, p_obj, links_name) do {  \
  |  |  |  |  216|      0|        mhd_ASSUME (NULL != (p_list)->first);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  224|      0|        if (NULL != (p_obj)->links_name.next)             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  225|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.next->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  228|      0|                      (p_obj)->links_name.prev);        \
  |  |  |  |  229|      0|          (p_obj)->links_name.next->links_name.prev =   \
  |  |  |  |  230|      0|            (p_obj)->links_name.prev; } else            \
  |  |  |  |  231|      0|        { mhd_ASSUME ((p_obj) == (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  232|      0|          (p_list)->last = (p_obj)->links_name.prev; }  \
  |  |  |  |  233|      0|        if (NULL != (p_obj)->links_name.prev)           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (233:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  234|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.prev->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  237|      0|                      (p_obj)->links_name.prev);        \
  |  |  |  |  238|      0|          (p_obj)->links_name.prev->links_name.next =   \
  |  |  |  |  239|      0|            (p_obj)->links_name.next; } else            \
  |  |  |  |  240|      0|        { mhd_ASSUME ((p_obj) == (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  241|      0|          (p_list)->first = (p_obj)->links_name.next; } \
  |  |  |  |  242|      0|        (p_obj)->links_name.prev = NULL;                \
  |  |  |  |  243|      0|        (p_obj)->links_name.next = NULL;  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (243:52): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|      0|    free (hdr);
  238|      0|  }
  239|      6|}

_Z39mhd_response_remove_auth_digest_headersP12MHD_Response:
   72|      6|{
   73|      6|  struct mhd_RespAuthDigestHeader *hdr_d;
   74|       |
   75|      6|  for (hdr_d = mhd_DLINKEDL_GET_LAST (response, auth_d_hdrs);
  ------------------
  |  |  370|      6|        mhd_DLINKEDL_GET_LAST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  253|      6|#define mhd_DLINKEDL_GET_LAST_D(p_list) ((p_list)->last)
  |  |  ------------------
  ------------------
   76|      6|       NULL != hdr_d;
  ------------------
  |  Branch (76:8): [True: 0, False: 6]
  ------------------
   77|      6|       hdr_d = mhd_DLINKEDL_GET_LAST (response, auth_d_hdrs))
  ------------------
  |  |  370|      0|        mhd_DLINKEDL_GET_LAST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  253|      0|#define mhd_DLINKEDL_GET_LAST_D(p_list) ((p_list)->last)
  |  |  ------------------
  ------------------
   78|      0|  {
   79|       |    mhd_DLINKEDL_DEL (response, hdr_d, auth_d_hdrs);
  ------------------
  |  |  352|      0|        mhd_DLINKEDL_DEL_D (&((p_own)->l_name),(p_obj),l_name)
  |  |  ------------------
  |  |  |  |  215|      0|#define mhd_DLINKEDL_DEL_D(p_list, p_obj, links_name) do {  \
  |  |  |  |  216|      0|        mhd_ASSUME (NULL != (p_list)->first);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  224|      0|        if (NULL != (p_obj)->links_name.next)             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (224:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  225|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.next->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  228|      0|                      (p_obj)->links_name.prev);        \
  |  |  |  |  229|      0|          (p_obj)->links_name.next->links_name.prev =   \
  |  |  |  |  230|      0|            (p_obj)->links_name.prev; } else            \
  |  |  |  |  231|      0|        { mhd_ASSUME ((p_obj) == (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  232|      0|          (p_list)->last = (p_obj)->links_name.prev; }  \
  |  |  |  |  233|      0|        if (NULL != (p_obj)->links_name.prev)           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (233:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  234|      0|        { mhd_ASSUME ((p_obj) == (p_obj)->links_name.prev->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  237|      0|                      (p_obj)->links_name.prev);        \
  |  |  |  |  238|      0|          (p_obj)->links_name.prev->links_name.next =   \
  |  |  |  |  239|      0|            (p_obj)->links_name.next; } else            \
  |  |  |  |  240|      0|        { mhd_ASSUME ((p_obj) == (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   80|      0|#      define mhd_ASSUME(statement)     MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  902|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  241|      0|          (p_list)->first = (p_obj)->links_name.next; } \
  |  |  |  |  242|      0|        (p_obj)->links_name.prev = NULL;                \
  |  |  |  |  243|      0|        (p_obj)->links_name.next = NULL;  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (243:52): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|      0|    free (hdr_d);
   81|      0|  }
   82|      6|}

_Z26mhd_response_dec_use_countP12MHD_Response:
   94|      6|{
   95|      6|  mhd_assert (r->frozen);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   96|      6|  if (r->was_destroyed)
  ------------------
  |  Branch (96:7): [True: 0, False: 6]
  ------------------
   97|      0|    MHD_PANIC (mhd_RESPONSE_DESTOYED);
  ------------------
  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  ------------------
  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  ------------------
  ------------------
   98|       |
   99|      6|  if (r->reuse.reusable)
  ------------------
  |  Branch (99:7): [True: 0, False: 6]
  ------------------
  100|      0|  {
  101|      0|    if (1 != mhd_atomic_counter_get_dec (&(r->reuse.counter)))
  ------------------
  |  Branch (101:9): [True: 0, False: 0]
  ------------------
  102|      0|      return; /* The response is still used somewhere */
  103|      0|  }
  104|       |
  105|      6|  response_full_deinit (r);
  106|      6|}
MHD_response_destroy:
  126|      6|{
  127|      6|  if (response->was_destroyed)
  ------------------
  |  Branch (127:7): [True: 0, False: 6]
  ------------------
  128|      0|    MHD_PANIC (mhd_RESPONSE_DESTOYED);
  ------------------
  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  ------------------
  |  |  |  |  388|      0|#  define MHD_FUNC_       __func__
  |  |  ------------------
  ------------------
  129|       |
  130|      6|  if (!response->frozen)
  ------------------
  |  Branch (130:7): [True: 0, False: 6]
  ------------------
  131|      0|  {
  132|       |    /* This response has been never used for actions */
  133|      0|    mhd_assert (NULL != response->settings);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  134|      0|    free (response->settings);
  135|       |#ifndef NDEBUG
  136|       |    /* Decrement counter to avoid triggering assert in deinit function */
  137|       |    if (response->reuse.reusable)
  138|       |      mhd_assert (1 == mhd_atomic_counter_get_dec (&(response->reuse.counter)));
  139|       |#endif
  140|      0|    response_full_deinit (response);
  141|      0|    return;
  142|      0|  }
  143|       |
  144|      6|  mhd_response_dec_use_count (response);
  145|      6|}
response_destroy.c:_ZL20response_full_deinitP12MHD_Response:
   76|      6|{
   77|      6|#ifdef MHD_SUPPORT_AUTH_DIGEST
   78|      6|  mhd_response_remove_auth_digest_headers (r);
   79|      6|#endif
   80|      6|  mhd_response_remove_all_headers (r);
   81|      6|  if (NULL != r->special_resp.spec_hdr)
  ------------------
  |  Branch (81:7): [True: 0, False: 6]
  ------------------
   82|      0|    free (r->special_resp.spec_hdr);
   83|      6|  if (r->reuse.reusable)
  ------------------
  |  Branch (83:7): [True: 0, False: 6]
  ------------------
   84|      0|    mhd_response_deinit_reusable (r);
   85|      6|  mhd_response_deinit_content_data (r);
   86|       |
   87|      6|  r->was_destroyed = true;
   88|      6|  free (r);
   89|      6|}

_Z32mhd_response_deinit_content_dataP12MHD_Response:
  121|      6|{
  122|      6|  mhd_assert (mhd_RESPONSE_CONTENT_DATA_INVALID != r->cntn_dtype);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  123|      6|  if (mhd_RESPONSE_CONTENT_DATA_IOVEC == r->cntn_dtype)
  ------------------
  |  Branch (123:7): [True: 0, False: 6]
  ------------------
  124|      0|    free (r->cntn.iovec.iov);
  125|      6|  else if (mhd_RESPONSE_CONTENT_DATA_FILE == r->cntn_dtype)
  ------------------
  |  Branch (125:12): [True: 0, False: 6]
  ------------------
  126|      0|    close (r->cntn.file.fd);
  127|       |  /* For #mhd_RESPONSE_CONTENT_DATA_BUFFER clean-up performed by callback
  128|       |     for both modes: internal copy and external cleanup */
  129|      6|  if (NULL != r->free.cb)
  ------------------
  |  Branch (129:7): [True: 0, False: 6]
  ------------------
  130|      0|    r->free.cb (r->free.cls);
  131|      6|}
_Z30mhd_response_special_for_errorjmPKcmPc:
  469|      6|{
  470|      6|  struct MHD_Response *restrict res;
  471|       |
  472|      6|  mhd_assert (100 <= sc);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  473|      6|  mhd_assert (600 > sc);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  474|      6|  mhd_assert ((NULL != cntn) || (0 == cntn_len));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  475|      6|  mhd_assert ((NULL != spec_hdr) || (0 == spec_hdr_len));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  476|       |
  477|      6|  res = (struct MHD_Response *)
  478|      6|        mhd_calloc (1,
  ------------------
  |  |   64|      6|#  define mhd_calloc calloc
  ------------------
  479|      6|                    sizeof(struct MHD_Response));
  480|      6|  if (NULL == res)
  ------------------
  |  Branch (480:7): [True: 0, False: 6]
  ------------------
  481|      0|    return NULL;
  482|       |
  483|       |#ifndef HAVE_NULL_PTR_ALL_ZEROS
  484|       |  mhd_DLINKEDL_INIT_LIST (res, headers);
  485|       |#  ifdef MHD_SUPPORT_AUTH_DIGEST
  486|       |  mhd_DLINKEDL_INIT_LIST (res, auth_d_hdrs);
  487|       |#  endif /* MHD_SUPPORT_AUTH_DIGEST */
  488|       |  res->free.cb = NULL;
  489|       |  res->free.cls = NULL;
  490|       |  res->special_resp.spec_hdr = NULL;
  491|       |#endif /* ! HAVE_NULL_PTR_ALL_ZEROS */
  492|      6|  res->sc = (enum MHD_HTTP_StatusCode)sc;
  493|      6|  res->cntn_size = cntn_len;
  494|      6|  res->cntn_dtype = mhd_RESPONSE_CONTENT_DATA_BUFFER;
  495|      6|  res->cntn.buf = (const unsigned char *)((0 != cntn_len) ? cntn : "");
  ------------------
  |  Branch (495:43): [True: 6, False: 0]
  ------------------
  496|      6|  res->cfg.close_forced = true;
  497|      6|  res->cfg.int_err_resp = true;
  498|      6|  res->special_resp.spec_hdr_len = spec_hdr_len;
  499|      6|  res->special_resp.spec_hdr = spec_hdr;
  500|      6|  res->frozen = true;
  501|       |
  502|      6|  return res;
  503|      6|}

_Z23mhd_stream_alloc_memoryP14MHD_Connectionm:
  128|     73|{
  129|     73|  struct mhd_MemoryPool *const restrict pool = c->pool;     /* a short alias */
  130|     73|  size_t need_to_be_freed = 0; /**< The required amount of additional free memory */
  131|     73|  void *res;
  132|       |
  133|     73|  res = mhd_pool_try_alloc (pool,
  134|     73|                            size,
  135|     73|                            &need_to_be_freed);
  136|     73|  if (NULL != res)
  ------------------
  |  Branch (136:7): [True: 73, False: 0]
  ------------------
  137|     73|    return res;
  138|       |
  139|      0|  if (mhd_pool_is_resizable_inplace (pool,
  ------------------
  |  Branch (139:7): [True: 0, False: 0]
  ------------------
  140|      0|                                     c->write_buffer,
  141|      0|                                     c->write_buffer_size))
  142|      0|  {
  143|      0|    if (c->write_buffer_size - c->write_buffer_append_offset >=
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|      0|        need_to_be_freed)
  145|      0|    {
  146|      0|      char *buf;
  147|      0|      const size_t new_buf_size = c->write_buffer_size - need_to_be_freed;
  148|      0|      buf = (char *)mhd_pool_reallocate (pool,
  149|      0|                                         c->write_buffer,
  150|      0|                                         c->write_buffer_size,
  151|      0|                                         new_buf_size);
  152|      0|      mhd_assert (c->write_buffer == buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  153|      0|      mhd_assert (c->write_buffer_append_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  154|      0|      mhd_assert (c->write_buffer_send_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  155|      0|      c->write_buffer_size = new_buf_size;
  156|      0|      c->write_buffer = buf;
  157|      0|    }
  158|      0|    else
  159|      0|      return NULL;
  160|      0|  }
  161|      0|  else if (mhd_pool_is_resizable_inplace (pool,
  ------------------
  |  Branch (161:12): [True: 0, False: 0]
  ------------------
  162|      0|                                          c->read_buffer,
  163|      0|                                          c->read_buffer_size))
  164|      0|  {
  165|      0|    if (c->read_buffer_size - c->read_buffer_offset >= need_to_be_freed)
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|    {
  167|      0|      char *buf;
  168|      0|      const size_t new_buf_size = c->read_buffer_size - need_to_be_freed;
  169|      0|      buf = (char *)mhd_pool_reallocate (pool,
  170|      0|                                         c->read_buffer,
  171|      0|                                         c->read_buffer_size,
  172|      0|                                         new_buf_size);
  173|      0|      mhd_assert (c->read_buffer == buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  174|      0|      mhd_assert (c->read_buffer_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  175|      0|      c->read_buffer_size = new_buf_size;
  176|      0|      c->read_buffer = buf;
  177|      0|    }
  178|      0|    else
  179|      0|      return NULL;
  180|      0|  }
  181|      0|  else
  182|      0|    return NULL;
  183|      0|  res = mhd_pool_allocate (pool, size, true);
  184|      0|  mhd_assert (NULL != res); /* It has been checked that pool has enough space */
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  185|      0|  return res;
  186|      0|}
_Z29mhd_stream_shrink_read_bufferP14MHD_Connection:
  195|      6|{
  196|      6|  void *new_buf;
  197|       |
  198|      6|  if ((NULL == c->read_buffer) || (0 == c->read_buffer_size))
  ------------------
  |  Branch (198:7): [True: 6, False: 0]
  |  Branch (198:35): [True: 0, False: 0]
  ------------------
  199|      6|  {
  200|      6|    mhd_assert (0 == c->read_buffer_size);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  201|      6|    mhd_assert (0 == c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  202|      6|    return;
  203|      6|  }
  204|       |
  205|      0|  mhd_assert (c->read_buffer_offset <= c->read_buffer_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  206|      0|  if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (206:7): [True: 0, False: 0]
  ------------------
  207|      0|  {
  208|      0|    mhd_pool_deallocate (c->pool, c->read_buffer, c->read_buffer_size);
  209|      0|    c->read_buffer = NULL;
  210|      0|    c->read_buffer_size = 0;
  211|      0|  }
  212|      0|  else
  213|      0|  {
  214|      0|    mhd_assert (mhd_pool_is_resizable_inplace (c->pool, c->read_buffer, \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  215|      0|                                               c->read_buffer_size));
  216|      0|    new_buf = mhd_pool_reallocate (c->pool, c->read_buffer, c->read_buffer_size,
  217|      0|                                   c->read_buffer_offset);
  218|      0|    mhd_assert (c->read_buffer == new_buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  219|      0|    c->read_buffer = (char *)new_buf;
  220|      0|    c->read_buffer_size = c->read_buffer_offset;
  221|      0|  }
  222|      0|}
_Z31mhd_stream_release_write_bufferP14MHD_Connection:
  269|      6|{
  270|      6|  struct mhd_MemoryPool *const restrict pool = c->pool;
  271|       |
  272|      6|  mhd_assert ((NULL != c->write_buffer) || (0 == c->write_buffer_size));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  273|      6|  mhd_assert (c->write_buffer_append_offset == c->write_buffer_send_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  274|      6|  mhd_assert (c->write_buffer_size >= c->write_buffer_append_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  275|       |
  276|      6|  mhd_pool_deallocate (pool, c->write_buffer, c->write_buffer_size);
  277|      6|  c->write_buffer_send_offset = 0;
  278|      6|  c->write_buffer_append_offset = 0;
  279|      6|  c->write_buffer_size = 0;
  280|      6|  c->write_buffer = NULL;
  281|       |
  282|      6|}
_Z35mhd_stream_switch_from_recv_to_sendP14MHD_Connection:
  568|      6|{
  569|       |  /* Read buffer is not needed for this request, shrink it.*/
  570|      6|  mhd_stream_shrink_read_buffer (c);
  571|      6|}
_Z22mhd_conn_start_closingP14MHD_Connection19mhd_ConnCloseReasonPKc:
  735|      3|{
  736|      3|  bool close_hard;
  737|      3|  enum MHD_RequestEndedCode end_code;
  738|      3|  enum MHD_StatusCode sc;
  739|      3|  bool reply_sending_aborted;
  740|       |
  741|       |#ifdef MHD_USE_TRACE_CONN_ADD_CLOSE
  742|       |  fprintf (stderr,
  743|       |           "&&& mhd_conn_start_closing([FD: %2llu], %u, %s%s%s)...\n",
  744|       |           (unsigned long long)c->sk.fd,
  745|       |           (unsigned int)reason,
  746|       |           log_msg ? "\"" : "",
  747|       |           log_msg ? log_msg : "[NULL]",
  748|       |           log_msg ? "\"" : "");
  749|       |#endif /* MHD_USE_TRACE_CONN_ADD_CLOSE */
  750|       |
  751|      3|#ifdef MHD_SUPPORT_HTTP2
  752|      3|  if (mhd_C_IS_HTTP2 (c))
  ------------------
  |  |  913|      3|          (mhd_HTTP_VER_FAM_2 == c->h_layer.fam)
  |  |  ------------------
  |  |  |  Branch (913:11): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  753|      0|  {
  754|      0|    mhd_assert ((mhd_CONN_CLOSE_TIMEDOUT == reason)
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  755|      0|                || (mhd_CONN_CLOSE_DAEMON_SHUTDOWN == reason)
  756|      0|                || (mhd_CONN_CLOSE_H2_CLOSE_SOFT == reason)
  757|      0|                || (mhd_CONN_CLOSE_H2_CLOSE_HARD == reason));
  758|      0|    mhd_assert (NULL == log_msg);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  759|      0|    conn_h2_start_closing (c,
  760|      0|                           reason != mhd_CONN_CLOSE_H2_CLOSE_SOFT);
  761|      0|    return;
  762|      0|  }
  763|      3|#endif /* MHD_SUPPORT_HTTP2 */
  764|       |
  765|      3|  reply_sending_aborted =
  766|      3|    ((mhd_HTTP_STAGE_HEADERS_SENDING <= c->stage)
  ------------------
  |  Branch (766:6): [True: 0, False: 3]
  ------------------
  767|      0|     && (mhd_HTTP_STAGE_FULL_REPLY_SENT > c->stage));
  ------------------
  |  Branch (767:9): [True: 0, False: 0]
  ------------------
  768|      3|  sc = MHD_SC_INTERNAL_ERROR;
  769|      3|  switch (reason)
  770|      3|  {
  771|      3|  case mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN:
  ------------------
  |  Branch (771:3): [True: 3, False: 0]
  ------------------
  772|      3|    close_hard = true;
  773|      3|    end_code = MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  774|      3|    sc = MHD_SC_REQ_MALFORMED;
  775|      3|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  776|      3|    break;
  777|      0|  case mhd_CONN_CLOSE_NO_POOL_MEM_FOR_REQUEST:
  ------------------
  |  Branch (777:3): [True: 0, False: 3]
  ------------------
  778|      0|    close_hard = true;
  779|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  780|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  781|      0|    break;
  782|      0|  case mhd_CONN_CLOSE_CLIENT_SHUTDOWN_EARLY:
  ------------------
  |  Branch (782:3): [True: 0, False: 3]
  ------------------
  783|      0|    close_hard = true;
  784|      0|    end_code = MHD_REQUEST_ENDED_CLIENT_ABORT;
  785|      0|    sc = MHD_SC_CLIENT_SHUTDOWN_EARLY;
  786|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  787|      0|    break;
  788|      0|  case mhd_CONN_CLOSE_H2_PREFACE_MISSING:
  ------------------
  |  Branch (788:3): [True: 0, False: 3]
  ------------------
  789|      0|    close_hard = true;
  790|      0|    end_code = MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  791|      0|    sc = MHD_SC_ALPN_H2_NO_PREFACE;
  792|      0|    break;
  793|      0|  case mhd_CONN_CLOSE_NO_POOL_MEM_FOR_REPLY:
  ------------------
  |  Branch (793:3): [True: 0, False: 3]
  ------------------
  794|      0|    close_hard = true;
  795|      0|    end_code = (!c->stop_with_error || c->rq.too_large) ?
  ------------------
  |  Branch (795:17): [True: 0, False: 0]
  |  Branch (795:40): [True: 0, False: 0]
  ------------------
  796|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  797|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  798|      0|    sc = MHD_SC_REPLY_POOL_ALLOCATION_FAILURE;
  799|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (799:9): [True: 0, False: 0]
  |  Branch (799:34): [True: 0, False: 0]
  ------------------
  800|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to insufficient memory " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  801|      0|                             "in the connection pool");
  802|      0|    break;
  803|      0|  case mhd_CONN_CLOSE_NO_MEM_FOR_ERR_RESPONSE:
  ------------------
  |  Branch (803:3): [True: 0, False: 3]
  ------------------
  804|      0|    close_hard = true;
  805|      0|    end_code = c->rq.too_large ?
  ------------------
  |  Branch (805:16): [True: 0, False: 0]
  ------------------
  806|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  807|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  808|      0|    sc = MHD_SC_REPLY_ALLOCATION_FAILED;
  809|      0|    break;
  810|      0|  case mhd_CONN_CLOSE_APP_ERROR:
  ------------------
  |  Branch (810:3): [True: 0, False: 3]
  ------------------
  811|      0|    close_hard = true;
  812|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ERROR;
  813|      0|    sc = MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED;
  814|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (814:9): [True: 0, False: 0]
  |  Branch (814:34): [True: 0, False: 0]
  ------------------
  815|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to application reply " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  816|      0|                             "generation failure");
  817|      0|    break;
  818|      0|  case mhd_CONN_CLOSE_APP_ABORTED:
  ------------------
  |  Branch (818:3): [True: 0, False: 3]
  ------------------
  819|      0|    close_hard = true;
  820|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ABORT;
  821|      0|    sc = MHD_SC_APPLICATION_CALLBACK_ABORT_ACTION;
  822|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (822:9): [True: 0, False: 0]
  |  Branch (822:34): [True: 0, False: 0]
  ------------------
  823|      0|      log_msg = mhd_MSG4LOG ("Application aborted reply sending");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  824|      0|    break;
  825|      0|  case mhd_CONN_CLOSE_FILE_OFFSET_TOO_LARGE:
  ------------------
  |  Branch (825:3): [True: 0, False: 3]
  ------------------
  826|      0|    close_hard = true;
  827|      0|    end_code = MHD_REQUEST_ENDED_FILE_ERROR;
  828|      0|    sc = MHD_SC_REPLY_FILE_OFFSET_TOO_LARGE;
  829|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (829:9): [True: 0, False: 0]
  |  Branch (829:34): [True: 0, False: 0]
  ------------------
  830|      0|      log_msg = mhd_MSG4LOG ("Response aborted because OS failed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  831|      0|                             "to read too large response file");
  832|      0|    break;
  833|      0|  case mhd_CONN_CLOSE_FILE_READ_ERROR:
  ------------------
  |  Branch (833:3): [True: 0, False: 3]
  ------------------
  834|      0|    close_hard = true;
  835|      0|    end_code = MHD_REQUEST_ENDED_FILE_ERROR;
  836|      0|    sc = MHD_SC_REPLY_FILE_READ_ERROR;
  837|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (837:9): [True: 0, False: 0]
  |  Branch (837:34): [True: 0, False: 0]
  ------------------
  838|      0|      log_msg = mhd_MSG4LOG ("Response aborted because OS failed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  839|      0|                             "to read response file");
  840|      0|    break;
  841|      0|  case mhd_CONN_CLOSE_FILE_TOO_SHORT:
  ------------------
  |  Branch (841:3): [True: 0, False: 3]
  ------------------
  842|      0|    close_hard = true;
  843|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ERROR;
  844|      0|    sc = MHD_SC_REPLY_FILE_TOO_SHORT;
  845|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (845:9): [True: 0, False: 0]
  |  Branch (845:34): [True: 0, False: 0]
  ------------------
  846|      0|      log_msg = mhd_MSG4LOG ("Response aborted because response file is "
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  847|      0|                             "shorter that expected");
  848|      0|    break;
  849|      0|#ifdef MHD_SUPPORT_AUTH_DIGEST
  850|      0|  case mhd_CONN_CLOSE_NONCE_ERROR:
  ------------------
  |  Branch (850:3): [True: 0, False: 3]
  ------------------
  851|      0|    close_hard = true;
  852|      0|    end_code = MHD_REQUEST_ENDED_NONCE_ERROR;
  853|      0|    sc = MHD_SC_REPLY_NONCE_ERROR;
  854|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  855|      0|    break;
  856|      0|#endif /* MHD_SUPPORT_AUTH_DIGEST */
  857|       |
  858|      0|  case mhd_CONN_CLOSE_INT_ERROR:
  ------------------
  |  Branch (858:3): [True: 0, False: 3]
  ------------------
  859|      0|    close_hard = true;
  860|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  861|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (861:9): [True: 0, False: 0]
  |  Branch (861:34): [True: 0, False: 0]
  ------------------
  862|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to MHD internal error");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  863|      0|    break;
  864|      0|  case mhd_CONN_CLOSE_EXTR_EVENT_REG_FAILED:
  ------------------
  |  Branch (864:3): [True: 0, False: 3]
  ------------------
  865|      0|    close_hard = true;
  866|      0|    end_code = MHD_REQUEST_ENDED_BY_EXT_EVENT_ERROR;
  867|      0|    sc = MHD_SC_EXTR_EVENT_REG_FAILED;
  868|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (868:9): [True: 0, False: 0]
  |  Branch (868:34): [True: 0, False: 0]
  ------------------
  869|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to external event " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  870|      0|                             "registration failure");
  871|      0|    break;
  872|      0|  case mhd_CONN_CLOSE_NO_SYS_RESOURCES:
  ------------------
  |  Branch (872:3): [True: 0, False: 3]
  ------------------
  873|      0|    close_hard = true;
  874|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  875|      0|    sc = MHD_SC_NO_SYS_RESOURCES;
  876|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (876:9): [True: 0, False: 0]
  |  Branch (876:34): [True: 0, False: 0]
  ------------------
  877|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to lack of " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  878|      0|                             "system resources");
  879|      0|    break;
  880|      0|  case mhd_CONN_CLOSE_SOCKET_ERR:
  ------------------
  |  Branch (880:3): [True: 0, False: 3]
  ------------------
  881|      0|    close_hard = true;
  882|      0|    switch (c->sk.state.discnt_err)
  883|      0|    {
  884|      0|    case mhd_SOCKET_ERR_NOMEM:
  ------------------
  |  Branch (884:5): [True: 0, False: 0]
  ------------------
  885|      0|      end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  886|      0|      sc = MHD_SC_NO_SYS_RESOURCES;
  887|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (887:11): [True: 0, False: 0]
  |  Branch (887:36): [True: 0, False: 0]
  ------------------
  888|      0|        log_msg = mhd_MSG4LOG ("Response aborted because system closed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  889|      0|                               "socket due to lack of system resources");
  890|      0|      break;
  891|      0|    case mhd_SOCKET_ERR_REMT_DISCONN:
  ------------------
  |  Branch (891:5): [True: 0, False: 0]
  ------------------
  892|      0|      close_hard = false;
  893|      0|      end_code = (mhd_HTTP_STAGE_INIT == c->stage) ?
  ------------------
  |  Branch (893:18): [True: 0, False: 0]
  ------------------
  894|      0|                 MHD_REQUEST_ENDED_COMPLETED_OK /* Not used */
  895|      0|                 : MHD_REQUEST_ENDED_CLIENT_ABORT;
  896|      0|      if (reply_sending_aborted)
  ------------------
  |  Branch (896:11): [True: 0, False: 0]
  ------------------
  897|      0|      {
  898|      0|        sc = MHD_SC_CLIENT_CLOSED_CONN_EARLY;
  899|      0|        if (NULL == log_msg)
  ------------------
  |  Branch (899:13): [True: 0, False: 0]
  ------------------
  900|      0|          log_msg = mhd_MSG4LOG ("Response aborted because remote client " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  901|      0|                                 "closed connection early");
  902|      0|      }
  903|      0|      break;
  904|      0|    case mhd_SOCKET_ERR_CONNRESET:
  ------------------
  |  Branch (904:5): [True: 0, False: 0]
  ------------------
  905|      0|      end_code = MHD_REQUEST_ENDED_CLIENT_ABORT;
  906|      0|      sc = MHD_SC_CONNECTION_RESET;
  907|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (907:11): [True: 0, False: 0]
  |  Branch (907:36): [True: 0, False: 0]
  ------------------
  908|      0|        log_msg = mhd_MSG4LOG ("Response aborted due to aborted connection");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  909|      0|      break;
  910|      0|    case mhd_SOCKET_ERR_CONN_BROKEN:
  ------------------
  |  Branch (910:5): [True: 0, False: 0]
  ------------------
  911|      0|    case mhd_SOCKET_ERR_NOTCONN:
  ------------------
  |  Branch (911:5): [True: 0, False: 0]
  ------------------
  912|      0|#ifdef MHD_SUPPORT_HTTPS
  913|      0|    case mhd_SOCKET_ERR_TLS:
  ------------------
  |  Branch (913:5): [True: 0, False: 0]
  ------------------
  914|      0|#endif /* MHD_SUPPORT_HTTPS */
  915|      0|    case mhd_SOCKET_ERR_PIPE:
  ------------------
  |  Branch (915:5): [True: 0, False: 0]
  ------------------
  916|      0|    case mhd_SOCKET_ERR_NOT_CHECKED:
  ------------------
  |  Branch (916:5): [True: 0, False: 0]
  ------------------
  917|      0|    case mhd_SOCKET_ERR_BADF:
  ------------------
  |  Branch (917:5): [True: 0, False: 0]
  ------------------
  918|      0|    case mhd_SOCKET_ERR_INVAL:
  ------------------
  |  Branch (918:5): [True: 0, False: 0]
  ------------------
  919|      0|    case mhd_SOCKET_ERR_OPNOTSUPP:
  ------------------
  |  Branch (919:5): [True: 0, False: 0]
  ------------------
  920|      0|    case mhd_SOCKET_ERR_NOTSOCK:
  ------------------
  |  Branch (920:5): [True: 0, False: 0]
  ------------------
  921|      0|    case mhd_SOCKET_ERR_OTHER:
  ------------------
  |  Branch (921:5): [True: 0, False: 0]
  ------------------
  922|      0|    case mhd_SOCKET_ERR_INTERNAL:
  ------------------
  |  Branch (922:5): [True: 0, False: 0]
  ------------------
  923|      0|    case mhd_SOCKET_ERR_NO_ERROR:
  ------------------
  |  Branch (923:5): [True: 0, False: 0]
  ------------------
  924|      0|      end_code = MHD_REQUEST_ENDED_CONNECTION_ERROR;
  925|      0|      sc = MHD_SC_CONNECTION_BROKEN;
  926|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (926:11): [True: 0, False: 0]
  |  Branch (926:36): [True: 0, False: 0]
  ------------------
  927|      0|        log_msg = mhd_MSG4LOG ("Response aborted due to broken connection");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  928|      0|      break;
  929|      0|    case mhd_SOCKET_ERR_AGAIN:
  ------------------
  |  Branch (929:5): [True: 0, False: 0]
  ------------------
  930|      0|    case mhd_SOCKET_ERR_INTR:
  ------------------
  |  Branch (930:5): [True: 0, False: 0]
  ------------------
  931|      0|    default:
  ------------------
  |  Branch (931:5): [True: 0, False: 0]
  ------------------
  932|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  933|      0|      break;
  934|      0|    }
  935|      0|    break;
  936|      0|  case mhd_CONN_CLOSE_DAEMON_SHUTDOWN:
  ------------------
  |  Branch (936:3): [True: 0, False: 3]
  ------------------
  937|      0|    close_hard = true;
  938|      0|    end_code = MHD_REQUEST_ENDED_DAEMON_SHUTDOWN;
  939|      0|    break;
  940|       |
  941|      0|  case mhd_CONN_CLOSE_TIMEDOUT:
  ------------------
  |  Branch (941:3): [True: 0, False: 3]
  ------------------
  942|      0|    if (mhd_HTTP_STAGE_INIT == c->stage)
  ------------------
  |  Branch (942:9): [True: 0, False: 0]
  ------------------
  943|      0|    {
  944|      0|      close_hard = false;
  945|      0|      end_code = MHD_REQUEST_ENDED_COMPLETED_OK; /* Not used */
  946|      0|      break;
  947|      0|    }
  948|      0|    close_hard = true;
  949|      0|    end_code = MHD_REQUEST_ENDED_TIMEOUT_REACHED;
  950|      0|    sc = MHD_SC_CONNECTION_TIMEOUT;
  951|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (951:9): [True: 0, False: 0]
  |  Branch (951:34): [True: 0, False: 0]
  ------------------
  952|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to sending timeout");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  953|      0|    break;
  954|       |
  955|      0|  case mhd_CONN_CLOSE_ERR_REPLY_SENT:
  ------------------
  |  Branch (955:3): [True: 0, False: 3]
  ------------------
  956|      0|    close_hard = false;
  957|      0|    end_code = c->rq.too_large ?
  ------------------
  |  Branch (957:16): [True: 0, False: 0]
  ------------------
  958|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  959|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  960|      0|    break;
  961|      0|#ifdef MHD_SUPPORT_UPGRADE
  962|      0|  case mhd_CONN_CLOSE_UPGRADE:
  ------------------
  |  Branch (962:3): [True: 0, False: 3]
  ------------------
  963|      0|    close_hard = false;
  964|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK_UPGRADE;
  965|      0|    break;
  966|      0|#endif /* MHD_SUPPORT_UPGRADE */
  967|      0|  case mhd_CONN_CLOSE_HTTP_COMPLETED:
  ------------------
  |  Branch (967:3): [True: 0, False: 3]
  ------------------
  968|      0|    close_hard = false;
  969|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK;
  970|      0|    break;
  971|      0|#ifdef mhd_HAVE_TLS_ACME
  972|      0|  case mhd_CONN_CLOSE_ACME_ALPN_CHALLENGE_COMPLETED:
  ------------------
  |  Branch (972:3): [True: 0, False: 3]
  ------------------
  973|      0|    close_hard = false;
  974|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK;
  975|      0|    break;
  976|      0|#endif /* mhd_HAVE_TLS_ACME */
  977|       |
  978|       |
  979|      0|#ifdef MHD_SUPPORT_HTTP2
  980|      0|  case mhd_CONN_CLOSE_H2_CLOSE_SOFT:
  ------------------
  |  Branch (980:3): [True: 0, False: 3]
  ------------------
  981|      0|  case mhd_CONN_CLOSE_H2_CLOSE_HARD:
  ------------------
  |  Branch (981:3): [True: 0, False: 3]
  ------------------
  982|      0|#endif /* MHD_SUPPORT_HTTP2 */
  983|      0|  default:
  ------------------
  |  Branch (983:3): [True: 0, False: 3]
  ------------------
  984|      0|    mhd_assert (0 && "Unreachable code");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  985|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  986|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK;
  987|      0|    close_hard = false;
  988|      0|    break;
  989|      3|  }
  990|       |
  991|      3|  mhd_assert ((NULL == log_msg) || (MHD_SC_INTERNAL_ERROR != sc));
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  992|       |
  993|      3|#ifdef MHD_SUPPORT_UPGRADE
  994|      3|  if (mhd_CONN_CLOSE_UPGRADE == reason)
  ------------------
  |  Branch (994:7): [True: 0, False: 3]
  ------------------
  995|      0|  {
  996|      0|    mhd_assert (mhd_HTTP_STAGE_UPGRADING == c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  997|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_UPGRADED;
  998|      0|  }
  999|      3|  else
 1000|      3|#endif /* MHD_SUPPORT_UPGRADE */
 1001|      3|  if (1)
  ------------------
  |  Branch (1001:7): [True: 3, Folded]
  ------------------
 1002|      3|  {
 1003|      3|    if (conn_start_socket_closing (c,
  ------------------
  |  Branch (1003:9): [True: 0, False: 3]
  ------------------
 1004|      3|                                   close_hard))
 1005|      0|    {
 1006|      0|      (void)0;  // TODO: start local lingering phase
 1007|      0|      c->stage = mhd_HTTP_STAGE_PRE_CLOSING; // TODO: start local lingering phase
 1008|      0|      c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; // TODO: start local lingering phase
 1009|      0|    }
 1010|      3|    else
 1011|      3|    {  /* No need / not possible to linger */
 1012|      3|      c->stage = mhd_HTTP_STAGE_PRE_CLOSING;
 1013|      3|      c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
 1014|      3|    }
 1015|      3|  }
 1016|       |
 1017|      3|#ifdef MHD_SUPPORT_LOG_FUNCTIONALITY
 1018|      3|  if (NULL != log_msg)
  ------------------
  |  Branch (1018:7): [True: 3, False: 0]
  ------------------
 1019|      3|  {
 1020|      3|    mhd_LOG_MSG (c->daemon, sc, log_msg);
  ------------------
  |  |   80|      3|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 1021|      3|  }
 1022|       |#else  /* ! MHD_SUPPORT_LOG_FUNCTIONALITY */
 1023|       |  (void)log_msg;  /* Mute compiler warning */
 1024|       |  (void)sc;       /* Mute compiler warning */
 1025|       |#endif /* ! MHD_SUPPORT_LOG_FUNCTIONALITY */
 1026|       |
 1027|       |#if 0 // TODO: notification callback
 1028|       |  mhd_assert ((mhd_HTTP_STAGE_INIT != c->stage) || (!c->rq.app_aware));
 1029|       |  if ((NULL != d->notify_completed)
 1030|       |      && (c->rq.app_aware))
 1031|       |    d->notify_completed (d->notify_completed_cls,
 1032|       |                         c,
 1033|       |                         &c->rq.app_context,
 1034|       |                         MHD_REQUEST_ENDED_COMPLETED_OK);
 1035|       |#else
 1036|      3|  (void)end_code;
 1037|      3|#endif
 1038|      3|  c->rq.app_aware = false;
 1039|       |
 1040|      3|  if (!c->suspended)
  ------------------
  |  Branch (1040:7): [True: 3, False: 0]
  ------------------
 1041|      3|  {
 1042|      3|    mhd_assert (!c->resuming);
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1043|      3|    mhd_conn_deinit_activity_timeout (c);
 1044|      3|  }
 1045|       |
 1046|       |#ifndef NDEBUG
 1047|       |  c->dbg.closing_started = true;
 1048|       |#endif
 1049|      3|}
stream_funcs.c:_ZL25conn_start_socket_closingP14MHD_Connectionb:
  663|      3|{
  664|      3|  bool need_lingering;
  665|       |  /* Make changes on the socket early to let the kernel and the remote
  666|       |   * to process the changes in parallel. */
  667|      3|  if (close_hard)
  ------------------
  |  Branch (667:7): [True: 3, False: 0]
  ------------------
  668|      3|  {
  669|       |    /* Use abortive closing, send RST to remote to indicate a problem */
  670|      3|    (void)mhd_socket_set_hard_close (c->sk.fd);
  671|      3|    c->stage = mhd_HTTP_STAGE_PRE_CLOSING;
  672|      3|    c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  673|       |
  674|      3|    return false;
  675|      3|  }
  676|       |
  677|      0|  mhd_assert (c->sk.state.rmt_shut_wr \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  678|      0|              || !mhd_SOCKET_ERR_IS_HARD (c->sk.state.discnt_err));
  679|       |
  680|      0|  need_lingering = !c->sk.state.rmt_shut_wr;
  681|      0|  if (need_lingering)
  ------------------
  |  Branch (681:7): [True: 0, False: 0]
  ------------------
  682|      0|  {
  683|      0|#ifdef MHD_SUPPORT_HTTPS
  684|      0|    if (mhd_C_HAS_TLS (c))
  ------------------
  |  |  887|      0|#  define mhd_C_HAS_TLS(c) (((c)->tls) ? (! 0) : (0))
  |  |  ------------------
  |  |  |  Branch (887:28): [True: 0, False: 0]
  |  |  |  Branch (887:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  685|      0|    {
  686|      0|      if ((0 != (((unsigned int)c->sk.ready)
  ------------------
  |  Branch (686:11): [True: 0, False: 0]
  ------------------
  687|      0|                 & mhd_SOCKET_NET_STATE_SEND_READY))
  688|      0|          || c->sk.props.is_nonblck)
  ------------------
  |  Branch (688:14): [True: 0, False: 0]
  ------------------
  689|      0|        need_lingering =
  690|      0|          (mhd_TLS_PROCED_FAILED != mhd_tls_conn_shutdown (c->tls));
  ------------------
  |  |  225|      0|        mhd_TLS_FUNC (_conn_shutdown)((c_tls))
  |  |  ------------------
  |  |  |  |  251|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#define mhd_MACRO_CONCAT3(a, b, c)      mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   64|      0|#define mhd_MACRO_CONCAT3_(a, b, c)     a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  691|      0|    }
  692|      0|    else
  693|      0|#endif /* MHD_SUPPORT_HTTPS */
  694|      0|    if (1)
  ------------------
  |  Branch (694:9): [True: 0, Folded]
  ------------------
  695|      0|    {
  696|      0|      need_lingering = mhd_socket_shut_wr (c->sk.fd);
  697|      0|      if (need_lingering)
  ------------------
  |  Branch (697:11): [True: 0, False: 0]
  ------------------
  698|      0|        need_lingering = (!c->sk.state.rmt_shut_wr);  /* Skip as already closed */
  699|      0|    }
  700|      0|  }
  701|       |
  702|      0|  return need_lingering;
  703|      3|}

_Z18mhd_parse_uri_argsmPcPFbPvPK10MHD_StringPK18MHD_StringNullableES0_:
 1221|      1|{
 1222|      1|  size_t i;
 1223|       |
 1224|      1|  mhd_assert (args_len < (size_t)(args_len + 1));  /* Does not work when args_len == SIZE_MAX */
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1225|       |
 1226|      2|  for (i = 0; i < args_len; ++i) /* Looking for names of the parameters */
  ------------------
  |  Branch (1226:15): [True: 1, False: 1]
  ------------------
 1227|      1|  {
 1228|      1|    size_t name_start;
 1229|      1|    size_t name_len;
 1230|      1|    size_t value_start;
 1231|      1|    size_t value_len;
 1232|      1|    struct MHD_String name;
 1233|      1|    struct MHD_StringNullable value;
 1234|       |
 1235|       |    /* Found start of the name */
 1236|       |
 1237|      1|    value_start = 0;
 1238|      2|    for (name_start = i; i < args_len; ++i) /* Processing parameter */
  ------------------
  |  Branch (1238:26): [True: 2, False: 0]
  ------------------
 1239|      2|    {
 1240|      2|      if ('+' == args[i])
  ------------------
  |  Branch (1240:11): [True: 0, False: 2]
  ------------------
 1241|      0|        args[i] = ' ';
 1242|      2|      else if ('=' == args[i])
  ------------------
  |  Branch (1242:16): [True: 1, False: 1]
  ------------------
 1243|      1|      {
 1244|       |        /* Found start of the value */
 1245|      2|        for (value_start = ++i; i < args_len; ++i) /* Processing parameter value */
  ------------------
  |  Branch (1245:33): [True: 1, False: 1]
  ------------------
 1246|      1|        {
 1247|      1|          if ('+' == args[i])
  ------------------
  |  Branch (1247:15): [True: 0, False: 1]
  ------------------
 1248|      0|            args[i] = ' ';
 1249|      1|          else if ('&' == args[i]) /* delimiter for the next parameter */
  ------------------
  |  Branch (1249:20): [True: 0, False: 1]
  ------------------
 1250|      0|            break; /* Next parameter */
 1251|      1|        }
 1252|      1|        break; /* End of the current parameter */
 1253|      1|      }
 1254|      1|      else if ('&' == args[i])
  ------------------
  |  Branch (1254:16): [True: 0, False: 1]
  ------------------
 1255|      0|        break; /* End of the name of the parameter without a value */
 1256|      2|    }
 1257|       |
 1258|       |    /* PCT-decode, zero-terminate and store the found parameter */
 1259|       |
 1260|      1|    if (0 != value_start) /* Value cannot start at zero position */
  ------------------
  |  Branch (1260:9): [True: 1, False: 0]
  ------------------
 1261|      1|    { /* Name with value */
 1262|      1|      mhd_assert (name_start + 1 <= value_start);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1263|      1|      name_len = value_start - name_start - 1;
 1264|       |
 1265|      1|      value_len =
 1266|      1|        mhd_str_pct_decode_lenient_n (args + value_start, i - value_start,
 1267|      1|                                      args + value_start, i - value_start,
 1268|      1|                                      NULL); // TODO: add support for broken encoding detection
 1269|      1|      if (value_start + value_len < args_len)
  ------------------
  |  Branch (1269:11): [True: 0, False: 1]
  ------------------
 1270|      0|        args[value_start + value_len] = 0;
 1271|      1|      value.cstr = args + value_start;
 1272|      1|      value.len = value_len;
 1273|      1|    }
 1274|      0|    else
 1275|      0|    { /* Name without value */
 1276|      0|      name_len = i - name_start;
 1277|       |
 1278|      0|      value.cstr = NULL;
 1279|      0|      value.len = 0;
 1280|      0|    }
 1281|      1|    name_len = mhd_str_pct_decode_lenient_n (args + name_start, name_len,
 1282|      1|                                             args + name_start, name_len,
 1283|      1|                                             NULL); // TODO: add support for broken encoding detection
 1284|      1|    if (name_start + name_len < args_len)
  ------------------
  |  Branch (1284:9): [True: 1, False: 0]
  ------------------
 1285|      1|      args[name_start + name_len] = 0;
 1286|      1|    name.cstr = args + name_start;
 1287|      1|    name.len = name_len;
 1288|      1|    if (!cb (cls, &name, &value))
  ------------------
  |  Branch (1288:9): [True: 0, False: 1]
  ------------------
 1289|      0|      return false;
 1290|      1|  }
 1291|      1|  return true;
 1292|      1|}
_Z27mhd_stream_get_request_lineP14MHD_Connection:
 1479|      6|{
 1480|      6|  const int discp_lvl = c->daemon->req_cfg.strictness;
 1481|       |  /* Parse whitespace in URI, special parsing of the request line */
 1482|      6|  const bool wsp_in_uri = (0 >= discp_lvl);
 1483|       |  /* Keep whitespace in URI, give app URI with whitespace instead of
 1484|       |     automatic redirect to fixed URI */
 1485|      6|  const bool wsp_in_uri_keep = (-2 >= discp_lvl);
 1486|       |
 1487|      6|  if (!get_request_line_inner (c))
  ------------------
  |  Branch (1487:7): [True: 0, False: 6]
  ------------------
 1488|      0|  {
 1489|       |    /* End of the request line has not been found yet */
 1490|      0|    mhd_assert ((!wsp_in_uri) || NULL == c->rq.version);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1491|      0|    if ((NULL != c->rq.version)
  ------------------
  |  Branch (1491:9): [True: 0, False: 0]
  ------------------
 1492|      0|        && (HTTP_VER_LEN <
  ------------------
  |  |  480|      0|#define HTTP_VER_LEN (mhd_SSTR_LEN (MHD_HTTP_VERSION_1_1_STR))
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1492:12): [True: 0, False: 0]
  ------------------
 1493|      0|            (c->rq.hdrs.rq_line.proc_pos
 1494|      0|             - (size_t)(c->rq.version - c->read_buffer))))
 1495|      0|    {
 1496|      0|      c->rq.http_ver = MHD_HTTP_VERSION_INVALID;
 1497|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 1498|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 1499|      0|                                     ERR_RSP_REQUEST_MALFORMED);
 1500|      0|      return true; /* Error in the request */
 1501|      0|    }
 1502|      0|    return false;
 1503|      0|  }
 1504|      6|  if (mhd_HTTP_STAGE_REQ_LINE_RECEIVING < c->stage)
  ------------------
  |  Branch (1504:7): [True: 5, False: 1]
  ------------------
 1505|      5|    return true; /* Error in the request */
 1506|       |
 1507|      1|  mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1508|      1|  mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1509|      1|  mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1510|      1|  mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1511|      1|  if (0 != c->rq.hdrs.rq_line.num_ws_in_uri)
  ------------------
  |  Branch (1511:7): [True: 0, False: 1]
  ------------------
 1512|      0|  {
 1513|      0|    if (!wsp_in_uri)
  ------------------
  |  Branch (1513:9): [True: 0, False: 0]
  ------------------
 1514|      0|    {
 1515|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 1516|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 1517|      0|                                     ERR_RSP_RQ_TARGET_INVALID_CHAR);
 1518|      0|      return true; /* Error in the request */
 1519|      0|    }
 1520|      0|    if (!wsp_in_uri_keep)
  ------------------
  |  Branch (1520:9): [True: 0, False: 0]
  ------------------
 1521|      0|    {
 1522|      0|      send_redirect_fixed_rq_target (c);
 1523|      0|      return true; /* Error in the request */
 1524|      0|    }
 1525|      0|  }
 1526|      1|  if (!process_request_target (c))
  ------------------
  |  Branch (1526:7): [True: 0, False: 1]
  ------------------
 1527|      0|    return true; /* Error in processing */
 1528|       |
 1529|      1|  c->stage = mhd_HTTP_STAGE_REQ_LINE_RECEIVED;
 1530|      1|  return true;
 1531|      1|}
_Z36mhd_stream_switch_to_rq_headers_procP14MHD_Connection:
 1536|      1|{
 1537|      1|  c->rq.field_lines.start = c->read_buffer;
 1538|      1|  mhd_stream_reset_rq_hdr_proc_state (c);
 1539|      1|  c->stage = mhd_HTTP_STAGE_REQ_HEADERS_RECEIVING;
 1540|      1|}
_Z34mhd_stream_reset_rq_hdr_proc_stateP14MHD_Connection:
 2095|      1|{
 2096|      1|  memset (&c->rq.hdrs.hdr, 0, sizeof(c->rq.hdrs.hdr));
 2097|      1|}
_Z32mhd_stream_parse_request_headersP14MHD_Connection:
 2653|      4|{
 2654|      4|  bool has_host;
 2655|      4|  bool has_trenc;
 2656|      4|  bool has_cntnlen;
 2657|      4|  bool has_keepalive;
 2658|      4|  struct mhd_RequestField *f;
 2659|       |
 2660|       |  /* The presence of the request body is indicated by "Content-Length:" or
 2661|       |     "Transfer-Encoding:" request headers.
 2662|       |     Unless one of these two headers is used, the request has no request body.
 2663|       |     See RFC9112, Section 6, paragraph 4. */
 2664|      4|  c->rq.have_chunked_upload = false;
 2665|      4|  c->rq.cntn.cntn_size = 0;
 2666|       |
 2667|      4|  has_host = false;
 2668|      4|  has_trenc = false;
 2669|      4|  has_cntnlen = false;
 2670|      4|  has_keepalive = true;
 2671|       |
 2672|      4|  for (f = mhd_DLINKEDL_GET_FIRST (&(c->rq), fields);
  ------------------
  |  |  362|      4|        mhd_DLINKEDL_GET_FIRST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  248|      4|#define mhd_DLINKEDL_GET_FIRST_D(p_list) ((p_list)->first)
  |  |  ------------------
  ------------------
 2673|     12|       NULL != f;
  ------------------
  |  Branch (2673:8): [True: 12, False: 0]
  ------------------
 2674|      8|       f = mhd_DLINKEDL_GET_NEXT (f, fields))
  ------------------
  |  |  377|      8|#define mhd_DLINKEDL_GET_NEXT(p_obj, links_name) ((p_obj)->links_name.next)
  ------------------
 2675|     12|  {
 2676|     12|    if (MHD_VK_HEADER != f->field.kind)
  ------------------
  |  Branch (2676:9): [True: 0, False: 12]
  ------------------
 2677|      0|      continue;
 2678|       |
 2679|       |    /* "Host:" */
 2680|     12|    if (mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_HOST,
  ------------------
  |  |  142|     12|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|     12|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 4, False: 8]
  |  |  ------------------
  |  |  143|     12|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2681|     12|                                     f->field.nv.name.cstr,
 2682|     12|                                     f->field.nv.name.len))
 2683|      4|    {
 2684|      4|      if ((has_host)
  ------------------
  |  Branch (2684:11): [True: 0, False: 4]
  ------------------
 2685|      0|          && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2685:14): [True: 0, False: 0]
  ------------------
 2686|      0|      {
 2687|      0|        mhd_LOG_MSG (c->daemon, MHD_SC_HOST_HEADER_SEVERAL, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2688|      0|                     "Received request with more than one 'Host' header.");
 2689|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2690|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2691|      0|                                       ERR_RSP_REQUEST_HAS_SEVERAL_HOSTS);
 2692|      0|        return;
 2693|      0|      }
 2694|      4|      if ((0u == f->field.nv.value.len)
  ------------------
  |  Branch (2694:11): [True: 0, False: 4]
  ------------------
 2695|      0|          && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2695:14): [True: 0, False: 0]
  ------------------
 2696|      0|      {
 2697|      0|        mhd_LOG_MSG (c->daemon, MHD_SC_HOST_HEADER_MALFORMED, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2698|      0|                     "Received request with empty 'Host' header.");
 2699|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2700|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2701|      0|                                       ERR_RSP_REQUEST_HAS_MALFORMED_HOST);
 2702|      0|        return;
 2703|      0|      }
 2704|      4|      has_host = true;
 2705|      4|      continue;
 2706|      4|    }
 2707|       |
 2708|       |    /* "Content-Length:" */
 2709|      8|    if (mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_CONTENT_LENGTH,
  ------------------
  |  |  142|      8|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      8|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 4, False: 4]
  |  |  ------------------
  |  |  143|      8|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2710|      8|                                     f->field.nv.name.cstr,
 2711|      8|                                     f->field.nv.name.len))
 2712|      4|    {
 2713|      4|      size_t num_digits;
 2714|      4|      uint_fast64_t cntn_size;
 2715|       |
 2716|      4|      num_digits = mhd_str_to_uint64_n (f->field.nv.value.cstr,
 2717|      4|                                        f->field.nv.value.len,
 2718|      4|                                        &cntn_size);
 2719|      4|      if (((0 == num_digits)
  ------------------
  |  Branch (2719:12): [True: 0, False: 4]
  ------------------
 2720|      0|           && (0 != f->field.nv.value.len)
  ------------------
  |  Branch (2720:15): [True: 0, False: 0]
  ------------------
 2721|      0|           && ('9' >= f->field.nv.value.cstr[0])
  ------------------
  |  Branch (2721:15): [True: 0, False: 0]
  ------------------
 2722|      0|           && ('0' <= f->field.nv.value.cstr[0]))
  ------------------
  |  Branch (2722:15): [True: 0, False: 0]
  ------------------
 2723|      4|          || (MHD_SIZE_UNKNOWN == c->rq.cntn.cntn_size))
  ------------------
  |  |  302|      4|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
  |  Branch (2723:14): [True: 4, False: 0]
  ------------------
 2724|      4|      {
 2725|      4|        mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_TOO_LARGE, \
  ------------------
  |  |   80|      4|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2726|      4|                     "Too large value of 'Content-Length' header. " \
 2727|      4|                     "Closing connection.");
 2728|      4|        mhd_RESPOND_WITH_ERROR_STATIC (c, \
  ------------------
  |  |   85|      4|          respond_with_error_len ((c), (code), \
  |  |   86|      4|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      4|                                  0, NULL)
  ------------------
 2729|      4|                                       MHD_HTTP_STATUS_CONTENT_TOO_LARGE, \
 2730|      4|                                       ERR_RSP_REQUEST_CONTENTLENGTH_TOOLARGE);
 2731|      4|        return;
 2732|      4|      }
 2733|      0|      else if ((f->field.nv.value.len != num_digits)
  ------------------
  |  Branch (2733:16): [True: 0, False: 0]
  ------------------
 2734|      0|               || (0 == num_digits))
  ------------------
  |  Branch (2734:19): [True: 0, False: 0]
  ------------------
 2735|      0|      {
 2736|      0|        mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_MALFORMED, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2737|      0|                     "Failed to parse 'Content-Length' header. " \
 2738|      0|                     "Closing connection.");
 2739|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c, \
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2740|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST, \
 2741|      0|                                       ERR_RSP_REQUEST_CONTENTLENGTH_MALFORMED);
 2742|      0|        return;
 2743|      0|      }
 2744|       |
 2745|      0|      if (has_cntnlen)
  ------------------
  |  Branch (2745:11): [True: 0, False: 0]
  ------------------
 2746|      0|      {
 2747|      0|        bool send_err;
 2748|      0|        send_err = false;
 2749|      0|        if (c->rq.cntn.cntn_size == cntn_size)
  ------------------
  |  Branch (2749:13): [True: 0, False: 0]
  ------------------
 2750|      0|        {
 2751|      0|          if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2751:15): [True: 0, False: 0]
  ------------------
 2752|      0|          {
 2753|      0|            mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_SEVERAL_SAME, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2754|      0|                         "Received request with more than one " \
 2755|      0|                         "'Content-Length' header with the same value.");
 2756|      0|            send_err = true;
 2757|      0|          }
 2758|      0|        }
 2759|      0|        else
 2760|      0|        {
 2761|      0|          mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_SEVERAL_DIFFERENT, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2762|      0|                       "Received request with more than one " \
 2763|      0|                       "'Content-Length' header with conflicting values.");
 2764|      0|          send_err = true;
 2765|      0|        }
 2766|       |
 2767|      0|        if (send_err)
  ------------------
  |  Branch (2767:13): [True: 0, False: 0]
  ------------------
 2768|      0|        {
 2769|      0|          mhd_RESPOND_WITH_ERROR_STATIC ( \
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2770|      0|            c, \
 2771|      0|            MHD_HTTP_STATUS_BAD_REQUEST, \
 2772|      0|            ERR_RSP_REQUEST_CONTENTLENGTH_SEVERAL);
 2773|      0|          return;
 2774|      0|        }
 2775|      0|      }
 2776|      0|      mhd_assert ((0 == c->rq.cntn.cntn_size) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2777|      0|                  || (c->rq.cntn.cntn_size == cntn_size));
 2778|      0|      c->rq.cntn.cntn_size = cntn_size;
 2779|      0|      has_cntnlen = true;
 2780|      0|      continue;
 2781|      0|    }
 2782|       |
 2783|       |    /* "Connection:" */
 2784|      4|    if (mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_CONNECTION,
  ------------------
  |  |  142|      4|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 0, False: 4]
  |  |  ------------------
  |  |  143|      4|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2785|      4|                                     f->field.nv.name.cstr,
 2786|      4|                                     f->field.nv.name.len))
 2787|      0|    {
 2788|      0|      if (mhd_str_has_token_caseless (f->field.nv.value.cstr, // TODO: compare as size string
  ------------------
  |  Branch (2788:11): [True: 0, False: 0]
  ------------------
 2789|      0|                                      "close",
 2790|      0|                                      mhd_SSTR_LEN ("close")))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
 2791|      0|      {
 2792|      0|        mhd_assert (mhd_CONN_MUST_UPGRADE != c->conn_reuse);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2793|      0|        c->conn_reuse = mhd_CONN_MUST_CLOSE;
 2794|      0|      }
 2795|      0|      else if ((MHD_HTTP_VERSION_1_0 == c->rq.http_ver)
  ------------------
  |  Branch (2795:16): [True: 0, False: 0]
  ------------------
 2796|      0|               && (mhd_CONN_MUST_CLOSE != c->conn_reuse))
  ------------------
  |  Branch (2796:19): [True: 0, False: 0]
  ------------------
 2797|      0|      {
 2798|      0|        if (mhd_str_has_token_caseless (f->field.nv.value.cstr,  // TODO: compare as size string
  ------------------
  |  Branch (2798:13): [True: 0, False: 0]
  ------------------
 2799|      0|                                        "keep-alive",
 2800|      0|                                        mhd_SSTR_LEN ("keep-alive")))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
 2801|      0|          has_keepalive = true;
 2802|      0|      }
 2803|       |
 2804|      0|      continue;
 2805|      0|    }
 2806|       |
 2807|       |    /* "Transfer-Encoding:" */
 2808|      4|    if (mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_TRANSFER_ENCODING,
  ------------------
  |  |  142|      4|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 4, False: 0]
  |  |  ------------------
  |  |  143|      4|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2809|      4|                                     f->field.nv.name.cstr,
 2810|      4|                                     f->field.nv.name.len))
 2811|      4|    {
 2812|      4|      if (mhd_str_equal_caseless_n_st ("chunked",
  ------------------
  |  |  142|      4|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 4, False: 0]
  |  |  ------------------
  |  |  143|      4|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2813|      4|                                       f->field.nv.value.cstr,
 2814|      4|                                       f->field.nv.value.len))
 2815|      4|      {
 2816|      4|        c->rq.have_chunked_upload = true;
 2817|      4|        c->rq.cntn.cntn_size = MHD_SIZE_UNKNOWN;
  ------------------
  |  |  302|      4|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
 2818|      4|      }
 2819|      0|      else
 2820|      0|      {
 2821|      0|        mhd_LOG_MSG (c->daemon, MHD_SC_TRANSFER_ENCODING_UNSUPPORTED, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2822|      0|                     "The 'Transfer-Encoding' used in request is " \
 2823|      0|                     "unsupported or invalid.");
 2824|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2825|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2826|      0|                                       ERR_RSP_UNSUPPORTED_TR_ENCODING);
 2827|      0|        return;
 2828|      0|      }
 2829|      4|      has_trenc = true;
 2830|      4|      continue;
 2831|      4|    }
 2832|       |
 2833|      0|#ifdef MHD_SUPPORT_COOKIES
 2834|       |    /* "Cookie:" */
 2835|      0|    if ((!c->daemon->req_cfg.disable_cookies)
  ------------------
  |  Branch (2835:9): [True: 0, False: 0]
  ------------------
 2836|      0|        && mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_COOKIE,
  ------------------
  |  |  142|      0|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  143|      0|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2837|      0|                                        f->field.nv.name.cstr,
 2838|      0|                                        f->field.nv.name.len))
 2839|      0|    {
 2840|      0|      if (MHD_PARSE_COOKIE_NO_MEMORY ==
  ------------------
  |  Branch (2840:11): [True: 0, False: 0]
  ------------------
 2841|      0|          parse_cookie_header (c,
 2842|      0|                               &(f->field.nv.value)))
 2843|      0|      {
 2844|      0|        handle_req_cookie_no_space (c);
 2845|      0|        return;
 2846|      0|      }
 2847|      0|      continue;
 2848|      0|    }
 2849|      0|#endif /* MHD_SUPPORT_COOKIES */
 2850|       |
 2851|       |    /* "Expect: 100-continue" */
 2852|      0|    if (mhd_str_equal_caseless_n_st (MHD_HTTP_HEADER_EXPECT,
  ------------------
  |  |  142|      0|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  143|      0|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2853|      0|                                     f->field.nv.name.cstr,
 2854|      0|                                     f->field.nv.name.len))
 2855|      0|    {
 2856|      0|      if (mhd_str_equal_caseless_n_st ("100-continue",
  ------------------
  |  |  142|      0|        ((mhd_SSTR_LEN (arr) == (l)) \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  143|      0|         && mhd_str_equal_caseless_bin_n (arr,str,l))
  |  |  ------------------
  |  |  |  Branch (143:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2857|      0|                                       f->field.nv.value.cstr,
 2858|      0|                                       f->field.nv.value.len))
 2859|      0|        c->rq.have_expect_100 = true;
 2860|      0|      else
 2861|      0|      {
 2862|      0|        if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2862:13): [True: 0, False: 0]
  ------------------
 2863|      0|        {
 2864|      0|          mhd_LOG_MSG (c->daemon, MHD_SC_EXPECT_HEADER_VALUE_UNSUPPORTED, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2865|      0|                       "The 'Expect' header value used in request is " \
 2866|      0|                       "unsupported or invalid.");
 2867|      0|          mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2868|      0|                                         MHD_HTTP_STATUS_EXPECTATION_FAILED,
 2869|      0|                                         ERR_RSP_UNSUPPORTED_EXPECT_HDR_VALUE);
 2870|      0|          return;
 2871|      0|        }
 2872|      0|      }
 2873|      0|      continue;
 2874|      0|    }
 2875|      0|  }
 2876|       |
 2877|      0|  c->rq.cntn.cntn_present = (has_trenc || has_cntnlen);
  ------------------
  |  Branch (2877:30): [True: 0, False: 0]
  |  Branch (2877:43): [True: 0, False: 0]
  ------------------
 2878|      0|  if (has_trenc && has_cntnlen)
  ------------------
  |  Branch (2878:7): [True: 0, False: 0]
  |  Branch (2878:20): [True: 0, False: 0]
  ------------------
 2879|      0|  {
 2880|      0|    if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2880:9): [True: 0, False: 0]
  ------------------
 2881|      0|    {
 2882|      0|      mhd_RESPOND_WITH_ERROR_STATIC ( \
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2883|      0|        c, \
 2884|      0|        MHD_HTTP_STATUS_BAD_REQUEST, \
 2885|      0|        ERR_RSP_REQUEST_CNTNLENGTH_WITH_TR_ENCODING);
 2886|      0|      return;
 2887|      0|    }
 2888|       |    /* Must close connection after reply to prevent potential attack */
 2889|      0|    c->conn_reuse = mhd_CONN_MUST_CLOSE;
 2890|      0|    c->rq.cntn.cntn_size = MHD_SIZE_UNKNOWN;
  ------------------
  |  |  302|      0|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
 2891|      0|    mhd_assert (c->rq.have_chunked_upload);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2892|      0|    mhd_LOG_MSG (c->daemon, MHD_SC_CONTENT_LENGTH_AND_TR_ENC, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2893|      0|                 "The 'Content-Length' request header is ignored " \
 2894|      0|                 "as chunked 'Transfer-Encoding' is used " \
 2895|      0|                 "for this request.");
 2896|      0|  }
 2897|       |
 2898|      0|  if (MHD_HTTP_VERSION_IS_LIKE_11 (c->rq.http_ver))
  ------------------
  |  |   88|      0|        ((MHD_HTTP_VERSION_1_1 <= (v)) && (MHD_HTTP_VERSION_1_2P >= (v)))
  |  |  ------------------
  |  |  |  Branch (88:10): [True: 0, False: 0]
  |  |  |  Branch (88:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2899|      0|  {
 2900|      0|    if ((!has_host)
  ------------------
  |  Branch (2900:9): [True: 0, False: 0]
  ------------------
 2901|      0|        && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2901:12): [True: 0, False: 0]
  ------------------
 2902|      0|    {
 2903|      0|      mhd_LOG_MSG (c->daemon, MHD_SC_HOST_HEADER_MISSING, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2904|      0|                   "Received HTTP/1.1 request without 'Host' header.");
 2905|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 2906|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 2907|      0|                                     ERR_RSP_REQUEST_LACKS_HOST);
 2908|      0|      return;
 2909|      0|    }
 2910|      0|  }
 2911|      0|  else
 2912|      0|  {
 2913|      0|    if (!has_keepalive)
  ------------------
  |  Branch (2913:9): [True: 0, False: 0]
  ------------------
 2914|      0|      c->conn_reuse = mhd_CONN_MUST_CLOSE; /* Do not re-use HTTP/1.0 connection by default */
 2915|      0|    if (has_trenc)
  ------------------
  |  Branch (2915:9): [True: 0, False: 0]
  ------------------
 2916|      0|      c->conn_reuse = mhd_CONN_MUST_CLOSE; /* Framing could be incorrect */
 2917|      0|  }
 2918|       |
 2919|      0|  c->stage = mhd_HTTP_STAGE_HEADERS_PROCESSED;
 2920|      0|  return;
 2921|      0|}
_Z36mhd_stream_process_req_recv_finishedP14MHD_Connection:
 3734|      6|{
 3735|      6|  if (NULL != c->rq.cntn.lbuf.data)
  ------------------
  |  Branch (3735:7): [True: 1, False: 5]
  ------------------
 3736|      1|    mhd_daemon_free_lbuf (c->daemon, &(c->rq.cntn.lbuf));
 3737|      6|  c->rq.cntn.lbuf.data = NULL;
 3738|      6|  if (c->rq.cntn.cntn_size != c->rq.cntn.proc_size)
  ------------------
  |  Branch (3738:7): [True: 4, False: 2]
  ------------------
 3739|      4|    c->discard_request = true;
 3740|      6|  mhd_assert (NULL != c->rp.response);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 3741|      6|  c->stage = mhd_HTTP_STAGE_START_REPLY;
 3742|      6|  return true;
 3743|      6|}
stream_process_request.c:_ZL22get_request_line_innerP14MHD_Connection:
  649|      6|{
  650|      6|  size_t p; /**< The current processing position */
  651|      6|  const int discp_lvl = c->daemon->req_cfg.strictness;
  652|       |  /* Allow to skip one or more empty lines before the request line.
  653|       |     RFC 9112, section 2.2 */
  654|      6|  const bool skip_empty_lines = (1 >= discp_lvl);
  655|       |  /* Allow to skip more then one empty line before the request line.
  656|       |     RFC 9112, section 2.2 */
  657|      6|  const bool skip_several_empty_lines = (skip_empty_lines && (0 >= discp_lvl));
  ------------------
  |  Branch (657:42): [True: 5, False: 1]
  |  Branch (657:62): [True: 2, False: 3]
  ------------------
  658|       |  /* Allow to skip unlimited number of empty lines before the request line.
  659|       |     RFC 9112, section 2.2 */
  660|      6|  const bool skip_unlimited_empty_lines =
  661|      6|    (skip_empty_lines && (-3 >= discp_lvl));
  ------------------
  |  Branch (661:6): [True: 5, False: 1]
  |  Branch (661:26): [True: 0, False: 5]
  ------------------
  662|       |  /* Treat bare LF as the end of the line.
  663|       |     RFC 9112, section 2.2 */
  664|      6|  const bool bare_lf_as_crlf = mhd_ALLOW_BARE_LF_AS_CRLF (discp_lvl);
  ------------------
  |  | 1354|      6|#define mhd_ALLOW_BARE_LF_AS_CRLF(strictness) (0 >= strictness)
  ------------------
  665|       |  /* Treat tab as whitespace delimiter.
  666|       |     RFC 9112, section 3 */
  667|      6|  const bool tab_as_wsp = (0 >= discp_lvl);
  668|       |  /* Treat VT (vertical tab) and FF (form feed) as whitespace delimiters.
  669|       |     RFC 9112, section 3 */
  670|      6|  const bool other_wsp_as_wsp = (-1 >= discp_lvl);
  671|       |  /* Treat continuous whitespace block as a single space.
  672|       |     RFC 9112, section 3 */
  673|      6|  const bool wsp_blocks = (-1 >= discp_lvl);
  674|       |  /* Parse whitespace in URI, special parsing of the request line.
  675|       |     RFC 9112, section 3.2 */
  676|      6|  const bool wsp_in_uri = (0 >= discp_lvl);
  677|       |  /* Keep whitespace in URI, give app URI with whitespace instead of
  678|       |     automatic redirect to fixed URI.
  679|       |     Violates RFC 9112, section 3.2 */
  680|      6|  const bool wsp_in_uri_keep = (-2 >= discp_lvl);
  681|       |  /* Keep bare CR character as is.
  682|       |     Violates RFC 9112, section 2.2 */
  683|      6|  const bool bare_cr_keep = (wsp_in_uri_keep && (-3 >= discp_lvl));
  ------------------
  |  Branch (683:30): [True: 0, False: 6]
  |  Branch (683:49): [True: 0, False: 0]
  ------------------
  684|       |  /* Treat bare CR as space; replace it with space before processing.
  685|       |     RFC 9112, section 2.2 */
  686|      6|  const bool bare_cr_as_sp = ((!bare_cr_keep) && (-1 >= discp_lvl));
  ------------------
  |  Branch (686:31): [True: 6, False: 0]
  |  Branch (686:50): [True: 0, False: 6]
  ------------------
  687|       |
  688|      6|  mhd_assert (mhd_HTTP_STAGE_INIT == c->stage \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  689|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  690|      6|  mhd_assert (NULL == c->rq.method.cstr \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  691|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  692|      6|  mhd_assert (mhd_HTTP_METHOD_NO_METHOD == c->rq.http_mthd \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  693|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  694|      6|  mhd_assert (mhd_HTTP_METHOD_NO_METHOD == c->rq.http_mthd \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  695|      6|              || 0 != c->rq.hdrs.rq_line.proc_pos);
  696|       |
  697|      6|  if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (697:7): [True: 0, False: 6]
  ------------------
  698|      0|  {
  699|      0|    mhd_assert (mhd_HTTP_STAGE_INIT == c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  700|      0|    return false; /* No data to process */
  701|      0|  }
  702|      6|  p = c->rq.hdrs.rq_line.proc_pos;
  703|      6|  mhd_assert (p <= c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  704|       |
  705|       |  /* Skip empty lines, if any (and if allowed) */
  706|       |  /* See RFC 9112, section 2.2 */
  707|      6|  if ((0 == p)
  ------------------
  |  Branch (707:7): [True: 6, False: 0]
  ------------------
  708|      6|      && (skip_empty_lines))
  ------------------
  |  Branch (708:10): [True: 5, False: 1]
  ------------------
  709|      5|  {
  710|       |    /* Skip empty lines before the request line.
  711|       |       See RFC 9112, section 2.2 */
  712|      5|    bool is_empty_line;
  713|      5|    mhd_assert (mhd_HTTP_STAGE_INIT == c->stage);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  714|      5|    mhd_assert (0 == c->rq.method.len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  715|      5|    mhd_assert (NULL == c->rq.method.cstr);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  716|      5|    mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  717|      5|    mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  718|      5|    mhd_assert (NULL == c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  719|      5|    mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  720|      5|    mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  721|      5|    do
  722|      5|    {
  723|      5|      is_empty_line = false;
  724|      5|      if ('\r' == c->read_buffer[0])
  ------------------
  |  Branch (724:11): [True: 0, False: 5]
  ------------------
  725|      0|      {
  726|      0|        if (1 == c->read_buffer_offset)
  ------------------
  |  Branch (726:13): [True: 0, False: 0]
  ------------------
  727|      0|          return false; /* Not enough data yet */
  728|      0|        if ('\n' == c->read_buffer[1])
  ------------------
  |  Branch (728:13): [True: 0, False: 0]
  ------------------
  729|      0|        {
  730|      0|          is_empty_line = true;
  731|      0|          c->read_buffer += 2;
  732|      0|          c->read_buffer_size -= 2;
  733|      0|          c->read_buffer_offset -= 2;
  734|      0|          c->rq.hdrs.rq_line.skipped_empty_lines++;
  735|      0|        }
  736|      0|      }
  737|      5|      else if (('\n' == c->read_buffer[0])
  ------------------
  |  Branch (737:16): [True: 0, False: 5]
  ------------------
  738|      0|               && (bare_lf_as_crlf))
  ------------------
  |  Branch (738:19): [True: 0, False: 0]
  ------------------
  739|      0|      {
  740|      0|        is_empty_line = true;
  741|      0|        c->read_buffer += 1;
  742|      0|        c->read_buffer_size -= 1;
  743|      0|        c->read_buffer_offset -= 1;
  744|      0|        c->rq.hdrs.rq_line.skipped_empty_lines++;
  745|      0|      }
  746|      5|      if (is_empty_line)
  ------------------
  |  Branch (746:11): [True: 0, False: 5]
  ------------------
  747|      0|      {
  748|      0|        if ((!skip_unlimited_empty_lines)
  ------------------
  |  Branch (748:13): [True: 0, False: 0]
  ------------------
  749|      0|            && (((unsigned int)((skip_several_empty_lines) ?
  ------------------
  |  Branch (749:16): [True: 0, False: 0]
  |  Branch (749:33): [True: 0, False: 0]
  ------------------
  750|      0|                                MHD_MAX_EMPTY_LINES_SKIP : 1)) <
  ------------------
  |  |  636|      0|#  define MHD_MAX_EMPTY_LINES_SKIP 1024
  ------------------
  751|      0|                c->rq.hdrs.rq_line.skipped_empty_lines))
  752|      0|        {
  753|      0|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  754|      0|                            "Too many meaningless extra empty lines " \
  755|      0|                            "received before the request.");
  756|      0|          return true; /* Process connection closure */
  757|      0|        }
  758|      0|        if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (758:13): [True: 0, False: 0]
  ------------------
  759|      0|          return false;  /* No more data to process */
  760|      0|      }
  761|      5|    } while (is_empty_line);
  ------------------
  |  Branch (761:14): [True: 0, False: 5]
  ------------------
  762|      5|  }
  763|       |  /* All empty lines are skipped */
  764|       |
  765|      6|  c->stage = mhd_HTTP_STAGE_REQ_LINE_RECEIVING;
  766|       |  /* Read and parse the request line */
  767|      6|  mhd_assert (1 <= c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  768|       |
  769|    136|  while (p < c->read_buffer_offset)
  ------------------
  |  Branch (769:10): [True: 136, False: 0]
  ------------------
  770|    136|  {
  771|    136|    char *const restrict read_buffer = c->read_buffer;
  772|    136|    const char chr = read_buffer[p];
  773|    136|    bool end_of_line;
  774|       |    /*
  775|       |       The processing logic is different depending on the configured strictness:
  776|       |
  777|       |       When whitespace BLOCKS are NOT ALLOWED, the end of the whitespace is
  778|       |       processed BEFORE processing of the current character.
  779|       |       When whitespace BLOCKS are ALLOWED, the end of the whitespace is
  780|       |       processed AFTER processing of the current character.
  781|       |
  782|       |       When space char in the URI is ALLOWED, the delimiter between the URI and
  783|       |       the HTTP version string is processed only at the END of the line.
  784|       |       When space in the URI is NOT ALLOWED, the delimiter between the URI and
  785|       |       the HTTP version string is processed as soon as the FIRST whitespace is
  786|       |       found after URI start.
  787|       |     */
  788|       |
  789|    136|    end_of_line = false;
  790|       |
  791|    136|    mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_end) \
  ------------------
  |  |   66|    136|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  792|    136|                || (c->rq.hdrs.rq_line.last_ws_end > \
  793|    136|                    c->rq.hdrs.rq_line.last_ws_start));
  794|    136|    mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_start) \
  ------------------
  |  |   66|    136|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  795|    136|                || (0 != c->rq.hdrs.rq_line.last_ws_end));
  796|       |
  797|       |    /* Check for the end of the line */
  798|    136|    if ('\r' == chr)
  ------------------
  |  Branch (798:9): [True: 4, False: 132]
  ------------------
  799|      4|    {
  800|      4|      if (p + 1 == c->read_buffer_offset)
  ------------------
  |  Branch (800:11): [True: 0, False: 4]
  ------------------
  801|      0|      {
  802|      0|        c->rq.hdrs.rq_line.proc_pos = p;
  803|      0|        return false; /* Not enough data yet */
  804|      0|      }
  805|      4|      else if ('\n' == read_buffer[p + 1])
  ------------------
  |  Branch (805:16): [True: 2, False: 2]
  ------------------
  806|      2|        end_of_line = true;
  807|      2|      else
  808|      2|      {
  809|       |        /* Bare CR alone */
  810|       |        /* Must be rejected or replaced with space char.
  811|       |           See RFC 9112, section 2.2 */
  812|      2|        if (bare_cr_as_sp)
  ------------------
  |  Branch (812:13): [True: 0, False: 2]
  ------------------
  813|      0|        {
  814|      0|          read_buffer[p] = ' ';
  815|      0|          c->rq.num_cr_sp_replaced++;
  816|      0|          continue; /* Re-start processing of the current character */
  817|      0|        }
  818|      2|        else if (!bare_cr_keep)
  ------------------
  |  Branch (818:18): [True: 2, False: 0]
  ------------------
  819|      2|        {
  820|       |          /* A quick simple check whether this line looks like an HTTP request */
  821|      2|          if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (821:15): [True: 2, False: 0]
  ------------------
  822|      2|              && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (822:18): [True: 0, False: 2]
  ------------------
  823|      0|          {
  824|      0|            mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
  825|      0|                                           MHD_HTTP_STATUS_BAD_REQUEST,
  826|      0|                                           ERR_RSP_BARE_CR_IN_HEADER);
  827|      0|          }
  828|      2|          else
  829|      2|            mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      2|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  830|      2|                              "Bare CR characters are not allowed " \
  831|      2|                              "in the request line.");
  832|       |
  833|      2|          return true; /* Error in the request */
  834|      2|        }
  835|      2|      }
  836|      4|    }
  837|    132|    else if ('\n' == chr)
  ------------------
  |  Branch (837:14): [True: 2, False: 130]
  ------------------
  838|      2|    {
  839|       |      /* Bare LF may be recognised as a line delimiter.
  840|       |         See RFC 9112, section 2.2 */
  841|      2|      if (bare_lf_as_crlf)
  ------------------
  |  Branch (841:11): [True: 0, False: 2]
  ------------------
  842|      0|        end_of_line = true;
  843|      2|      else
  844|      2|      {
  845|       |        /* While RFC does not enforce error for bare LF character,
  846|       |           if this char is not treated as a line delimiter, it should be
  847|       |           rejected to avoid any security weakness due to request smuggling. */
  848|       |        /* A quick simple check whether this line looks like an HTTP request */
  849|      2|        if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (849:13): [True: 2, False: 0]
  ------------------
  850|      2|            && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (850:16): [True: 1, False: 1]
  ------------------
  851|      1|        {
  852|      1|          mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      1|          respond_with_error_len ((c), (code), \
  |  |   86|      1|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      1|                                  0, NULL)
  ------------------
  853|      1|                                         MHD_HTTP_STATUS_BAD_REQUEST,
  854|      1|                                         ERR_RSP_BARE_LF_IN_HEADER);
  855|      1|        }
  856|      1|        else
  857|      1|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      1|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  858|      2|                            "Bare LF characters are not allowed " \
  859|      2|                            "in the request line.");
  860|      2|        return true; /* Error in the request */
  861|      2|      }
  862|      2|    }
  863|       |
  864|    132|    if (end_of_line)
  ------------------
  |  Branch (864:9): [True: 2, False: 130]
  ------------------
  865|      2|    {
  866|       |      /* Handle the end of the request line */
  867|       |
  868|      2|      if (NULL != c->rq.method.cstr)
  ------------------
  |  Branch (868:11): [True: 2, False: 0]
  ------------------
  869|      2|      {
  870|      2|        if (wsp_in_uri)
  ------------------
  |  Branch (870:13): [True: 2, False: 0]
  ------------------
  871|      2|        {
  872|       |          /* The end of the URI and the start of the HTTP version string
  873|       |             should be determined now. */
  874|      2|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  875|      2|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  876|      2|          if (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (876:15): [True: 2, False: 0]
  ------------------
  877|      2|          {
  878|       |            /* Determine the end and the length of the URI */
  879|      2|            if (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (879:17): [True: 2, False: 0]
  ------------------
  880|      2|            {
  881|      2|              read_buffer[c->rq.hdrs.rq_line.last_ws_start] = 0;  /* Zero terminate the URI */
  882|      2|              c->rq.req_target_len =
  883|      2|                c->rq.hdrs.rq_line.last_ws_start
  884|      2|                - (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer);
  885|      2|            }
  886|      0|            else if ((c->rq.hdrs.rq_line.last_ws_start + 1 <
  ------------------
  |  Branch (886:22): [True: 0, False: 0]
  ------------------
  887|      0|                      c->rq.hdrs.rq_line.last_ws_end)
  888|      0|                     && (HTTP_VER_LEN == (p - c->rq.hdrs.rq_line.last_ws_end)))
  ------------------
  |  |  480|      0|#define HTTP_VER_LEN (mhd_SSTR_LEN (MHD_HTTP_VERSION_1_1_STR))
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (888:25): [True: 0, False: 0]
  ------------------
  889|      0|            {
  890|       |              /* Found only HTTP method and HTTP version and more than one
  891|       |                 whitespace between them. Assume zero-length URI. */
  892|      0|              mhd_assert (wsp_blocks);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  893|      0|              c->rq.hdrs.rq_line.last_ws_start++;
  894|      0|              read_buffer[c->rq.hdrs.rq_line.last_ws_start] = 0; /* Zero terminate the URI */
  895|      0|              c->rq.hdrs.rq_line.rq_tgt =
  896|      0|                read_buffer + c->rq.hdrs.rq_line.last_ws_start;
  897|      0|              c->rq.req_target_len = 0;
  898|      0|              c->rq.hdrs.rq_line.num_ws_in_uri = 0;
  899|      0|              c->rq.hdrs.rq_line.rq_tgt_qmark = NULL;
  900|      0|            }
  901|       |            /* Determine the start of the HTTP version string */
  902|      2|            if (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (902:17): [True: 2, False: 0]
  ------------------
  903|      2|            {
  904|      2|              c->rq.version = read_buffer + c->rq.hdrs.rq_line.last_ws_end;
  905|      2|            }
  906|      2|          }
  907|      2|        }
  908|      0|        else
  909|      0|        {
  910|       |          /* The end of the URI and the start of the HTTP version string
  911|       |             should be already known. */
  912|      0|          if ((NULL == c->rq.version)
  ------------------
  |  Branch (912:15): [True: 0, False: 0]
  ------------------
  913|      0|              && (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (913:18): [True: 0, False: 0]
  ------------------
  914|      0|              && (HTTP_VER_LEN == p - (size_t)(c->rq.hdrs.rq_line.rq_tgt
  ------------------
  |  |  480|      0|#define HTTP_VER_LEN (mhd_SSTR_LEN (MHD_HTTP_VERSION_1_1_STR))
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (914:18): [True: 0, False: 0]
  ------------------
  915|      0|                                               - read_buffer))
  916|      0|              && (0 != read_buffer[(size_t)
  ------------------
  |  Branch (916:18): [True: 0, False: 0]
  ------------------
  917|      0|                                   (c->rq.hdrs.rq_line.rq_tgt
  918|      0|                                    - read_buffer) - 1]))
  919|      0|          {
  920|       |            /* Found only HTTP method and HTTP version and more than one
  921|       |               whitespace between them. Assume zero-length URI. */
  922|      0|            size_t uri_pos;
  923|      0|            mhd_assert (wsp_blocks);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  924|      0|            mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  925|      0|            uri_pos = (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer) - 1;
  926|      0|            mhd_assert (uri_pos < p);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  927|      0|            c->rq.version = c->rq.hdrs.rq_line.rq_tgt;
  928|      0|            read_buffer[uri_pos] = 0;  /* Zero terminate the URI */
  929|      0|            c->rq.hdrs.rq_line.rq_tgt = read_buffer + uri_pos;
  930|      0|            c->rq.req_target_len = 0;
  931|      0|            c->rq.hdrs.rq_line.num_ws_in_uri = 0;
  932|      0|            c->rq.hdrs.rq_line.rq_tgt_qmark = NULL;
  933|      0|          }
  934|      0|        }
  935|       |
  936|      2|        if (NULL != c->rq.version)
  ------------------
  |  Branch (936:13): [True: 2, False: 0]
  ------------------
  937|      2|        {
  938|      2|          mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  939|      2|          if (!process_http_version (c,
  ------------------
  |  Branch (939:15): [True: 1, False: 1]
  ------------------
  940|      2|                                     p - (size_t)(c->rq.version
  941|      2|                                                  - read_buffer),
  942|      2|                                     c->rq.version))
  943|      1|          {
  944|      1|            mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING < c->stage);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  945|      1|            return true; /* Unsupported / broken HTTP version */
  946|      1|          }
  947|      1|          read_buffer[p] = 0; /* Zero terminate the HTTP version strings */
  948|      1|          if ('\r' == chr)
  ------------------
  |  Branch (948:15): [True: 1, False: 0]
  ------------------
  949|      1|          {
  950|      1|            p++; /* Consume CR */
  951|      1|            mhd_assert (p < c->read_buffer_offset); /* The next character has been already checked */
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  952|      1|          }
  953|      1|          p++; /* Consume LF */
  954|      1|          c->read_buffer += p;
  955|      1|          c->read_buffer_size -= p;
  956|      1|          c->read_buffer_offset -= p;
  957|      1|          mhd_assert (c->rq.hdrs.rq_line.num_ws_in_uri <= \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  958|      1|                      c->rq.req_target_len);
  959|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  960|      1|                      || (0 != c->rq.req_target_len));
  961|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  962|      1|                      || ((size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark \
  963|      1|                                   - c->rq.hdrs.rq_line.rq_tgt) < \
  964|      1|                          c->rq.req_target_len));
  965|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  966|      1|                      || (c->rq.hdrs.rq_line.rq_tgt_qmark >= \
  967|      1|                          c->rq.hdrs.rq_line.rq_tgt));
  968|      1|          return true; /* The request line is successfully parsed */
  969|      2|        }
  970|      2|      }
  971|       |      /* Error in the request line */
  972|       |
  973|       |      /* A quick simple check whether this line looks like an HTTP request */
  974|      0|      if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (974:11): [True: 0, False: 0]
  ------------------
  975|      0|          && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (975:14): [True: 0, False: 0]
  ------------------
  976|      0|      {
  977|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
  978|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
  979|      0|                                       ERR_RSP_REQUEST_MALFORMED);
  980|      0|      }
  981|      0|      else
  982|      0|        mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  983|      0|                          "The request line is malformed.");
  984|       |
  985|      0|      return true;
  986|      2|    }
  987|       |
  988|       |    /* Process possible end of the previously found whitespace delimiter */
  989|    130|    if ((!wsp_blocks)
  ------------------
  |  Branch (989:9): [True: 130, False: 0]
  ------------------
  990|    130|        && (p == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (990:12): [True: 18, False: 112]
  ------------------
  991|     18|        && (0 != c->rq.hdrs.rq_line.last_ws_end))
  ------------------
  |  Branch (991:12): [True: 12, False: 6]
  ------------------
  992|     12|    {
  993|       |      /* Previous character was a whitespace char and whitespace blocks
  994|       |         are not allowed. */
  995|       |      /* The current position is the next character after
  996|       |         a whitespace delimiter */
  997|     12|      if (NULL == c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (997:11): [True: 6, False: 6]
  ------------------
  998|      6|      {
  999|       |        /* The current position is the start of the URI */
 1000|      6|        mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1001|      6|        mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1002|      6|        c->rq.hdrs.rq_line.rq_tgt = read_buffer + p;
 1003|       |        /* Reset the whitespace marker */
 1004|      6|        c->rq.hdrs.rq_line.last_ws_start = 0;
 1005|      6|        c->rq.hdrs.rq_line.last_ws_end = 0;
 1006|      6|      }
 1007|      6|      else
 1008|      6|      {
 1009|       |        /* It was a whitespace after the start of the URI */
 1010|      6|        if (!wsp_in_uri)
  ------------------
  |  Branch (1010:13): [True: 4, False: 2]
  ------------------
 1011|      4|        {
 1012|      4|          mhd_assert ((0 != c->rq.req_target_len) \
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1013|      4|                      || (c->rq.hdrs.rq_line.rq_tgt + 1 == read_buffer + p));
 1014|      4|          mhd_assert (NULL == c->rq.version); /* Too many whitespaces? This error is handled at whitespace start */
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1015|      4|          c->rq.version = read_buffer + p;
 1016|       |          /* Reset the whitespace marker */
 1017|      4|          c->rq.hdrs.rq_line.last_ws_start = 0;
 1018|      4|          c->rq.hdrs.rq_line.last_ws_end = 0;
 1019|      4|        }
 1020|      6|      }
 1021|     12|    }
 1022|       |
 1023|       |    /* Process the current character.
 1024|       |       Is it not the end of the line.  */
 1025|    130|    if ((' ' == chr)
  ------------------
  |  Branch (1025:9): [True: 12, False: 118]
  ------------------
 1026|    118|        || (('\t' == chr) && (tab_as_wsp))
  ------------------
  |  Branch (1026:13): [True: 0, False: 118]
  |  Branch (1026:30): [True: 0, False: 0]
  ------------------
 1027|    118|        || ((other_wsp_as_wsp) && ((0xb == chr) || (0xc == chr))))
  ------------------
  |  Branch (1027:13): [True: 0, False: 118]
  |  Branch (1027:36): [True: 0, False: 0]
  |  Branch (1027:52): [True: 0, False: 0]
  ------------------
 1028|     12|    {
 1029|       |      /* A whitespace character */
 1030|     12|      if ((0 == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1030:11): [True: 12, False: 0]
  ------------------
 1031|      0|          || (p != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1031:14): [True: 0, False: 0]
  ------------------
 1032|      0|          || (!wsp_blocks))
  ------------------
  |  Branch (1032:14): [True: 0, False: 0]
  ------------------
 1033|     12|      {
 1034|       |        /* Found first whitespace char of the new whitespace block */
 1035|     12|        if (NULL == c->rq.method.cstr)
  ------------------
  |  Branch (1035:13): [True: 6, False: 6]
  ------------------
 1036|      6|        {
 1037|       |          /* Found the end of the HTTP method string */
 1038|      6|          mhd_assert (0 == c->rq.hdrs.rq_line.last_ws_start);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1039|      6|          mhd_assert (0 == c->rq.hdrs.rq_line.last_ws_end);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1040|      6|          mhd_assert (NULL == c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1041|      6|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1042|      6|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1043|      6|          if (0 == p)
  ------------------
  |  Branch (1043:15): [True: 0, False: 6]
  ------------------
 1044|      0|          {
 1045|      0|            mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1046|      0|                              "The request line starts with a whitespace.");
 1047|      0|            return true; /* Error in the request */
 1048|      0|          }
 1049|      6|          read_buffer[p] = 0; /* Zero-terminate the request method string */
 1050|      6|          c->rq.method.cstr = read_buffer;
 1051|      6|          c->rq.method.len = p;
 1052|      6|          parse_http_std_method (c);
 1053|      6|        }
 1054|      6|        else
 1055|      6|        {
 1056|       |          /* A whitespace after the start of the URI */
 1057|      6|          if (!wsp_in_uri)
  ------------------
  |  Branch (1057:15): [True: 4, False: 2]
  ------------------
 1058|      4|          {
 1059|       |            /* Whitespace in URI is not allowed to be parsed */
 1060|      4|            if (NULL == c->rq.version)
  ------------------
  |  Branch (1060:17): [True: 4, False: 0]
  ------------------
 1061|      4|            {
 1062|      4|              mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1063|       |              /* This is a delimiter between URI and HTTP version string */
 1064|      4|              read_buffer[p] = 0; /* Zero-terminate request URI string */
 1065|      4|              mhd_assert (((size_t)(c->rq.hdrs.rq_line.rq_tgt   \
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1066|      4|                                    - read_buffer)) <= p);
 1067|      4|              c->rq.req_target_len =
 1068|      4|                p - (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer);
 1069|      4|            }
 1070|      0|            else
 1071|      0|            {
 1072|       |              /* This is a delimiter AFTER version string */
 1073|       |
 1074|       |              /* A quick simple check whether this line looks like an HTTP request */
 1075|      0|              if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (1075:19): [True: 0, False: 0]
  ------------------
 1076|      0|                  && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (1076:22): [True: 0, False: 0]
  ------------------
 1077|      0|              {
 1078|      0|                mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 1079|      0|                                               MHD_HTTP_STATUS_BAD_REQUEST,
 1080|      0|                                               ERR_RSP_RQ_LINE_TOO_MANY_WSP);
 1081|      0|              }
 1082|      0|              else
 1083|      0|                mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1084|      0|                                  "The request line has more than "
 1085|      0|                                  "two whitespaces.");
 1086|      0|              return true; /* Error in the request */
 1087|      0|            }
 1088|      4|          }
 1089|      2|          else
 1090|      2|          {
 1091|       |            /* Whitespace in URI is allowed to be parsed */
 1092|      2|            if (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1092:17): [True: 0, False: 2]
  ------------------
 1093|      0|            {
 1094|       |              /* The whitespace after the start of the URI has been found already */
 1095|      0|              c->rq.hdrs.rq_line.num_ws_in_uri +=
 1096|      0|                c->rq.hdrs.rq_line.last_ws_end
 1097|      0|                - c->rq.hdrs.rq_line.last_ws_start;
 1098|      0|            }
 1099|      2|          }
 1100|      6|        }
 1101|     12|        c->rq.hdrs.rq_line.last_ws_start = p;
 1102|     12|        c->rq.hdrs.rq_line.last_ws_end = p + 1; /* Will be updated on the next char parsing */
 1103|     12|      }
 1104|      0|      else
 1105|      0|      {
 1106|       |        /* Continuation of the whitespace block */
 1107|      0|        mhd_assert (0 != c->rq.hdrs.rq_line.last_ws_end);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1108|      0|        mhd_assert (0 != p);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1109|      0|        c->rq.hdrs.rq_line.last_ws_end = p + 1;
 1110|      0|      }
 1111|     12|    }
 1112|    118|    else
 1113|    118|    {
 1114|       |      /* Non-whitespace char, not the end of the line */
 1115|    118|      mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_end) \
  ------------------
  |  |   66|    118|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1116|    118|                  || (c->rq.hdrs.rq_line.last_ws_end == p) \
 1117|    118|                  || wsp_in_uri);
 1118|       |
 1119|    118|      if ((p == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1119:11): [True: 8, False: 110]
  ------------------
 1120|      8|          && (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1120:14): [True: 2, False: 6]
  ------------------
 1121|      2|          && (wsp_blocks))
  ------------------
  |  Branch (1121:14): [True: 0, False: 2]
  ------------------
 1122|      0|      {
 1123|       |        /* The end of the whitespace block */
 1124|      0|        if (NULL == c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (1124:13): [True: 0, False: 0]
  ------------------
 1125|      0|        {
 1126|       |          /* This is the first character of the URI */
 1127|      0|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1128|      0|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1129|      0|          c->rq.hdrs.rq_line.rq_tgt = read_buffer + p;
 1130|       |          /* Reset the whitespace marker */
 1131|      0|          c->rq.hdrs.rq_line.last_ws_start = 0;
 1132|      0|          c->rq.hdrs.rq_line.last_ws_end = 0;
 1133|      0|        }
 1134|      0|        else
 1135|      0|        {
 1136|      0|          if (!wsp_in_uri)
  ------------------
  |  Branch (1136:15): [True: 0, False: 0]
  ------------------
 1137|      0|          {
 1138|       |            /* This is the first character of the HTTP version */
 1139|      0|            mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1140|      0|            mhd_assert ((0 != c->rq.req_target_len) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1141|      0|                        || (c->rq.hdrs.rq_line.rq_tgt + 1 == read_buffer + p));
 1142|      0|            mhd_assert (NULL == c->rq.version); /* Handled at whitespace start */
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1143|      0|            c->rq.version = read_buffer + p;
 1144|       |            /* Reset the whitespace marker */
 1145|      0|            c->rq.hdrs.rq_line.last_ws_start = 0;
 1146|      0|            c->rq.hdrs.rq_line.last_ws_end = 0;
 1147|      0|          }
 1148|      0|        }
 1149|      0|      }
 1150|       |
 1151|       |      /* Handle other special characters */
 1152|    118|      if ('?' == chr)
  ------------------
  |  Branch (1152:11): [True: 1, False: 117]
  ------------------
 1153|      1|      {
 1154|      1|        if ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark)
  ------------------
  |  Branch (1154:13): [True: 1, False: 0]
  ------------------
 1155|      1|            && (NULL != c->rq.hdrs.rq_line.rq_tgt))
  ------------------
  |  Branch (1155:16): [True: 1, False: 0]
  ------------------
 1156|      1|        {
 1157|      1|          c->rq.hdrs.rq_line.rq_tgt_qmark = read_buffer + p;
 1158|      1|        }
 1159|      1|      }
 1160|    117|      else if ((0xb == chr) || (0xc == chr))
  ------------------
  |  Branch (1160:16): [True: 0, False: 117]
  |  Branch (1160:32): [True: 0, False: 117]
  ------------------
 1161|      0|      {
 1162|       |        /* VT or LF characters */
 1163|      0|        mhd_assert (!other_wsp_as_wsp);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1164|      0|        if ((NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (1164:13): [True: 0, False: 0]
  ------------------
 1165|      0|            && (NULL == c->rq.version)
  ------------------
  |  Branch (1165:16): [True: 0, False: 0]
  ------------------
 1166|      0|            && (wsp_in_uri))
  ------------------
  |  Branch (1166:16): [True: 0, False: 0]
  ------------------
 1167|      0|        {
 1168|      0|          c->rq.hdrs.rq_line.num_ws_in_uri++;
 1169|      0|        }
 1170|      0|        else
 1171|      0|        {
 1172|      0|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1173|      0|                            "Invalid character is in the request line.");
 1174|      0|          return true; /* Error in the request */
 1175|      0|        }
 1176|      0|      }
 1177|    117|      else if (0 == chr)
  ------------------
  |  Branch (1177:16): [True: 0, False: 117]
  ------------------
 1178|      0|      {
 1179|       |        /* NUL character */
 1180|      0|        mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  354|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1181|      0|                          "The NUL character is in the request line.");
 1182|      0|        return true; /* Error in the request */
 1183|      0|      }
 1184|    118|    }
 1185|       |
 1186|    130|    p++;
 1187|    130|  }
 1188|       |
 1189|      0|  c->rq.hdrs.rq_line.proc_pos = p;
 1190|      0|  return false; /* Not enough data yet */
 1191|      6|}
stream_process_request.c:_ZL20process_http_versionP14MHD_ConnectionmPKc:
  585|      2|{
  586|      2|  enum mhd_HTTP_ProtVerParse h_ver;
  587|       |
  588|      2|  h_ver = parse_http_version (len,
  589|      2|                              http_string);
  590|      2|  if (mhd_HTTP_VER_0X == h_ver)
  ------------------
  |  Branch (590:7): [True: 0, False: 2]
  ------------------
  591|      0|  {
  592|      0|    connection->rq.http_ver = MHD_HTTP_VERSION_INVALID;
  593|      0|    mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
  594|      0|                                   MHD_HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
  595|      0|                                   ERR_RSP_REQ_HTTP_VER_IS_TOO_OLD);
  596|      0|    return false;
  597|      0|  }
  598|       |
  599|      2|  connection->rq.http_ver = (enum MHD_HTTP_ProtocolVersion)h_ver;
  600|       |
  601|      2|  switch (connection->rq.http_ver)
  602|      2|  {
  603|      1|  case MHD_HTTP_VERSION_INVALID:
  ------------------
  |  Branch (603:3): [True: 1, False: 1]
  ------------------
  604|      1|    break;
  605|      1|  case MHD_HTTP_VERSION_1_1:
  ------------------
  |  Branch (605:3): [True: 1, False: 1]
  ------------------
  606|      1|  case MHD_HTTP_VERSION_1_0:
  ------------------
  |  Branch (606:3): [True: 0, False: 2]
  ------------------
  607|      1|    return true;
  608|      0|  case MHD_HTTP_VERSION_1_2P:
  ------------------
  |  Branch (608:3): [True: 0, False: 2]
  ------------------
  609|      0|    if (MHD_PSL_VERY_STRICT > connection->daemon->req_cfg.strictness)
  ------------------
  |  Branch (609:9): [True: 0, False: 0]
  ------------------
  610|      0|      return true;
  611|      0|    break;
  612|      0|  case MHD_HTTP_VERSION_2:
  ------------------
  |  Branch (612:3): [True: 0, False: 2]
  ------------------
  613|      0|    mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
  614|      0|                                   MHD_HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
  615|      0|                                   ERR_RSP_REQ_HTTP_VER_IS_NOT_SUPPORTED);
  616|      0|    return false;
  617|      0|  case MHD_HTTP_VERSION_3:
  ------------------
  |  Branch (617:3): [True: 0, False: 2]
  ------------------
  618|      0|  case MHD_HTTP_VERSION_FUTURE:
  ------------------
  |  Branch (618:3): [True: 0, False: 2]
  ------------------
  619|      0|  default:
  ------------------
  |  Branch (619:3): [True: 0, False: 2]
  ------------------
  620|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  621|      0|    break;
  622|      2|  }
  623|       |
  624|      1|  mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   85|      1|          respond_with_error_len ((c), (code), \
  |  |   86|      1|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      1|                                  0, NULL)
  ------------------
  625|      1|                                 MHD_HTTP_STATUS_BAD_REQUEST,
  626|      1|                                 ERR_RSP_REQUEST_MALFORMED);
  627|      1|  return false;
  628|      2|}
stream_process_request.c:_ZL18parse_http_versionmPKc:
  535|      2|{
  536|      2|  const char *const h = http_string; /**< short alias */
  537|      2|  mhd_assert (NULL != http_string);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  538|       |
  539|       |  /* String must start with 'HTTP/d.d', case-sensitive match.
  540|       |   * See https://www.rfc-editor.org/rfc/rfc9112#name-http-version */
  541|      2|  if ((HTTP_VER_LEN == len)
  ------------------
  |  |  480|      2|#define HTTP_VER_LEN (mhd_SSTR_LEN (MHD_HTTP_VERSION_1_1_STR))
  |  |  ------------------
  |  |  |  |   54|      2|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (541:7): [True: 2, False: 0]
  ------------------
  542|      2|      && (0 == memcmp ("HTTP/", h, 5u))
  ------------------
  |  Branch (542:10): [True: 1, False: 1]
  ------------------
  543|      1|      && ('.' == h[6]))
  ------------------
  |  Branch (543:10): [True: 1, False: 0]
  ------------------
  544|      1|  {
  545|      1|    const unsigned char mj = (unsigned char)(h[5] - '0');  /**< Major number */
  546|      1|    const unsigned char mn = (unsigned char)(h[7] - '0');  /**< Minor number */
  547|       |
  548|      1|    if (1u == mj)
  ------------------
  |  Branch (548:9): [True: 1, False: 0]
  ------------------
  549|      1|    {
  550|       |      /* HTTP/1.x */
  551|      1|      if (1u == mn)
  ------------------
  |  Branch (551:11): [True: 1, False: 0]
  ------------------
  552|      1|        return mhd_HTTP_VER_1_1;
  553|      0|      if (0u == mn)
  ------------------
  |  Branch (553:11): [True: 0, False: 0]
  ------------------
  554|      0|        return mhd_HTTP_VER_1_0;
  555|      0|      if (9u >= mn)
  ------------------
  |  Branch (555:11): [True: 0, False: 0]
  ------------------
  556|      0|        return mhd_HTTP_VER_1_2P;
  557|       |
  558|      0|      return mhd_HTTP_VER_INVALID;
  559|      0|    }
  560|       |
  561|      0|    if ((0u == mj) && (9u >= mn))
  ------------------
  |  Branch (561:9): [True: 0, False: 0]
  |  Branch (561:23): [True: 0, False: 0]
  ------------------
  562|      0|      return mhd_HTTP_VER_0X; /* Too old major version */
  563|       |
  564|      0|    if ((2u == mj) && (0u == mn))
  ------------------
  |  Branch (564:9): [True: 0, False: 0]
  |  Branch (564:23): [True: 0, False: 0]
  ------------------
  565|      0|      return mhd_HTTP_VER_2;
  566|      0|  }
  567|       |
  568|      1|  return mhd_HTTP_VER_INVALID;
  569|      2|}
stream_process_request.c:_ZL21parse_http_std_methodP14MHD_Connection:
  490|      6|{
  491|      6|  const char *const restrict m = connection->rq.method.cstr; /**< short alias */
  492|      6|  const size_t len =  connection->rq.method.len; /**< short alias */
  493|      6|  mhd_assert (NULL != m);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  494|      6|  mhd_assert (0 != len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  495|      6|  mhd_assert (0 == m[len]);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  496|       |
  497|      6|  connection->rq.http_mthd = mhd_parse_http_method (len,
  498|      6|                                                    m);
  499|      6|}
stream_process_request.c:_ZL22process_request_targetP14MHD_Connection:
 1303|      1|{
 1304|      1|  size_t params_len;
 1305|       |
 1306|      1|  mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1307|      1|  mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1308|      1|  mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1309|      1|  mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1310|      1|  mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1311|      1|              || (c->rq.hdrs.rq_line.rq_tgt <=
 1312|      1|                  c->rq.hdrs.rq_line.rq_tgt_qmark));
 1313|      1|  mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1314|      1|              || (c->rq.req_target_len > \
 1315|      1|                  (size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark \
 1316|      1|                           - c->rq.hdrs.rq_line.rq_tgt)));
 1317|       |
 1318|       |  /* Log callback before the request-target is modified/decoded */
 1319|      1|  if (NULL != c->daemon->req_cfg.uri_cb.cb)
  ------------------
  |  Branch (1319:7): [True: 0, False: 1]
  ------------------
 1320|      0|  {
 1321|      0|    struct MHD_EarlyUriCbData req_data;
 1322|      0|    req_data.request = &(c->rq);
 1323|      0|    req_data.full_uri.cstr = c->rq.hdrs.rq_line.rq_tgt;
 1324|      0|    req_data.full_uri.len = c->rq.req_target_len;
 1325|      0|    c->rq.app_aware = true;
 1326|      0|    c->daemon->req_cfg.uri_cb.cb (c->daemon->req_cfg.uri_cb.cls,
 1327|      0|                                  &req_data,
 1328|      0|                                  &(c->rq.app_context));
 1329|      0|  }
 1330|       |
 1331|      1|  if (NULL != c->rq.hdrs.rq_line.rq_tgt_qmark)
  ------------------
  |  Branch (1331:7): [True: 1, False: 0]
  ------------------
 1332|      1|  {
 1333|      1|    params_len =
 1334|      1|      c->rq.req_target_len
 1335|      1|      - (size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark - c->rq.hdrs.rq_line.rq_tgt);
 1336|       |
 1337|      1|    mhd_assert (1 <= params_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1338|       |
 1339|      1|    c->rq.hdrs.rq_line.rq_tgt_qmark[0] = 0; /* Replace '?' with zero termination */
 1340|       |
 1341|       |    // TODO: support detection of decoding errors
 1342|      1|    if (!mhd_parse_uri_args (params_len - 1,
  ------------------
  |  Branch (1342:9): [True: 0, False: 1]
  ------------------
 1343|      1|                             c->rq.hdrs.rq_line.rq_tgt_qmark + 1,
 1344|      1|                             &request_add_get_arg,
 1345|      1|                             &(c->h1_stream)))
 1346|      0|    {
 1347|      0|      mhd_LOG_MSG (c->daemon, MHD_SC_CONNECTION_POOL_NO_MEM_GET_PARAM,
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 1348|      0|                   "Not enough memory in the pool to store GET parameter");
 1349|       |
 1350|      0|      mhd_RESPOND_WITH_ERROR_STATIC (
  ------------------
  |  |   85|      0|          respond_with_error_len ((c), (code), \
  |  |   86|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   87|      0|                                  0, NULL)
  ------------------
 1351|      0|        c,
 1352|      0|        mhd_stream_get_no_space_err_status_code (c,
 1353|      0|                                                 MHD_PROC_RECV_URI,
 1354|      0|                                                 0,
 1355|      0|                                                 NULL),
 1356|      0|        ERR_RSP_MSG_REQUEST_TOO_BIG);
 1357|      0|      mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING != c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1358|      0|      return false;
 1359|       |
 1360|      0|    }
 1361|      1|  }
 1362|      0|  else
 1363|      0|    params_len = 0;
 1364|       |
 1365|      1|  mhd_assert (strlen (c->rq.hdrs.rq_line.rq_tgt) == \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1366|      1|              c->rq.req_target_len - params_len);
 1367|       |
 1368|       |  /* Finally unescape URI itself */
 1369|       |  // TODO: support detection of decoding errors
 1370|      1|  c->rq.url_len =
 1371|      1|    mhd_str_pct_decode_lenient_n (c->rq.hdrs.rq_line.rq_tgt,
 1372|      1|                                  c->rq.req_target_len - params_len,
 1373|      1|                                  c->rq.hdrs.rq_line.rq_tgt,
 1374|      1|                                  c->rq.req_target_len - params_len,
 1375|      1|                                  NULL);
 1376|      1|  c->rq.url = c->rq.hdrs.rq_line.rq_tgt;
 1377|       |
 1378|      1|  return true;
 1379|      1|}
stream_process_request.c:_ZL19request_add_get_argPvPK10MHD_StringPK18MHD_StringNullable:
 1206|      1|{
 1207|      1|  struct MHD_Stream *s = (struct MHD_Stream *)cls;
 1208|       |
 1209|      1|  return mhd_stream_add_field_nullable (s, MHD_VK_URI_QUERY_PARAM, name, value);
 1210|      1|}

_Z32mhd_conn_event_loop_state_updateP14MHD_Connection:
   91|      4|{
   92|      4|#ifdef MHD_SUPPORT_HTTPS
   93|      4|  mhd_assert (!mhd_C_HAS_TLS (c) \
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   94|      4|              || (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state));
   95|      4|  mhd_assert (mhd_C_HAS_TLS (c) \
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   96|      4|              || (mhd_CONN_STATE_TCP_CONNECTED == c->conn_state));
   97|      4|#endif /* MHD_SUPPORT_HTTPS */
   98|       |
   99|      4|#ifdef MHD_SUPPORT_HTTP2
  100|      4|  if (mhd_C_IS_HTTP2 (c))
  ------------------
  |  |  913|      4|          (mhd_HTTP_VER_FAM_2 == c->h_layer.fam)
  |  |  ------------------
  |  |  |  Branch (913:11): [True: 0, False: 4]
  |  |  ------------------
  ------------------
  101|      0|  {
  102|      0|    mhd_h2_conn_state_update (c);
  103|      0|    return;
  104|      0|  }
  105|      4|#endif /* MHD_SUPPORT_HTTP2 */
  106|       |
  107|      4|  switch (c->stage)
  108|      4|  {
  109|      0|  case mhd_HTTP_STAGE_INIT:
  ------------------
  |  Branch (109:3): [True: 0, False: 4]
  ------------------
  110|      0|  case mhd_HTTP_STAGE_REQ_LINE_RECEIVING:
  ------------------
  |  Branch (110:3): [True: 0, False: 4]
  ------------------
  111|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  112|      0|    break;
  113|      0|  case mhd_HTTP_STAGE_REQ_LINE_RECEIVED:
  ------------------
  |  Branch (113:3): [True: 0, False: 4]
  ------------------
  114|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  115|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  116|      0|    break;
  117|      0|  case mhd_HTTP_STAGE_REQ_HEADERS_RECEIVING:
  ------------------
  |  Branch (117:3): [True: 0, False: 4]
  ------------------
  118|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  119|      0|    break;
  120|      0|  case mhd_HTTP_STAGE_HEADERS_RECEIVED:
  ------------------
  |  Branch (120:3): [True: 0, False: 4]
  ------------------
  121|      0|  case mhd_HTTP_STAGE_HEADERS_PROCESSED:
  ------------------
  |  Branch (121:3): [True: 0, False: 4]
  ------------------
  122|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  123|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  124|      0|    break;
  125|      0|  case mhd_HTTP_STAGE_CONTINUE_SENDING:
  ------------------
  |  Branch (125:3): [True: 0, False: 4]
  ------------------
  126|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  127|      0|    break;
  128|      0|  case mhd_HTTP_STAGE_BODY_RECEIVING:
  ------------------
  |  Branch (128:3): [True: 0, False: 4]
  ------------------
  129|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  130|      0|    break;
  131|      0|  case mhd_HTTP_STAGE_BODY_RECEIVED:
  ------------------
  |  Branch (131:3): [True: 0, False: 4]
  ------------------
  132|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  133|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  134|      0|    break;
  135|      0|  case mhd_HTTP_STAGE_FOOTERS_RECEIVING:
  ------------------
  |  Branch (135:3): [True: 0, False: 4]
  ------------------
  136|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  137|      0|    break;
  138|      0|  case mhd_HTTP_STAGE_FOOTERS_RECEIVED:
  ------------------
  |  Branch (138:3): [True: 0, False: 4]
  ------------------
  139|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  140|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  141|      0|    break;
  142|      4|  case mhd_HTTP_STAGE_FULL_REQ_RECEIVED:
  ------------------
  |  Branch (142:3): [True: 4, False: 0]
  ------------------
  143|      4|    mhd_assert (0 && "Should not be possible");
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  144|      4|    c->event_loop_info = MHD_EVENT_LOOP_INFO_PROCESS;
  145|      4|    break;
  146|      0|  case mhd_HTTP_STAGE_REQ_RECV_FINISHED:
  ------------------
  |  Branch (146:3): [True: 0, False: 4]
  ------------------
  147|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  148|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  149|      0|    break;
  150|      0|  case mhd_HTTP_STAGE_START_REPLY:
  ------------------
  |  Branch (150:3): [True: 0, False: 4]
  ------------------
  151|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  152|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  153|      0|    break;
  154|      0|  case mhd_HTTP_STAGE_HEADERS_SENDING:
  ------------------
  |  Branch (154:3): [True: 0, False: 4]
  ------------------
  155|       |    /* headers in buffer, keep writing */
  156|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  157|      0|    break;
  158|      0|  case mhd_HTTP_STAGE_HEADERS_SENT:
  ------------------
  |  Branch (158:3): [True: 0, False: 4]
  ------------------
  159|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  160|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  161|      0|    break;
  162|      0|#ifdef MHD_SUPPORT_UPGRADE
  163|      0|  case mhd_HTTP_STAGE_UPGRADE_HEADERS_SENDING:
  ------------------
  |  Branch (163:3): [True: 0, False: 4]
  ------------------
  164|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  165|      0|    break;
  166|      0|#endif /* MHD_SUPPORT_UPGRADE */
  167|      0|  case mhd_HTTP_STAGE_UNCHUNKED_BODY_UNREADY:
  ------------------
  |  Branch (167:3): [True: 0, False: 4]
  ------------------
  168|      0|    mhd_assert (0 && "Should not be possible");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  169|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_PROCESS;
  170|      0|    break;
  171|      0|  case mhd_HTTP_STAGE_UNCHUNKED_BODY_READY:
  ------------------
  |  Branch (171:3): [True: 0, False: 4]
  ------------------
  172|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  173|      0|    break;
  174|      0|  case mhd_HTTP_STAGE_CHUNKED_BODY_UNREADY:
  ------------------
  |  Branch (174:3): [True: 0, False: 4]
  ------------------
  175|      0|    mhd_assert (0 && "Should not be possible");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  176|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_PROCESS;
  177|      0|    break;
  178|      0|  case mhd_HTTP_STAGE_CHUNKED_BODY_READY:
  ------------------
  |  Branch (178:3): [True: 0, False: 4]
  ------------------
  179|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  180|      0|    break;
  181|      0|  case mhd_HTTP_STAGE_CHUNKED_BODY_SENT:
  ------------------
  |  Branch (181:3): [True: 0, False: 4]
  ------------------
  182|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  183|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  184|      0|    break;
  185|      0|  case mhd_HTTP_STAGE_FOOTERS_SENDING:
  ------------------
  |  Branch (185:3): [True: 0, False: 4]
  ------------------
  186|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  187|      0|    break;
  188|      0|  case mhd_HTTP_STAGE_FULL_REPLY_SENT:
  ------------------
  |  Branch (188:3): [True: 0, False: 4]
  ------------------
  189|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  190|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  191|      0|    break;
  192|      0|#ifdef MHD_SUPPORT_UPGRADE
  193|      0|  case mhd_HTTP_STAGE_UPGRADING:
  ------------------
  |  Branch (193:3): [True: 0, False: 4]
  ------------------
  194|      0|    mhd_assert (0 && "Impossible value");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  195|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  196|      0|    break;
  197|      0|  case mhd_HTTP_STAGE_UPGRADED:
  ------------------
  |  Branch (197:3): [True: 0, False: 4]
  ------------------
  198|      0|    mhd_assert (0 && "Should not be possible");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  199|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_UPGRADED;
  200|      0|    break;
  201|      0|  case mhd_HTTP_STAGE_UPGRADED_CLEANING:
  ------------------
  |  Branch (201:3): [True: 0, False: 4]
  ------------------
  202|      0|    mhd_assert (0 && "Should be unreachable");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  203|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  204|      0|    break;
  205|      0|#endif /* MHD_SUPPORT_UPGRADE */
  206|      0|  case mhd_HTTP_STAGE_PRE_CLOSING:
  ------------------
  |  Branch (206:3): [True: 0, False: 4]
  ------------------
  207|      0|    mhd_assert (0 && "Should be unreachable");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  208|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  209|      0|    break;
  210|      0|  case mhd_HTTP_STAGE_CLOSED:
  ------------------
  |  Branch (210:3): [True: 0, False: 4]
  ------------------
  211|      0|    mhd_assert (0 && "Should be unreachable");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  212|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  213|      0|    break;
  214|      0|  default:
  ------------------
  |  Branch (214:3): [True: 0, False: 4]
  ------------------
  215|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1110|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  216|      0|    break;
  217|      4|  }
  218|      4|}

