_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: 2, False: 4]
  ------------------
  169|      2|    const size_t clamp = fdp.ConsumeIntegralInRange<size_t>(64, 512);
  170|      2|    if (d.req_cfg.large_buf.space_left > clamp)
  ------------------
  |  Branch (170:9): [True: 2, False: 0]
  ------------------
  171|      2|      d.req_cfg.large_buf.space_left = clamp;
  172|      2|  }
  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: 4, False: 2]
  ------------------
  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: 3, False: 3]
  |  Branch (205:38): [True: 2, False: 1]
  ------------------
  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|      8|  for (int i = 0; i < host_count; ++i) {
  ------------------
  |  Branch (226:19): [True: 2, False: 6]
  ------------------
  227|      2|    if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (227:9): [True: 1, False: 1]
  ------------------
  228|      1|      hdrs += " Host: fuzz" + std::to_string(i) + EOL();
  229|      1|    } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (229:16): [True: 0, False: 1]
  ------------------
  230|      0|      hdrs += "Host : fuzz" + std::to_string(i) + EOL();
  231|      1|    } else {
  232|      1|      hdrs += "Host: fuzz" + std::to_string(i) + EOL();
  233|      1|    }
  234|      2|  }
  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: 1, False: 5]
  ------------------
  241|      1|    hdrs += "Transfer-Encoding: " + te_val + EOL();
  242|      1|  }
  243|      6|  if (add_cl) {
  ------------------
  |  Branch (243:7): [True: 1, False: 5]
  ------------------
  244|      1|    std::string cl;
  245|      1|    switch (fdp.ConsumeIntegralInRange<int>(0,3)) {
  246|      0|      case 0: cl = "0"; break;
  ------------------
  |  Branch (246:7): [True: 0, False: 1]
  ------------------
  247|      0|      case 1: cl = std::to_string(fdp.ConsumeIntegralInRange<uint32_t>(0, 1<<20));
  ------------------
  |  Branch (247:7): [True: 0, False: 1]
  ------------------
  248|      0|              break;
  249|      0|      case 2: cl = "18446744073709551616"; break;
  ------------------
  |  Branch (249:7): [True: 0, False: 1]
  ------------------
  250|      1|      default: cl = "xyz"; break;
  ------------------
  |  Branch (250:7): [True: 1, False: 0]
  ------------------
  251|      1|    }
  252|      1|    hdrs += "Content-Length: " + cl + EOL();
  253|      1|  }
  254|       |
  255|       |  // Random minimum headers
  256|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (256:7): [True: 3, False: 3]
  ------------------
  257|      3|    hdrs += (fdp.ConsumeBool() ? "Expect: 100-continue" : "Expect: something-weird") + EOL();
  ------------------
  |  Branch (257:14): [True: 1, False: 2]
  ------------------
  258|      3|  }
  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|      2|    case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (269:5): [True: 2, False: 4]
  ------------------
  270|      2|      hdrs += "Content-Type: text/plain" + EOL();
  271|      2|      break;
  272|      4|    default: case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (272:5): [True: 0, False: 6]
  |  Branch (272:14): [True: 4, False: 2]
  ------------------
  273|      4|      detect_mpart = fdp.ConsumeBool();
  274|      4|      if (detect_mpart) {
  ------------------
  |  Branch (274:11): [True: 1, False: 3]
  ------------------
  275|      1|        g_mpart_boundary = "fuzz" + std::to_string(fdp.ConsumeIntegral<uint32_t>());
  276|      1|        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|      4|      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: 1, False: 5]
  ------------------
  290|      1|    const uint32_t cl = fdp.ConsumeIntegralInRange<uint32_t>(0, 256);
  291|      1|    hdrs += "Content-Length: " + std::to_string(cl) + EOL();
  292|      1|  }
  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: 1, False: 1]
  ------------------
  295|      1|      hdrs += "Trailer: X-Fuzz-Trace" + EOL();
  296|      1|    else
  297|      1|      hdrs += "Trailer: X-One, X-Two" + EOL();
  298|      2|  }
  299|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (299:7): [True: 2, False: 4]
  ------------------
  300|      2|    hdrs += (fdp.ConsumeBool() ? "Expect: 100-continue" : "Expect: something-weird") + EOL();
  ------------------
  |  Branch (300:14): [True: 2, False: 0]
  ------------------
  301|      2|  }
  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: 3, False: 3]
  ------------------
  322|      3|    c.rq.app_act.head_act.act = mhd_ACTION_POST_PARSE;
  323|      3|  } else {
  324|      3|    c.rq.app_act.head_act.act = mhd_ACTION_NO_ACTION;
  325|      3|  }
  326|      6|  if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (326:7): [True: 2, False: 4]
  ------------------
  327|      2|    enc = MHD_HTTP_POST_ENCODING_TEXT_PLAIN;
  328|      4|  } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (328:14): [True: 0, False: 4]
  ------------------
  329|      0|    enc = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
  330|      4|  } else if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (330:14): [True: 0, False: 4]
  ------------------
  331|      0|    enc = MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA;
  332|      4|  } else {
  333|      4|    enc = MHD_HTTP_POST_ENCODING_OTHER;
  334|      4|  }
  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|      1|    case 3: return "HTTP/0.9";
  ------------------
  |  Branch (85:5): [True: 1, False: 5]
  ------------------
   86|      3|    case 4: return "HTTX/1.1";
  ------------------
  |  Branch (86:5): [True: 3, False: 3]
  ------------------
   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|     47|  auto EOL = [&](bool final=false) {
  207|     47|    if (bare_lf) {
  ------------------
  |  Branch (207:9): [True: 28, False: 19]
  ------------------
  208|     28|      return std::string("\n");
  209|     28|    }
  210|     19|    if (bare_cr) {
  ------------------
  |  Branch (210:9): [True: 14, False: 5]
  ------------------
  211|     14|      return std::string("\r");
  212|     14|    }
  213|       |
  214|      5|    return std::string("\r\n");
  215|     19|  };
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|      2|      case 1: {
  ------------------
  |  Branch (83:7): [True: 2, False: 11]
  ------------------
   84|      2|        if (connection.rq.app_act.head_act.act == mhd_ACTION_NO_ACTION &&
  ------------------
  |  Branch (84:13): [True: 0, False: 2]
  ------------------
   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|      2|        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|      5|      default: case 3: {
  ------------------
  |  Branch (98:7): [True: 5, False: 8]
  |  Branch (98:16): [True: 0, False: 13]
  ------------------
   99|      5|        mhd_conn_tls_check(&connection);
  100|      5|        break;
  101|      5|      }
  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))
  ------------------
  |  | 1497|      3|          (mhd_WM_INT_INTERNAL_EVENTS_THREAD_PER_CONNECTION == \
  |  |  ------------------
  |  |  |  Branch (1497:11): [True: 0, False: 3]
  |  |  ------------------
  |  | 1498|      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);             \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  217|      3|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  218|      3|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|      3|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|      3|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  221|      3|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      3|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      3|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      3|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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);       \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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);      \
  |  |  ------------------
  |  |  |  |   68|      3|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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);             \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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);       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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); \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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);      \
  |  |  ------------------
  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  ------------------
  |  |  |  |  |  |  879|      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|      5|{
   68|      5|  mhd_assert (mhd_C_HAS_TLS (c));
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   69|      5|  mhd_assert (mhd_D_HAS_TLS (c->daemon));
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   70|      5|  mhd_assert ((mhd_CONN_STATE_TLS_HANDSHAKE_RECV == c->conn_state) \
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   71|      5|              || (mhd_CONN_STATE_TLS_HANDSHAKE_SEND == c->conn_state) \
   72|      5|              || (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state));
   73|       |
   74|      5|  if (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state)
  ------------------
  |  Branch (74:7): [True: 0, False: 5]
  ------------------
   75|      0|    return mhd_COMM_LAYER_OK; /* TLS is already connected */
   76|       |
   77|      5|  if (0 != (mhd_SOCKET_NET_STATE_ERROR_READY & c->sk.ready))
  ------------------
  |  Branch (77:7): [True: 0, False: 5]
  ------------------
   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);
  ------------------
  |  |  375|      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|      5|  if (0 == (((mhd_CONN_FLAG_RECV | mhd_CONN_FLAG_SEND)
  ------------------
  |  |  111|      5|#define mhd_CONN_FLAG_RECV      (1u << 0)
  ------------------
                if (0 == (((mhd_CONN_FLAG_RECV | mhd_CONN_FLAG_SEND)
  ------------------
  |  |  112|      5|#define mhd_CONN_FLAG_SEND      (1u << 1)
  ------------------
  |  Branch (86:7): [True: 5, False: 0]
  ------------------
   87|      5|             & ((unsigned int)c->conn_state)
   88|      5|             & ((unsigned int)c->sk.ready))))
   89|      5|    return mhd_COMM_LAYER_PROCESSING;
   90|       |
   91|      0|  switch (mhd_tls_conn_handshake (c->tls))
  ------------------
  |  |  166|      0|        mhd_TLS_FUNC (_conn_handshake)((c_tls))
  |  |  ------------------
  |  |  |  |  260|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      0|#define mhd_MACRO_CONCAT3(a, b, c)         mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|      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|    if (mhd_tls_conn_has_data_in (c->tls))
  ------------------
  |  |  202|      0|        mhd_TLS_FUNC (_conn_has_data_in)((c_tls))
  |  |  ------------------
  |  |  |  |  260|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      0|#define mhd_MACRO_CONCAT3(a, b, c)         mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|      0|#define mhd_MACRO_CONCAT3_(a, b, c)        a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (202:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  107|      0|      c->tls_has_data_in = mhd_TLS_BUF_HAS_DATA_IN;
  108|       |    /* TLS is connected now, set event loop state based on HTTP protocol.
  109|       |       Some early application-level data could be processing in this round. */
  110|      0|    mhd_conn_event_loop_state_update (c);
  111|       |
  112|      0|    return mhd_COMM_LAYER_OK;
  113|      0|    break;
  114|      0|  case mhd_TLS_PROCED_RECV_MORE_NEEDED:
  ------------------
  |  Branch (114:3): [True: 0, False: 0]
  ------------------
  115|      0|    c->sk.ready = (enum mhd_SocketNetState) /* Clear 'recv-ready' */
  116|      0|                  (((unsigned int)c->sk.ready)
  117|      0|                   & (~(enum mhd_SocketNetState)
  118|      0|                      mhd_SOCKET_NET_STATE_RECV_READY));
  119|      0|    mhd_FALLTHROUGH;
  ------------------
  |  | 1270|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
  120|       |  /* Intentional fallthrough */
  121|      0|  case mhd_TLS_PROCED_RECV_INTERRUPTED:
  ------------------
  |  Branch (121:3): [True: 0, False: 0]
  ------------------
  122|      0|    c->conn_state = mhd_CONN_STATE_TLS_HANDSHAKE_RECV;
  123|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_RECV;
  124|      0|    break;
  125|      0|  case mhd_TLS_PROCED_SEND_MORE_NEEDED:
  ------------------
  |  Branch (125:3): [True: 0, False: 0]
  ------------------
  126|      0|    c->sk.ready = (enum mhd_SocketNetState) /* Clear 'send-ready' */
  127|      0|                  (((unsigned int)c->sk.ready)
  128|      0|                   & (~(enum mhd_SocketNetState)
  129|      0|                      mhd_SOCKET_NET_STATE_SEND_READY));
  130|      0|    mhd_FALLTHROUGH;
  ------------------
  |  | 1270|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
  131|       |  /* Intentional fallthrough */
  132|      0|  case mhd_TLS_PROCED_SEND_INTERRUPTED:
  ------------------
  |  Branch (132:3): [True: 0, False: 0]
  ------------------
  133|      0|    c->conn_state = mhd_CONN_STATE_TLS_HANDSHAKE_SEND;
  134|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_SEND;
  135|      0|    break;
  136|      0|  case mhd_TLS_PROCED_FAILED:
  ------------------
  |  Branch (136:3): [True: 0, False: 0]
  ------------------
  137|      0|    c->conn_state = mhd_CONN_STATE_TLS_FAILED;
  138|      0|    mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      0|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  139|      0|                 MHD_SC_TLS_CONNECTION_HANDSHAKED_FAILED, \
  140|      0|                 "Failed to perform TLS handshake on the new connection");
  141|      0|    c->sk.state.discnt_err = mhd_SOCKET_ERR_TLS;
  142|      0|    mhd_conn_start_closing_skt_err (c);
  ------------------
  |  |  375|      0|        mhd_conn_start_closing ((c), mhd_CONN_CLOSE_SOCKET_ERR, NULL)
  ------------------
  143|      0|    return mhd_COMM_LAYER_BROKEN;
  144|      0|    break;
  145|      0|  default:
  ------------------
  |  Branch (145:3): [True: 0, False: 0]
  ------------------
  146|      0|    mhd_assert (0 && "Should be unreachable");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  147|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  148|      0|    return mhd_COMM_LAYER_BROKEN;
  149|      0|  }
  150|       |
  151|      0|  mhd_conn_mark_ready_update (c);
  152|      0|  return mhd_COMM_LAYER_PROCESSING;
  153|      0|}

_Z28mhd_daemon_get_master_daemonP10MHD_Daemon:
   63|      4|{
   64|      4|#ifdef MHD_SUPPORT_THREADS
   65|      4|  if (mhd_D_HAS_MASTER (d))
  ------------------
  |  | 1511|      4|#define mhd_D_HAS_MASTER(d) mhd_D_TYPE_HAS_MASTER_DAEMON ((d)->threading.d_type)
  |  |  ------------------
  |  |  |  |  983|      4|          (mhd_DAEMON_TYPE_WORKER == (t))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (983:11): [True: 0, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|      0|    return d->threading.hier.master;
   67|      4|#endif /* MHD_SUPPORT_THREADS */
   68|      4|  return d;
   69|      4|}
_Z23mhd_daemon_reclaim_lbufP10MHD_Daemonm:
  144|      2|{
  145|      2|  struct MHD_Daemon *const masterd = mhd_daemon_get_master_daemon (d);
  146|      2|  mhd_assert (0 != reclaimed_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  147|      2|  mhd_mutex_lock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  295|      2|#  define mhd_mutex_lock_chk(pmutex) do {      \
  |  |  296|      2|                    if (! mhd_mutex_lock (pmutex))        \
  |  |  ------------------
  |  |  |  |  232|      2|#    define mhd_mutex_lock(pmutex) (0 == pthread_mutex_lock ((pmutex)))
  |  |  ------------------
  |  |  |  Branch (296:25): [True: 0, False: 2]
  |  |  ------------------
  |  |  297|      2|                    MHD_PANIC ("Failed to lock mutex.\n"); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  381|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  298|      2|          } while (0)
  |  |  ------------------
  |  |  |  Branch (298:20): [Folded, False: 2]
  |  |  ------------------
  ------------------
  148|      2|  masterd->req_cfg.large_buf.space_left += reclaimed_size;
  149|      2|  mhd_mutex_unlock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  305|      2|#  define mhd_mutex_unlock_chk(pmutex) do {      \
  |  |  306|      2|                    if (! mhd_mutex_unlock (pmutex))        \
  |  |  ------------------
  |  |  |  |  259|      2|#    define mhd_mutex_unlock(pmutex) (0 == pthread_mutex_unlock ((pmutex)))
  |  |  ------------------
  |  |  |  Branch (306:25): [True: 0, False: 2]
  |  |  ------------------
  |  |  307|      2|                    MHD_PANIC ("Failed to unlock mutex.\n"); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  381|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  308|      2|          } while (0)
  |  |  ------------------
  |  |  |  Branch (308:20): [Folded, False: 2]
  |  |  ------------------
  ------------------
  150|      2|}
_Z28mhd_daemon_extend_lbuf_up_toP10MHD_DaemonmP10mhd_Buffer:
  212|      2|{
  213|      2|  void *new_alloc;
  214|      2|  size_t grow_size;
  215|      2|  mhd_assert (NULL != buf->data || 0 == buf->size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  216|      2|  mhd_assert (0 != buf->size || NULL == buf->data);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  217|      2|  mhd_assert (0 != desired_grow_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  218|       |
  219|      2|  grow_size = mhd_daemon_claim_lbuf_up_to (d, desired_grow_size);
  220|       |
  221|      2|  new_alloc = NULL;
  222|      2|  if (NULL == buf->data)
  ------------------
  |  Branch (222:7): [True: 2, False: 0]
  ------------------
  223|      2|  {
  224|      2|    while ((0 != grow_size)
  ------------------
  |  Branch (224:12): [True: 2, False: 0]
  ------------------
  225|      2|           && (NULL == (new_alloc = malloc (grow_size))))
  ------------------
  |  Branch (225:15): [True: 0, False: 2]
  ------------------
  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|      2|  }
  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|      2|  if (NULL != new_alloc)
  ------------------
  |  Branch (250:7): [True: 2, False: 0]
  ------------------
  251|      2|  {
  252|      2|    mhd_assert (0 != grow_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  253|      2|    buf->data = (char *)new_alloc;
  254|      2|    buf->size += grow_size;
  255|      2|  }
  256|       |
  257|      2|  return grow_size;
  258|      2|}
_Z20mhd_daemon_free_lbufP10MHD_DaemonP10mhd_Buffer:
  265|      2|{
  266|      2|  if (0 == buf->size)
  ------------------
  |  Branch (266:7): [True: 0, False: 2]
  ------------------
  267|      0|  {
  268|      0|    mhd_assert (NULL == buf->data);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  269|      0|    return;
  270|      0|  }
  271|      2|  free (buf->data);
  272|       |  buf->data = NULL;
  273|      2|  mhd_daemon_reclaim_lbuf (d, buf->size);
  274|      2|  buf->size = 0;
  275|      2|}
daemon_funcs.c:_ZL27mhd_daemon_claim_lbuf_up_toP10MHD_Daemonm:
  118|      2|{
  119|      2|  size_t ret;
  120|      2|  struct MHD_Daemon *const masterd = mhd_daemon_get_master_daemon (d);
  121|      2|  mhd_assert (0 != requested_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  122|      2|  if (0 == masterd->req_cfg.large_buf.space_left)
  ------------------
  |  Branch (122:7): [True: 0, False: 2]
  ------------------
  123|      0|    return false; /* Shortcut for typical use without large buffer */
  124|       |
  125|      2|  mhd_mutex_lock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  295|      2|#  define mhd_mutex_lock_chk(pmutex) do {      \
  |  |  296|      2|                    if (! mhd_mutex_lock (pmutex))        \
  |  |  ------------------
  |  |  |  |  232|      2|#    define mhd_mutex_lock(pmutex) (0 == pthread_mutex_lock ((pmutex)))
  |  |  ------------------
  |  |  |  Branch (296:25): [True: 0, False: 2]
  |  |  ------------------
  |  |  297|      2|                    MHD_PANIC ("Failed to lock mutex.\n"); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  381|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  298|      2|          } while (0)
  |  |  ------------------
  |  |  |  Branch (298:20): [Folded, False: 2]
  |  |  ------------------
  ------------------
  126|      2|  if (masterd->req_cfg.large_buf.space_left >= requested_size)
  ------------------
  |  Branch (126:7): [True: 1, False: 1]
  ------------------
  127|      1|  {
  128|      1|    ret = requested_size;
  129|      1|    masterd->req_cfg.large_buf.space_left -= requested_size;
  130|      1|  }
  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|      2|  mhd_mutex_unlock_chk (&(masterd->req_cfg.large_buf.lock));
  ------------------
  |  |  305|      2|#  define mhd_mutex_unlock_chk(pmutex) do {      \
  |  |  306|      2|                    if (! mhd_mutex_unlock (pmutex))        \
  |  |  ------------------
  |  |  |  |  259|      2|#    define mhd_mutex_unlock(pmutex) (0 == pthread_mutex_unlock ((pmutex)))
  |  |  ------------------
  |  |  |  Branch (306:25): [True: 0, False: 2]
  |  |  ------------------
  |  |  307|      2|                    MHD_PANIC ("Failed to unlock mutex.\n"); \
  |  |  ------------------
  |  |  |  |   93|      0|              mhd_panic (__FILE__, MHD_FUNC_, __LINE__, msg)
  |  |  |  |  ------------------
  |  |  |  |  |  |  381|      0|#  define MHD_FUNC_       __func__
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  308|      2|          } while (0)
  |  |  ------------------
  |  |  |  Branch (308:20): [Folded, False: 2]
  |  |  ------------------
  ------------------
  137|      2|  return ret;
  138|      2|}

_Z10mhd_loggerP10MHD_Daemon14MHD_StatusCodePKcz:
   59|     23|{
   60|     23|  if (NULL != daemon->log_params.v_log_cb)
  ------------------
  |  Branch (60:7): [True: 0, False: 23]
  ------------------
   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|     23|}

_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|}
_Z29mhd_pool_is_resizable_inplaceP14mhd_MemoryPoolPvm:
  471|      2|{
  472|      2|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  473|      2|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  474|      2|  mhd_assert (block != NULL || block_size == 0);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  475|      2|  mhd_assert (pool->size >= block_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  476|      2|  if (NULL != block)
  ------------------
  |  Branch (476:7): [True: 1, False: 1]
  ------------------
  477|      1|  {
  478|      1|    const size_t block_offset = mp_ptr_diff_ (block, pool->memory);
  ------------------
  |  |  153|      1|          ((size_t) (((const uint8_t*) (p1)) - ((const uint8_t*) (p2))))
  ------------------
  479|      1|    mhd_assert (mp_ptr_le_ (pool->memory, block));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  480|      1|    mhd_assert (pool->size >= block_offset);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  481|      1|    mhd_assert (pool->size >= block_offset + block_size);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  482|      1|    return (pool->pos ==
  483|      1|            mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE (block_offset + block_size));
  ------------------
  |  |  140|      1|#  define mhd_ROUND_TO_ALIGN_PLUS_RED_ZONE(n) mhd_ROUND_TO_ALIGN (n)
  |  |  ------------------
  |  |  |  |  133|      1|        (((n) + (mhd_MEMPOOL_ALIGN_SIZE - 1)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      1|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |  134|      1|         / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      1|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  |  |                        / (mhd_MEMPOOL_ALIGN_SIZE) * (mhd_MEMPOOL_ALIGN_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|      1|#  define mhd_MEMPOOL_ALIGN_SIZE        __BIGGEST_ALIGNMENT__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|      1|  }
  485|      1|  return false; /* Unallocated blocks cannot be resized in-place */
  486|      2|}
_Z18mhd_pool_try_allocP14mhd_MemoryPoolmPm:
  495|     79|{
  496|     79|  void *ret;
  497|     79|  size_t asize;
  498|       |
  499|     79|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  500|     79|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  501|     79|  mhd_assert (pool->pos == mhd_ROUND_TO_ALIGN (pool->pos));
  ------------------
  |  |   66|     79|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  502|     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__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  503|     79|  if ((0 == asize) && (0 != size))
  ------------------
  |  Branch (503:7): [True: 0, False: 79]
  |  Branch (503:23): [True: 0, False: 0]
  ------------------
  504|      0|  { /* size is too close to SIZE_MAX, very unlikely */
  505|      0|    *required_bytes = SIZE_MAX;
  506|      0|    return NULL;
  507|      0|  }
  508|     79|  if (asize > pool->end - pool->pos)
  ------------------
  |  Branch (508:7): [True: 1, False: 78]
  ------------------
  509|      1|  {
  510|      1|    mhd_assert ((pool->end - pool->pos) == \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  511|      1|                mhd_ROUND_TO_ALIGN (pool->end - pool->pos));
  512|      1|    if (asize <= pool->end)
  ------------------
  |  Branch (512:9): [True: 0, False: 1]
  ------------------
  513|      0|      *required_bytes = asize - (pool->end - pool->pos);
  514|      1|    else
  515|      1|      *required_bytes = SIZE_MAX;
  516|      1|    return NULL;
  517|      1|  }
  518|     78|  *required_bytes = 0;
  519|     78|  ret = &pool->memory[pool->end - asize];
  520|     78|  pool->end -= asize;
  521|     78|  mhd_UNPOISON_MEMORY (ret, size);
  ------------------
  |  |  142|     78|#  define mhd_UNPOISON_MEMORY(pointer, size) (void) 0
  ------------------
  522|     78|  return ret;
  523|     79|}
_Z19mhd_pool_deallocateP14mhd_MemoryPoolPvm:
  615|     12|{
  616|     12|  mhd_assert (pool->end >= pool->pos);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  617|     12|  mhd_assert (pool->size >= pool->end - pool->pos);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  618|     12|  mhd_assert (block != NULL || block_size == 0);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  619|     12|  mhd_assert (pool->size >= block_size);
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  620|     12|  mhd_assert (pool->pos == mhd_ROUND_TO_ALIGN (pool->pos));
  ------------------
  |  |   66|     12|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  621|       |
  622|     12|  if (NULL != block)
  ------------------
  |  Branch (622:7): [True: 6, False: 6]
  ------------------
  623|      6|  {   /* Have previously allocated data */
  624|      6|    const size_t block_offset = mp_ptr_diff_ (block, pool->memory);
  ------------------
  |  |  153|      6|          ((size_t) (((const uint8_t*) (p1)) - ((const uint8_t*) (p2))))
  ------------------
  625|      6|    mhd_assert (mp_ptr_le_ (pool->memory, block));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  626|      6|    mhd_assert (block_offset <= pool->size);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  627|      6|    mhd_assert ((block_offset != pool->pos) || (block_size == 0));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  628|       |    /* Zero-out deallocated region */
  629|      6|    if (0 != block_size)
  ------------------
  |  Branch (629:9): [True: 6, False: 0]
  ------------------
  630|      6|    {
  631|      6|      if (MHD_MEMPOOL_ZEROING_ON_RESET < pool->zeroing)
  ------------------
  |  Branch (631:11): [True: 0, False: 6]
  ------------------
  632|      0|        memset (block, 0, block_size);
  633|      6|      mhd_POISON_MEMORY (block, block_size);
  ------------------
  |  |  141|      6|#  define mhd_POISON_MEMORY(pointer, size) (void) 0
  ------------------
  634|      6|    }
  635|      0|#if !defined(MHD_FAVOR_SMALL_CODE) && !defined(MHD_ASAN_POISON_ACTIVE)
  636|      0|    else
  637|      0|      return; /* Zero size, no need to do anything */
  638|      6|#endif /* ! MHD_FAVOR_SMALL_CODE && ! MHD_ASAN_POISON_ACTIVE */
  639|      6|    if (block_offset <= pool->pos)
  ------------------
  |  Branch (639:9): [True: 0, False: 6]
  ------------------
  640|      0|    {
  641|       |      /* "Normal" block, not allocated "from the end". */
  642|      0|      const size_t alg_end =
  643|      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__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|      0|      mhd_assert (alg_end <= pool->pos);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  645|      0|      if (alg_end == pool->pos)
  ------------------
  |  Branch (645:11): [True: 0, False: 0]
  ------------------
  646|      0|      {
  647|       |        /* The last allocated block, return deallocated block to the pool */
  648|      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__
  |  |  ------------------
  ------------------
  649|      0|        mhd_assert (alg_start >= block_offset);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  650|       |#if defined(MHD_ASAN_POISON_ACTIVE)
  651|       |        if (alg_start != block_offset)
  652|       |        {
  653|       |          mhd_POISON_MEMORY (pool->memory + block_offset, \
  654|       |                             alg_start - block_offset);
  655|       |        }
  656|       |        else if (0 != alg_start)
  657|       |        {
  658|       |          bool need_red_zone_before;
  659|       |          mhd_assert (mhd_RED_ZONE_SIZE <= alg_start);
  660|       |#  if defined(HAVE___ASAN_REGION_IS_POISONED)
  661|       |          need_red_zone_before =
  662|       |            (NULL == __asan_region_is_poisoned (pool->memory
  663|       |                                                + alg_start
  664|       |                                                - mhd_RED_ZONE_SIZE,
  665|       |                                                mhd_RED_ZONE_SIZE));
  666|       |#  elif defined(HAVE___ASAN_ADDRESS_IS_POISONED)
  667|       |          need_red_zone_before =
  668|       |            (0 == __asan_address_is_poisoned (pool->memory + alg_start - 1));
  669|       |#  else  /* ! HAVE___ASAN_ADDRESS_IS_POISONED */
  670|       |          need_red_zone_before = true; /* Unknown, assume new red zone needed */
  671|       |#  endif /* ! HAVE___ASAN_ADDRESS_IS_POISONED */
  672|       |          if (need_red_zone_before)
  673|       |          {
  674|       |            mhd_POISON_MEMORY (pool->memory + alg_start, mhd_RED_ZONE_SIZE);
  675|       |            alg_start += mhd_RED_ZONE_SIZE;
  676|       |          }
  677|       |        }
  678|       |#endif /* MHD_ASAN_POISON_ACTIVE */
  679|      0|        mhd_assert (alg_start <= pool->pos);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  680|      0|        mhd_assert (alg_start == mhd_ROUND_TO_ALIGN (alg_start));
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  681|      0|        pool->pos = alg_start;
  682|      0|      }
  683|      0|    }
  684|      6|    else
  685|      6|    {
  686|       |      /* Allocated "from the end" block. */
  687|       |      /* The size and the pointers of such block should not be manipulated by
  688|       |         MHD code (block split is disallowed). */
  689|      6|      mhd_assert (block_offset >= pool->end);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  690|      6|      mhd_assert (mhd_ROUND_TO_ALIGN (block_offset) == block_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  691|      6|      if (block_offset == pool->end)
  ------------------
  |  Branch (691:11): [True: 0, False: 6]
  ------------------
  692|      0|      {
  693|       |        /* The last allocated block, return deallocated block to the pool */
  694|      0|        const size_t alg_end =
  695|      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__
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|        pool->end = alg_end;
  697|      0|      }
  698|      6|    }
  699|      6|  }
  700|     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: 4, False: 2]
  ------------------
  451|      6|      c->rq.app_act.head_act.data.post_parse.enc)
  452|      4|  {
  453|      4|    if (!detect_post_enc (c))
  ------------------
  |  Branch (453:9): [True: 4, False: 0]
  ------------------
  454|      4|    {
  455|      4|      mhd_assert (MHD_POST_PARSE_RES_OK != c->rq.u_proc.post.parse_result);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  456|      4|      c->discard_request = true;
  457|      4|      c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
  458|      4|      return false;
  459|      4|    }
  460|      4|  }
  461|      2|  else if (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA ==
  ------------------
  |  Branch (461:12): [True: 0, False: 2]
  ------------------
  462|      2|           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|      2|  else
  473|      2|    c->rq.u_proc.post.enc = c->rq.app_act.head_act.data.post_parse.enc;
  474|       |
  475|      2|  mhd_assert (MHD_HTTP_POST_ENCODING_OTHER != \
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  476|      2|              c->rq.u_proc.post.enc);
  477|      2|  mhd_assert ((MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA != \
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  478|      2|               c->rq.u_proc.post.enc) \
  479|      2|              || (4 < c->rq.u_proc.post.e_d.m_form.delim.size));
  480|       |
  481|      2|  init_post_parse_data (c);
  482|       |
  483|      2|  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: 2, False: 4]
  ------------------
 2620|      2|  {
 2621|      2|    size_t data_size_before_parse;
 2622|      2|    size_t copy_size = *pdata_size;
 2623|      2|    lbuf_left = c->rq.cntn.lbuf.size - p_data->lbuf_used;
 2624|      2|    if (lbuf_left < copy_size)
  ------------------
  |  Branch (2624:9): [True: 2, False: 0]
  ------------------
 2625|      2|      copy_size = lbuf_left;
 2626|       |
 2627|      2|    memcpy (c->rq.cntn.lbuf.data + p_data->lbuf_used,
 2628|      2|            buf,
 2629|      2|            copy_size);
 2630|      2|    p_data->lbuf_used += copy_size;
 2631|      2|    *pdata_size -= copy_size;
 2632|       |
 2633|      2|    data_size_before_parse = p_data->lbuf_used;
 2634|      2|    switch (p_data->enc)
 2635|      2|    {
 2636|      0|    case MHD_HTTP_POST_ENCODING_FORM_URLENCODED:
  ------------------
  |  Branch (2636:5): [True: 0, False: 2]
  ------------------
 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: 2]
  ------------------
 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|      2|    case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (2648:5): [True: 2, False: 0]
  ------------------
 2649|      2|      if (parse_post_text (c,
  ------------------
  |  Branch (2649:11): [True: 2, False: 0]
  ------------------
 2650|      2|                           &(p_data->lbuf_used),
 2651|      2|                           c->rq.cntn.lbuf.data))
 2652|      2|        return true;
 2653|      0|      break;
 2654|      0|    case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (2654:5): [True: 0, False: 2]
  ------------------
 2655|      0|    default:
  ------------------
  |  Branch (2655:5): [True: 0, False: 2]
  ------------------
 2656|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      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|      2|    }
 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|      4|  if (0 != *pdata_size)
  ------------------
  |  Branch (2666:7): [True: 4, False: 0]
  ------------------
 2667|      4|    return report_low_lbuf_mem (c);
 2668|       |
 2669|      0|  return false; /* Continue normal processing */
 2670|      4|}
post_parser_funcs.c:_ZL15detect_post_encP14MHD_Connection:
  218|      4|{
  219|      4|  struct MHD_StringNullable hdr_cnt_tp;
  220|       |
  221|      4|  mhd_assert (mhd_HTTP_STAGE_BODY_RECEIVING > c->stage);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  222|       |
  223|      4|  if (!mhd_request_get_value_st (&(c->rq),
  ------------------
  |  |  101|      4|          mhd_request_get_value_n ((r),(k),mhd_SSTR_LEN (str),(str),(v_out))
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (223:7): [True: 4, False: 0]
  ------------------
  224|      4|                                 MHD_VK_HEADER,
  225|      4|                                 MHD_HTTP_HEADER_CONTENT_TYPE,
  226|      4|                                 &hdr_cnt_tp))
  227|      4|  {
  228|      4|    mhd_LOG_MSG (c->daemon, MHD_SC_REQ_POST_PARSE_FAILED_NO_CNTN_TYPE, \
  ------------------
  |  |   80|      4|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  229|      4|                 "The request POST data cannot be parsed because " \
  230|      4|                 "the request has no 'Content-Type:' header and no " \
  231|      4|                 "explicit POST encoding is set.");
  232|      4|    c->rq.u_proc.post.parse_result = MHD_POST_PARSE_RES_FAILED_NO_CNTN_TYPE;
  233|      4|    return false;  /* The "Content-Type:" is not defined by the client */
  234|      4|  }
  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|      2|{
  416|      2|  struct mhd_PostParserData *const pdata =
  417|      2|    &(c->rq.u_proc.post);
  418|       |
  419|      2|  mhd_assert (mhd_ACTION_POST_PARSE == c->rq.app_act.head_act.act);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  420|      2|  mhd_assert (MHD_HTTP_POST_ENCODING_OTHER != \
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  421|      2|              c->rq.u_proc.post.enc);
  422|      2|  mhd_assert (0 == pdata->lbuf_used);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  423|       |
  424|      2|  pdata->lbuf_limit = c->rq.app_act.head_act.data.post_parse.buffer_size;
  425|       |
  426|      2|  switch (pdata->enc)
  427|      2|  {
  428|      0|  case MHD_HTTP_POST_ENCODING_FORM_URLENCODED:
  ------------------
  |  Branch (428:3): [True: 0, False: 2]
  ------------------
  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: 2]
  ------------------
  432|      0|    reset_parse_field_data_mpart_init (pdata);
  433|      0|    break;
  434|      2|  case MHD_HTTP_POST_ENCODING_TEXT_PLAIN:
  ------------------
  |  Branch (434:3): [True: 2, False: 0]
  ------------------
  435|      2|    reset_parse_field_data_text (pdata);
  436|      2|    break;
  437|      0|  case MHD_HTTP_POST_ENCODING_OTHER:
  ------------------
  |  Branch (437:3): [True: 0, False: 2]
  ------------------
  438|      0|  default:
  ------------------
  |  Branch (438:3): [True: 0, False: 2]
  ------------------
  439|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  440|      0|    break;
  441|      2|  }
  442|      2|}
post_parser_funcs.c:_ZL27reset_parse_field_data_textP18mhd_PostParserData:
  402|      4|{
  403|      4|  mhd_assert (MHD_HTTP_POST_ENCODING_TEXT_PLAIN == pdata->enc);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  404|      4|  memset (&(pdata->e_d.text), 0, sizeof(pdata->e_d.text));
  405|      4|  pdata->field_start = 0;
  406|      4|}
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: 4, False: 2]
  ------------------
  567|      4|    return 0;
  568|       |
  569|      2|  return mhd_daemon_extend_lbuf_up_to (c->daemon,
  570|      2|                                       desired_grow_size,
  571|      2|                                       buf);
  572|      6|}
post_parser_funcs.c:_ZL15parse_post_textP14MHD_ConnectionPmPc:
 2373|      2|{
 2374|      2|  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|      2|  const bool bare_lf_as_crlf = mhd_ALLOW_BARE_LF_AS_CRLF (discp_lvl);
  ------------------
  |  | 1327|      2|#define mhd_ALLOW_BARE_LF_AS_CRLF(strictness) (0 >= strictness)
  ------------------
 2380|      2|  struct mhd_PostParserData *const p_data = &(c->rq.u_proc.post);
 2381|      2|  struct mhd_PostParserTextData *const tf = &(p_data->e_d.text); /**< the current "text" field */
 2382|      2|  size_t i;
 2383|      2|  bool enc_broken;
 2384|       |
 2385|      2|  mhd_assert (MHD_HTTP_POST_ENCODING_TEXT_PLAIN == c->rq.u_proc.post.enc);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2386|      2|  mhd_assert (MHD_POST_PARSE_RES_OK == p_data->parse_result);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2387|      2|  mhd_assert (!c->discard_request);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2388|      2|  mhd_assert (p_data->next_parse_pos < *pdata_size);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2389|       |
 2390|      2|  enc_broken = false;
 2391|      2|  i = p_data->next_parse_pos;
 2392|      8|  while (*pdata_size > i)
  ------------------
  |  Branch (2392:10): [True: 8, False: 0]
  ------------------
 2393|      8|  {
 2394|      8|    switch (tf->st)
 2395|      8|    {
 2396|      4|    case mhd_POST_TEXT_ST_NOT_STARTED:
  ------------------
  |  Branch (2396:5): [True: 4, False: 4]
  ------------------
 2397|      4|      mhd_assert (0 == p_data->field_start);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2398|      4|      mhd_assert (0 == p_data->value_off);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2399|      4|      p_data->field_start = i;
 2400|      4|      tf->name_idx = i;
 2401|      4|      tf->st = mhd_POST_TEXT_ST_NAME;
 2402|      4|      mhd_FALLTHROUGH;
  ------------------
  |  | 1270|      4|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2403|       |    /* Intentional fallthrough */
 2404|      4|    case mhd_POST_TEXT_ST_NAME:
  ------------------
  |  Branch (2404:5): [True: 0, False: 8]
  ------------------
 2405|      4|      do /* Fast local loop */
 2406|      4|      {
 2407|      4|        if ('=' == buf[i])
  ------------------
  |  Branch (2407:13): [True: 0, False: 4]
  ------------------
 2408|      0|        {
 2409|      0|          tf->st = mhd_POST_TEXT_ST_AT_EQ;
 2410|      0|          break;
 2411|      0|        }
 2412|      4|        else if ('\r' == buf[i])
  ------------------
  |  Branch (2412:18): [True: 2, False: 2]
  ------------------
 2413|      2|        {
 2414|      2|          tf->st = mhd_POST_TEXT_ST_AT_CR;
 2415|      2|          break;
 2416|      2|        }
 2417|      2|        else if ('\n' == buf[i])
  ------------------
  |  Branch (2417:18): [True: 2, False: 0]
  ------------------
 2418|      2|        {
 2419|      2|          tf->st = mhd_POST_TEXT_ST_AT_LF_BARE;
 2420|      2|          break;
 2421|      2|        }
 2422|      4|      } while (*pdata_size > ++i);
  ------------------
  |  Branch (2422:16): [True: 0, False: 0]
  ------------------
 2423|      4|      mhd_assert ((*pdata_size == i) \
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2424|      4|                  || (mhd_POST_TEXT_ST_NAME != tf->st));
 2425|      4|      continue;
 2426|      0|    case mhd_POST_TEXT_ST_AT_EQ:
  ------------------
  |  Branch (2426:5): [True: 0, False: 8]
  ------------------
 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: 8]
  ------------------
 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;
  ------------------
  |  | 1270|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2443|       |    /* Intentional fallthrough */
 2444|      0|    case mhd_POST_TEXT_ST_VALUE:
  ------------------
  |  Branch (2444:5): [True: 0, False: 8]
  ------------------
 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|      2|    case mhd_POST_TEXT_ST_AT_LF_BARE:
  ------------------
  |  Branch (2462:5): [True: 2, False: 6]
  ------------------
 2463|      2|      if (!bare_lf_as_crlf)
  ------------------
  |  Branch (2463:11): [True: 2, False: 0]
  ------------------
 2464|      2|      {
 2465|      2|        enc_broken = true;
 2466|      2|        break;
 2467|      2|      }
 2468|      0|      mhd_FALLTHROUGH;
  ------------------
  |  | 1270|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2469|       |    /* Intentional fallthrough */
 2470|      2|    case mhd_POST_TEXT_ST_AT_CR:
  ------------------
  |  Branch (2470:5): [True: 2, False: 6]
  ------------------
 2471|      2|      mhd_assert (0 == tf->value_len);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2472|      2|      buf[i] = 0; /* Zero-terminate the value (or the name) */
 2473|      2|      if (0 != tf->value_idx)
  ------------------
  |  Branch (2473:11): [True: 0, False: 2]
  ------------------
 2474|      0|        tf->value_len = i - tf->value_idx;
 2475|      2|      else
 2476|      2|        tf->name_len = i - tf->name_idx;
 2477|      2|      if ((0 == tf->name_len) && (0 == tf->value_len))
  ------------------
  |  Branch (2477:11): [True: 2, False: 0]
  |  Branch (2477:34): [True: 2, False: 0]
  ------------------
 2478|      2|      { /* Empty line */
 2479|      2|        ++i; /* Advance to the next char to be checked */
 2480|      2|        reset_parse_field_data_text (p_data);
 2481|      2|        tf->st = mhd_POST_TEXT_ST_NOT_STARTED;
 2482|      2|      }
 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|      2|      continue;
 2491|      0|    case mhd_POST_TEXT_ST_CR_FOUND:
  ------------------
  |  Branch (2491:5): [True: 0, False: 8]
  ------------------
 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;
  ------------------
  |  | 1270|      0|#define mhd_FALLTHROUGH [[fallthrough]]
  ------------------
 2499|       |    /* Intentional fallthrough */
 2500|      0|    case mhd_POST_TEXT_ST_FULL_LINE_FOUND:
  ------------------
  |  Branch (2500:5): [True: 0, False: 8]
  ------------------
 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: 8]
  ------------------
 2523|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
 2524|      0|      enc_broken = true;
 2525|      0|      break;
 2526|      8|    }
 2527|      2|    mhd_assert (enc_broken);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2528|      2|    break;
 2529|      8|  }
 2530|       |
 2531|      2|  mhd_assert ((*pdata_size == i) || enc_broken);
  ------------------
  |  |   66|      2|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2532|       |
 2533|      2|  if (enc_broken)
  ------------------
  |  Branch (2533:7): [True: 2, False: 0]
  ------------------
 2534|      2|  {
 2535|      2|    if (p_data->some_data_provided)
  ------------------
  |  Branch (2535:9): [True: 0, False: 2]
  ------------------
 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|      2|    else
 2545|      2|    {
 2546|      2|      mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      2|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
 2547|      2|                   MHD_SC_REQ_POST_PARSE_FAILED_INVALID_POST_FORMAT, \
 2548|      2|                   "The request POST has broken encoding or format and " \
 2549|      2|                   "cannot be parsed.");
 2550|      2|      p_data->parse_result =
 2551|      2|        MHD_POST_PARSE_RES_FAILED_INVALID_POST_FORMAT;
 2552|      2|    }
 2553|      2|    tf->st = mhd_POST_TEXT_ST_NOT_STARTED;
 2554|      2|    c->stage = mhd_HTTP_STAGE_FULL_REQ_RECEIVED;
 2555|      2|    return true;
 2556|      2|  }
 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|      4|{
  585|      4|  mhd_LOG_MSG (c->daemon, \
  ------------------
  |  |   80|      4|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  586|      4|               MHD_SC_REQ_POST_PARSE_FAILED_NO_LARGE_BUF_MEM, \
  587|      4|               "Not enough large shared buffer memory to " \
  588|      4|               "parse POST request.");
  589|      4|  c->rq.u_proc.post.parse_result =
  590|      4|    MHD_POST_PARSE_RES_FAILED_NO_LARGE_BUF_MEM;
  591|      4|  if (c->stage < mhd_HTTP_STAGE_FULL_REQ_RECEIVED)
  ------------------
  |  Branch (591:7): [True: 0, False: 4]
  ------------------
  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|      4|  return false;
  599|      4|}

_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: 1, False: 24]
  ------------------
   71|      1|    return false;
   72|       |
   73|     24|  f->field.nv.name = *name;
   74|     24|  f->field.nv.value = *value;
   75|     24|  f->field.kind = kind;
   76|     24|  mhd_DLINKEDL_INIT_LINKS (f, fields);
  ------------------
  |  |  313|     24|        do {(p_obj)->links_name.prev = NULL;       \
  |  |  314|     24|            (p_obj)->links_name.next = NULL;} while (0)
  |  |  ------------------
  |  |  |  Branch (314:54): [Folded, False: 24]
  |  |  ------------------
  ------------------
   77|       |
   78|     24|  mhd_DLINKEDL_INS_LAST (&(c->rq), f, fields);
  ------------------
  |  |  340|     24|        mhd_DLINKEDL_INS_LAST_D (&((p_own)->l_name),(p_obj),l_name)
  |  |  ------------------
  |  |  |  |  192|     24|#define mhd_DLINKEDL_INS_LAST_D(p_list, p_obj, links_name) do { \
  |  |  |  |  193|     24|        mhd_ASSUME (NULL == (p_obj)->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     24|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     24|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  194|     24|        mhd_ASSUME (NULL == (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     24|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     24|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  195|     24|        mhd_ASSUME ((p_obj) != (p_list)->first);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     24|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     24|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  196|     24|        mhd_ASSUME ((p_obj) != (p_list)->last);        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     24|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     24|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  197|     24|        if (NULL != (p_list)->last)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (197:13): [True: 18, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  198|     24|        { mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     18|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     18|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  199|     18|          mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     18|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     18|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|     18|          mhd_ASSUME ((p_obj) != (p_list)->last->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     18|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     18|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|     18|          mhd_ASSUME (NULL != (p_list)->first);                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|     18|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|     18|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  202|     18|          ((p_obj)->links_name.prev = (p_list)->last)           \
  |  |  |  |  203|     18|          ->links_name.next = (p_obj); } else \
  |  |  |  |  204|     24|        { mhd_ASSUME (NULL == (p_list)->first);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      6|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      6|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  205|      6|          (p_list)->first = (p_obj); }                      \
  |  |  |  |  206|     24|        (p_list)->last = (p_obj);  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (206:45): [Folded, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|       |
   80|     24|  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|      4|{
   76|      4|  mhd_assert (strlen (key) == key_len);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   77|      4|  value_out->len = 0u;
   78|      4|  value_out->cstr = NULL;
   79|       |
   80|      4|  mhd_assert (strlen (key) == key_len);
  ------------------
  |  |   66|      4|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   81|       |
   82|      4|#ifdef MHD_SUPPORT_HTTP2
   83|      4|  if (mhd_REQ_IS_HTTP2 (request))
  ------------------
  |  |  554|      4|#  define mhd_REQ_IS_HTTP2(req)         ((req)->is_http2)
  |  |  ------------------
  |  |  |  Branch (554:41): [True: 0, False: 4]
  |  |  ------------------
  ------------------
   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|      4|#endif /* MHD_SUPPORT_HTTP2 */
   90|       |
   91|      4|  if (MHD_VK_POSTDATA != kind)
  ------------------
  |  Branch (91:7): [True: 4, False: 0]
  ------------------
   92|      4|  {
   93|      4|    struct mhd_RequestField *f;
   94|       |
   95|      4|    for (f = mhd_DLINKEDL_GET_FIRST (request, fields); NULL != f;
  ------------------
  |  |  362|      4|        mhd_DLINKEDL_GET_FIRST_D (&((p_own)->list_name))
  |  |  ------------------
  |  |  |  |  248|      4|#define mhd_DLINKEDL_GET_FIRST_D(p_list) ((p_list)->first)
  |  |  ------------------
  ------------------
  |  Branch (95:56): [True: 0, False: 4]
  ------------------
   96|      4|         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|      4|  }
  109|       |
  110|      4|#if MHD_SUPPORT_POST_PARSER
  111|      4|  if (0 != (MHD_VK_POSTDATA & kind))
  ------------------
  |  Branch (111:7): [True: 0, False: 4]
  ------------------
  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|      4|#endif /* MHD_SUPPORT_POST_PARSER */
  136|       |
  137|      4|  return false;
  138|      4|}

_Z22respond_with_error_lenP14MHD_ConnectionjmPKcmPc:
   77|      6|{
   78|      6|  struct MHD_Response *err_res;
   79|       |
   80|      6|  mhd_assert (!c->stop_with_error);  /* Do not send error twice */
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   81|      6|  mhd_assert (mhd_HTTP_STAGE_REQ_RECV_FINISHED >= c->stage);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   82|       |
   83|       |  /* Discard most of the request data */
   84|       |
   85|      6|  if (NULL != c->rq.cntn.lbuf.data)
  ------------------
  |  Branch (85:7): [True: 0, False: 6]
  ------------------
   86|      0|    mhd_daemon_free_lbuf (c->daemon, &(c->rq.cntn.lbuf));
   87|      6|  c->rq.cntn.lbuf.data = NULL;
   88|       |
   89|      6|  c->write_buffer = NULL;
   90|      6|  c->write_buffer_size = 0;
   91|      6|  c->write_buffer_send_offset = 0;
   92|      6|  c->write_buffer_append_offset = 0;
   93|       |
   94|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|      6|  c->rq.version = NULL;
   96|      6|  c->rq.method.len = 0;
   97|      6|  c->rq.method.cstr = NULL;
   98|      6|  c->rq.url = NULL;
   99|      6|  c->continue_message_write_offset = 0;
  100|      6|  if (0 != c->read_buffer_size)
  ------------------
  |  Branch (100:7): [True: 6, False: 0]
  ------------------
  101|      6|  {
  102|      6|    mhd_pool_deallocate (c->pool,
  103|      6|                         c->read_buffer,
  104|      6|                         c->read_buffer_size);
  105|      6|    c->read_buffer = NULL;
  106|      6|    c->read_buffer_size = 0;
  107|      6|    c->read_buffer_offset = 0;
  108|      6|  }
  109|       |
  110|      6|  c->stop_with_error = true;
  111|      6|  c->discard_request = true;
  112|      6|  if ((MHD_HTTP_STATUS_CONTENT_TOO_LARGE == http_code)
  ------------------
  |  Branch (112:7): [True: 4, False: 2]
  ------------------
  113|      2|      || (MHD_HTTP_STATUS_URI_TOO_LONG == http_code)
  ------------------
  |  Branch (113:10): [True: 0, False: 2]
  ------------------
  114|      2|      || (MHD_HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE == http_code))
  ------------------
  |  Branch (114:10): [True: 0, False: 2]
  ------------------
  115|      4|    c->rq.too_large = true;
  116|       |
  117|      6|  mhd_LOG_PRINT (c->daemon,
  ------------------
  |  |   97|      6|#  define mhd_LOG_PRINT mhd_logger
  ------------------
  118|      6|                 MHD_SC_REQ_PROCESSING_ERR_REPLY,
  119|      6|                 mhd_LOG_FMT ("Error processing request. Sending %u " \
  ------------------
  |  |  103|      6|#  define mhd_LOG_FMT(format_string) format_string
  ------------------
  120|      6|                              "error reply: %s"),
  121|      6|                 (unsigned int)http_code,
  122|      6|                 (NULL != msg) ? msg : "[EMPTY BODY]");
  ------------------
  |  Branch (122:18): [True: 6, False: 0]
  ------------------
  123|       |
  124|      6|  if (NULL != c->rp.response)
  ------------------
  |  Branch (124:7): [True: 0, False: 6]
  ------------------
  125|      0|  {
  126|      0|    mhd_response_dec_use_count (c->rp.response);
  127|      0|    c->rp.response = NULL;
  128|      0|  }
  129|      6|  err_res = mhd_response_special_for_error (http_code,
  130|      6|                                            msg_len,
  131|      6|                                            msg,
  132|      6|                                            add_hdr_line_len,
  133|      6|                                            add_hdr_line);
  134|      6|  if (NULL == err_res)
  ------------------
  |  Branch (134:7): [True: 0, False: 6]
  ------------------
  135|      0|  {
  136|      0|    if (NULL != add_hdr_line)
  ------------------
  |  Branch (136:9): [True: 0, False: 0]
  ------------------
  137|      0|      free (add_hdr_line);
  138|      0|    mhd_STREAM_ABORT (c, \
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  139|      0|                      mhd_CONN_CLOSE_NO_MEM_FOR_ERR_RESPONSE, \
  140|      0|                      "No memory to create error response.");
  141|      0|    return;
  142|      0|  }
  143|      6|  c->rp.response = err_res;
  144|      6|  c->stage = mhd_HTTP_STAGE_START_REPLY;
  145|      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);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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);             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  217|      0|        mhd_ASSUME (NULL != (p_list)->last);              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  218|      0|        mhd_ASSUME (NULL == (p_list)->first->links_name.prev); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  219|      0|        mhd_ASSUME (NULL == (p_list)->last->links_name.next);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  220|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.prev);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  221|      0|        mhd_ASSUME ((p_list)->last != (p_obj)->links_name.prev);  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  222|      0|        mhd_ASSUME ((p_obj) != (p_obj)->links_name.next);         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  223|      0|        mhd_ASSUME ((p_list)->first != (p_obj)->links_name.next); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  226|      0|          mhd_ASSUME ((p_obj) != (p_list)->last);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  227|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  235|      0|          mhd_ASSUME ((p_obj) != (p_list)->first);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      0|#define MHD_ASSUME_KEYWORD(statement) __attribute__((assume(statement)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  236|      0|          mhd_ASSUME ((p_obj)->links_name.next !=       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   68|      0|#    define mhd_ASSUME(statement)       MHD_ASSUME_KEYWORD ((statement))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  879|      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)
  |  |  ------------------
  |  |  |  |  381|      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)))
  ------------------
  |  |  199|      0|            atomic_fetch_sub_explicit (&((pcnt)->count), \
  |  |  200|      0|                                       1, memory_order_release)
  ------------------
  |  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)
  |  |  ------------------
  |  |  |  |  381|      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:
  419|      6|{
  420|      6|  struct MHD_Response *restrict res;
  421|       |
  422|      6|  mhd_assert (100 <= sc);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  423|      6|  mhd_assert (600 > sc);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  424|      6|  mhd_assert ((NULL != cntn) || (0 == cntn_len));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  425|      6|  mhd_assert ((NULL != spec_hdr) || (0 == spec_hdr_len));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  426|       |
  427|      6|  res = (struct MHD_Response *)
  428|      6|        mhd_calloc (1,
  ------------------
  |  |   64|      6|#  define mhd_calloc calloc
  ------------------
  429|      6|                    sizeof(struct MHD_Response));
  430|      6|  if (NULL == res)
  ------------------
  |  Branch (430:7): [True: 0, False: 6]
  ------------------
  431|      0|    return NULL;
  432|       |
  433|       |#ifndef HAVE_NULL_PTR_ALL_ZEROS
  434|       |  mhd_DLINKEDL_INIT_LIST (res, headers);
  435|       |  res->free.cb = NULL;
  436|       |  res->free.cls = NULL;
  437|       |  res->special_resp.spec_hdr = NULL;
  438|       |#endif /* ! HAVE_NULL_PTR_ALL_ZEROS */
  439|      6|  res->sc = (enum MHD_HTTP_StatusCode)sc;
  440|      6|  res->cntn_size = cntn_len;
  441|      6|  res->cntn_dtype = mhd_RESPONSE_CONTENT_DATA_BUFFER;
  442|      6|  res->cntn.buf = (const unsigned char *)((0 != cntn_len) ? cntn : "");
  ------------------
  |  Branch (442:43): [True: 6, False: 0]
  ------------------
  443|      6|  res->cfg.close_forced = true;
  444|      6|  res->cfg.int_err_resp = true;
  445|      6|  res->special_resp.spec_hdr_len = spec_hdr_len;
  446|      6|  res->special_resp.spec_hdr = spec_hdr;
  447|      6|  res->frozen = true;
  448|       |
  449|      6|  return res;
  450|      6|}

_Z23mhd_stream_alloc_memoryP14MHD_Connectionm:
   93|     73|{
   94|     73|  struct mhd_MemoryPool *const restrict pool = c->pool;     /* a short alias */
   95|     73|  size_t need_to_be_freed = 0; /**< The required amount of additional free memory */
   96|     73|  void *res;
   97|       |
   98|     73|  res = mhd_pool_try_alloc (pool,
   99|     73|                            size,
  100|     73|                            &need_to_be_freed);
  101|     73|  if (NULL != res)
  ------------------
  |  Branch (101:7): [True: 72, False: 1]
  ------------------
  102|     72|    return res;
  103|       |
  104|      1|  if (mhd_pool_is_resizable_inplace (pool,
  ------------------
  |  Branch (104:7): [True: 0, False: 1]
  ------------------
  105|      1|                                     c->write_buffer,
  106|      1|                                     c->write_buffer_size))
  107|      0|  {
  108|      0|    if (c->write_buffer_size - c->write_buffer_append_offset >=
  ------------------
  |  Branch (108:9): [True: 0, False: 0]
  ------------------
  109|      0|        need_to_be_freed)
  110|      0|    {
  111|      0|      char *buf;
  112|      0|      const size_t new_buf_size = c->write_buffer_size - need_to_be_freed;
  113|      0|      buf = (char *)mhd_pool_reallocate (pool,
  114|      0|                                         c->write_buffer,
  115|      0|                                         c->write_buffer_size,
  116|      0|                                         new_buf_size);
  117|      0|      mhd_assert (c->write_buffer == buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  118|      0|      mhd_assert (c->write_buffer_append_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  119|      0|      mhd_assert (c->write_buffer_send_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  120|      0|      c->write_buffer_size = new_buf_size;
  121|      0|      c->write_buffer = buf;
  122|      0|    }
  123|      0|    else
  124|      0|      return NULL;
  125|      0|  }
  126|      1|  else if (mhd_pool_is_resizable_inplace (pool,
  ------------------
  |  Branch (126:12): [True: 0, False: 1]
  ------------------
  127|      1|                                          c->read_buffer,
  128|      1|                                          c->read_buffer_size))
  129|      0|  {
  130|      0|    if (c->read_buffer_size - c->read_buffer_offset >= need_to_be_freed)
  ------------------
  |  Branch (130:9): [True: 0, False: 0]
  ------------------
  131|      0|    {
  132|      0|      char *buf;
  133|      0|      const size_t new_buf_size = c->read_buffer_size - need_to_be_freed;
  134|      0|      buf = (char *)mhd_pool_reallocate (pool,
  135|      0|                                         c->read_buffer,
  136|      0|                                         c->read_buffer_size,
  137|      0|                                         new_buf_size);
  138|      0|      mhd_assert (c->read_buffer == buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  139|      0|      mhd_assert (c->read_buffer_offset <= new_buf_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  140|      0|      c->read_buffer_size = new_buf_size;
  141|      0|      c->read_buffer = buf;
  142|      0|    }
  143|      0|    else
  144|      0|      return NULL;
  145|      0|  }
  146|      1|  else
  147|      1|    return NULL;
  148|      0|  res = mhd_pool_allocate (pool, size, true);
  149|      0|  mhd_assert (NULL != res); /* It has been checked that pool has enough space */
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  150|      0|  return res;
  151|      1|}
_Z29mhd_stream_shrink_read_bufferP14MHD_Connection:
  160|      6|{
  161|      6|  void *new_buf;
  162|       |
  163|      6|  if ((NULL == c->read_buffer) || (0 == c->read_buffer_size))
  ------------------
  |  Branch (163:7): [True: 6, False: 0]
  |  Branch (163:35): [True: 0, False: 0]
  ------------------
  164|      6|  {
  165|      6|    mhd_assert (0 == c->read_buffer_size);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  166|      6|    mhd_assert (0 == c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  167|      6|    return;
  168|      6|  }
  169|       |
  170|      0|  mhd_assert (c->read_buffer_offset <= c->read_buffer_size);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  171|      0|  if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (171:7): [True: 0, False: 0]
  ------------------
  172|      0|  {
  173|      0|    mhd_pool_deallocate (c->pool, c->read_buffer, c->read_buffer_size);
  174|      0|    c->read_buffer = NULL;
  175|      0|    c->read_buffer_size = 0;
  176|      0|  }
  177|      0|  else
  178|      0|  {
  179|      0|    mhd_assert (mhd_pool_is_resizable_inplace (c->pool, c->read_buffer, \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  180|      0|                                               c->read_buffer_size));
  181|      0|    new_buf = mhd_pool_reallocate (c->pool, c->read_buffer, c->read_buffer_size,
  182|      0|                                   c->read_buffer_offset);
  183|      0|    mhd_assert (c->read_buffer == new_buf);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  184|      0|    c->read_buffer = (char *)new_buf;
  185|      0|    c->read_buffer_size = c->read_buffer_offset;
  186|      0|  }
  187|      0|}
_Z31mhd_stream_release_write_bufferP14MHD_Connection:
  234|      6|{
  235|      6|  struct mhd_MemoryPool *const restrict pool = c->pool;
  236|       |
  237|      6|  mhd_assert ((NULL != c->write_buffer) || (0 == c->write_buffer_size));
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  238|      6|  mhd_assert (c->write_buffer_append_offset == c->write_buffer_send_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  239|      6|  mhd_assert (c->write_buffer_size >= c->write_buffer_append_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  240|       |
  241|      6|  mhd_pool_deallocate (pool, c->write_buffer, c->write_buffer_size);
  242|      6|  c->write_buffer_send_offset = 0;
  243|      6|  c->write_buffer_append_offset = 0;
  244|      6|  c->write_buffer_size = 0;
  245|      6|  c->write_buffer = NULL;
  246|       |
  247|      6|}
_Z35mhd_stream_switch_from_recv_to_sendP14MHD_Connection:
  532|      6|{
  533|       |  /* Read buffer is not needed for this request, shrink it.*/
  534|      6|  mhd_stream_shrink_read_buffer (c);
  535|      6|}
_Z22mhd_conn_start_closingP14MHD_Connection19mhd_ConnCloseReasonPKc:
  722|      3|{
  723|      3|  bool close_hard;
  724|      3|  enum MHD_RequestEndedCode end_code;
  725|      3|  enum MHD_StatusCode sc;
  726|      3|  bool reply_sending_aborted;
  727|       |
  728|       |#ifdef MHD_USE_TRACE_CONN_ADD_CLOSE
  729|       |  fprintf (stderr,
  730|       |           "&&& mhd_conn_start_closing([FD: %2llu], %u, %s%s%s)...\n",
  731|       |           (unsigned long long)c->sk.fd,
  732|       |           (unsigned int)reason,
  733|       |           log_msg ? "\"" : "",
  734|       |           log_msg ? log_msg : "[NULL]",
  735|       |           log_msg ? "\"" : "");
  736|       |#endif /* MHD_USE_TRACE_CONN_ADD_CLOSE */
  737|       |
  738|      3|#ifdef MHD_SUPPORT_HTTP2
  739|      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]
  |  |  ------------------
  ------------------
  740|      0|  {
  741|      0|    mhd_assert ((mhd_CONN_CLOSE_TIMEDOUT == reason)
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  742|      0|                || (mhd_CONN_CLOSE_DAEMON_SHUTDOWN == reason)
  743|      0|                || (mhd_CONN_CLOSE_H2_CLOSE_SOFT == reason)
  744|      0|                || (mhd_CONN_CLOSE_H2_CLOSE_HARD == reason));
  745|      0|    mhd_assert (NULL == log_msg);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  746|      0|    conn_h2_start_closing (c,
  747|      0|                           reason != mhd_CONN_CLOSE_H2_CLOSE_SOFT);
  748|      0|    return;
  749|      0|  }
  750|      3|#endif /* MHD_SUPPORT_HTTP2 */
  751|       |
  752|      3|  reply_sending_aborted =
  753|      3|    ((mhd_HTTP_STAGE_HEADERS_SENDING <= c->stage)
  ------------------
  |  Branch (753:6): [True: 0, False: 3]
  ------------------
  754|      0|     && (mhd_HTTP_STAGE_FULL_REPLY_SENT > c->stage));
  ------------------
  |  Branch (754:9): [True: 0, False: 0]
  ------------------
  755|      3|  sc = MHD_SC_INTERNAL_ERROR;
  756|      3|  switch (reason)
  757|      3|  {
  758|      3|  case mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN:
  ------------------
  |  Branch (758:3): [True: 3, False: 0]
  ------------------
  759|      3|    close_hard = true;
  760|      3|    end_code = MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  761|      3|    sc = MHD_SC_REQ_MALFORMED;
  762|      3|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  763|      3|    break;
  764|      0|  case mhd_CONN_CLOSE_NO_POOL_MEM_FOR_REQUEST:
  ------------------
  |  Branch (764:3): [True: 0, False: 3]
  ------------------
  765|      0|    close_hard = true;
  766|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  767|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  768|      0|    break;
  769|      0|  case mhd_CONN_CLOSE_CLIENT_SHUTDOWN_EARLY:
  ------------------
  |  Branch (769:3): [True: 0, False: 3]
  ------------------
  770|      0|    close_hard = true;
  771|      0|    end_code = MHD_REQUEST_ENDED_CLIENT_ABORT;
  772|      0|    sc = MHD_SC_CLIENT_SHUTDOWN_EARLY;
  773|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  774|      0|    break;
  775|      0|  case mhd_CONN_CLOSE_H2_PREFACE_MISSING:
  ------------------
  |  Branch (775:3): [True: 0, False: 3]
  ------------------
  776|      0|    close_hard = true;
  777|      0|    end_code = MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  778|      0|    sc = MHD_SC_ALPN_H2_NO_PREFACE;
  779|      0|    break;
  780|      0|  case mhd_CONN_CLOSE_NO_POOL_MEM_FOR_REPLY:
  ------------------
  |  Branch (780:3): [True: 0, False: 3]
  ------------------
  781|      0|    close_hard = true;
  782|      0|    end_code = (!c->stop_with_error || c->rq.too_large) ?
  ------------------
  |  Branch (782:17): [True: 0, False: 0]
  |  Branch (782:40): [True: 0, False: 0]
  ------------------
  783|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  784|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  785|      0|    sc = MHD_SC_REPLY_POOL_ALLOCATION_FAILURE;
  786|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (786:9): [True: 0, False: 0]
  |  Branch (786:34): [True: 0, False: 0]
  ------------------
  787|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to insufficient memory " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  788|      0|                             "in the connection pool");
  789|      0|    break;
  790|      0|  case mhd_CONN_CLOSE_NO_MEM_FOR_ERR_RESPONSE:
  ------------------
  |  Branch (790:3): [True: 0, False: 3]
  ------------------
  791|      0|    close_hard = true;
  792|      0|    end_code = c->rq.too_large ?
  ------------------
  |  Branch (792:16): [True: 0, False: 0]
  ------------------
  793|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  794|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  795|      0|    sc = MHD_SC_REPLY_ALLOCATION_FAILED;
  796|      0|    break;
  797|      0|  case mhd_CONN_CLOSE_APP_ERROR:
  ------------------
  |  Branch (797:3): [True: 0, False: 3]
  ------------------
  798|      0|    close_hard = true;
  799|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ERROR;
  800|      0|    sc = MHD_SC_APPLICATION_DATA_GENERATION_FAILURE_CLOSED;
  801|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (801:9): [True: 0, False: 0]
  |  Branch (801:34): [True: 0, False: 0]
  ------------------
  802|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to application reply " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  803|      0|                             "generation failure");
  804|      0|    break;
  805|      0|  case mhd_CONN_CLOSE_APP_ABORTED:
  ------------------
  |  Branch (805:3): [True: 0, False: 3]
  ------------------
  806|      0|    close_hard = true;
  807|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ABORT;
  808|      0|    sc = MHD_SC_APPLICATION_CALLBACK_ABORT_ACTION;
  809|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (809:9): [True: 0, False: 0]
  |  Branch (809:34): [True: 0, False: 0]
  ------------------
  810|      0|      log_msg = mhd_MSG4LOG ("Application aborted reply sending");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  811|      0|    break;
  812|      0|  case mhd_CONN_CLOSE_FILE_OFFSET_TOO_LARGE:
  ------------------
  |  Branch (812:3): [True: 0, False: 3]
  ------------------
  813|      0|    close_hard = true;
  814|      0|    end_code = MHD_REQUEST_ENDED_FILE_ERROR;
  815|      0|    sc = MHD_SC_REPLY_FILE_OFFSET_TOO_LARGE;
  816|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (816:9): [True: 0, False: 0]
  |  Branch (816:34): [True: 0, False: 0]
  ------------------
  817|      0|      log_msg = mhd_MSG4LOG ("Response aborted because OS failed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  818|      0|                             "to read too large response file");
  819|      0|    break;
  820|      0|  case mhd_CONN_CLOSE_FILE_READ_ERROR:
  ------------------
  |  Branch (820:3): [True: 0, False: 3]
  ------------------
  821|      0|    close_hard = true;
  822|      0|    end_code = MHD_REQUEST_ENDED_FILE_ERROR;
  823|      0|    sc = MHD_SC_REPLY_FILE_READ_ERROR;
  824|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (824:9): [True: 0, False: 0]
  |  Branch (824:34): [True: 0, False: 0]
  ------------------
  825|      0|      log_msg = mhd_MSG4LOG ("Response aborted because OS failed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  826|      0|                             "to read response file");
  827|      0|    break;
  828|      0|  case mhd_CONN_CLOSE_FILE_TOO_SHORT:
  ------------------
  |  Branch (828:3): [True: 0, False: 3]
  ------------------
  829|      0|    close_hard = true;
  830|      0|    end_code = MHD_REQUEST_ENDED_BY_APP_ERROR;
  831|      0|    sc = MHD_SC_REPLY_FILE_TOO_SHORT;
  832|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (832:9): [True: 0, False: 0]
  |  Branch (832:34): [True: 0, False: 0]
  ------------------
  833|      0|      log_msg = mhd_MSG4LOG ("Response aborted because response file is "
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  834|      0|                             "shorter that expected");
  835|      0|    break;
  836|      0|#ifdef MHD_SUPPORT_AUTH_DIGEST
  837|      0|  case mhd_CONN_CLOSE_NONCE_ERROR:
  ------------------
  |  Branch (837:3): [True: 0, False: 3]
  ------------------
  838|      0|    close_hard = true;
  839|      0|    end_code = MHD_REQUEST_ENDED_NONCE_ERROR;
  840|      0|    sc = MHD_SC_REPLY_NONCE_ERROR;
  841|      0|    mhd_assert (!reply_sending_aborted);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  842|      0|    break;
  843|      0|#endif /* MHD_SUPPORT_AUTH_DIGEST */
  844|       |
  845|      0|  case mhd_CONN_CLOSE_INT_ERROR:
  ------------------
  |  Branch (845:3): [True: 0, False: 3]
  ------------------
  846|      0|    close_hard = true;
  847|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  848|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (848:9): [True: 0, False: 0]
  |  Branch (848:34): [True: 0, False: 0]
  ------------------
  849|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to MHD internal error");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  850|      0|    break;
  851|      0|  case mhd_CONN_CLOSE_EXTR_EVENT_REG_FAILED:
  ------------------
  |  Branch (851:3): [True: 0, False: 3]
  ------------------
  852|      0|    close_hard = true;
  853|      0|    end_code = MHD_REQUEST_ENDED_BY_EXT_EVENT_ERROR;
  854|      0|    sc = MHD_SC_EXTR_EVENT_REG_FAILED;
  855|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (855:9): [True: 0, False: 0]
  |  Branch (855:34): [True: 0, False: 0]
  ------------------
  856|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to external event " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  857|      0|                             "registration failure");
  858|      0|    break;
  859|      0|  case mhd_CONN_CLOSE_NO_SYS_RESOURCES:
  ------------------
  |  Branch (859:3): [True: 0, False: 3]
  ------------------
  860|      0|    close_hard = true;
  861|      0|    end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  862|      0|    sc = MHD_SC_NO_SYS_RESOURCES;
  863|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (863:9): [True: 0, False: 0]
  |  Branch (863:34): [True: 0, False: 0]
  ------------------
  864|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to lack of " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  865|      0|                             "system resources");
  866|      0|    break;
  867|      0|  case mhd_CONN_CLOSE_SOCKET_ERR:
  ------------------
  |  Branch (867:3): [True: 0, False: 3]
  ------------------
  868|      0|    close_hard = true;
  869|      0|    switch (c->sk.state.discnt_err)
  870|      0|    {
  871|      0|    case mhd_SOCKET_ERR_NOMEM:
  ------------------
  |  Branch (871:5): [True: 0, False: 0]
  ------------------
  872|      0|      end_code = MHD_REQUEST_ENDED_NO_RESOURCES;
  873|      0|      sc = MHD_SC_NO_SYS_RESOURCES;
  874|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (874:11): [True: 0, False: 0]
  |  Branch (874:36): [True: 0, False: 0]
  ------------------
  875|      0|        log_msg = mhd_MSG4LOG ("Response aborted because system closed " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  876|      0|                               "socket due to lack of system resources");
  877|      0|      break;
  878|      0|    case mhd_SOCKET_ERR_REMT_DISCONN:
  ------------------
  |  Branch (878:5): [True: 0, False: 0]
  ------------------
  879|      0|      close_hard = false;
  880|      0|      end_code = (mhd_HTTP_STAGE_INIT == c->stage) ?
  ------------------
  |  Branch (880:18): [True: 0, False: 0]
  ------------------
  881|      0|                 MHD_REQUEST_ENDED_COMPLETED_OK /* Not used */
  882|      0|                 : MHD_REQUEST_ENDED_CLIENT_ABORT;
  883|      0|      if (reply_sending_aborted)
  ------------------
  |  Branch (883:11): [True: 0, False: 0]
  ------------------
  884|      0|      {
  885|      0|        sc = MHD_SC_CLIENT_CLOSED_CONN_EARLY;
  886|      0|        if (NULL == log_msg)
  ------------------
  |  Branch (886:13): [True: 0, False: 0]
  ------------------
  887|      0|          log_msg = mhd_MSG4LOG ("Response aborted because remote client " \
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  888|      0|                                 "closed connection early");
  889|      0|      }
  890|      0|      break;
  891|      0|    case mhd_SOCKET_ERR_CONNRESET:
  ------------------
  |  Branch (891:5): [True: 0, False: 0]
  ------------------
  892|      0|      end_code = MHD_REQUEST_ENDED_CLIENT_ABORT;
  893|      0|      sc = MHD_SC_CONNECTION_RESET;
  894|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (894:11): [True: 0, False: 0]
  |  Branch (894:36): [True: 0, False: 0]
  ------------------
  895|      0|        log_msg = mhd_MSG4LOG ("Response aborted due to aborted connection");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  896|      0|      break;
  897|      0|    case mhd_SOCKET_ERR_CONN_BROKEN:
  ------------------
  |  Branch (897:5): [True: 0, False: 0]
  ------------------
  898|      0|    case mhd_SOCKET_ERR_NOTCONN:
  ------------------
  |  Branch (898:5): [True: 0, False: 0]
  ------------------
  899|      0|    case mhd_SOCKET_ERR_TLS:
  ------------------
  |  Branch (899:5): [True: 0, False: 0]
  ------------------
  900|      0|    case mhd_SOCKET_ERR_PIPE:
  ------------------
  |  Branch (900:5): [True: 0, False: 0]
  ------------------
  901|      0|    case mhd_SOCKET_ERR_NOT_CHECKED:
  ------------------
  |  Branch (901:5): [True: 0, False: 0]
  ------------------
  902|      0|    case mhd_SOCKET_ERR_BADF:
  ------------------
  |  Branch (902:5): [True: 0, False: 0]
  ------------------
  903|      0|    case mhd_SOCKET_ERR_INVAL:
  ------------------
  |  Branch (903:5): [True: 0, False: 0]
  ------------------
  904|      0|    case mhd_SOCKET_ERR_OPNOTSUPP:
  ------------------
  |  Branch (904:5): [True: 0, False: 0]
  ------------------
  905|      0|    case mhd_SOCKET_ERR_NOTSOCK:
  ------------------
  |  Branch (905:5): [True: 0, False: 0]
  ------------------
  906|      0|    case mhd_SOCKET_ERR_OTHER:
  ------------------
  |  Branch (906:5): [True: 0, False: 0]
  ------------------
  907|      0|    case mhd_SOCKET_ERR_INTERNAL:
  ------------------
  |  Branch (907:5): [True: 0, False: 0]
  ------------------
  908|      0|    case mhd_SOCKET_ERR_NO_ERROR:
  ------------------
  |  Branch (908:5): [True: 0, False: 0]
  ------------------
  909|      0|      end_code = MHD_REQUEST_ENDED_CONNECTION_ERROR;
  910|      0|      sc = MHD_SC_CONNECTION_BROKEN;
  911|      0|      if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  |  Branch (911:36): [True: 0, False: 0]
  ------------------
  912|      0|        log_msg = mhd_MSG4LOG ("Response aborted due to broken connection");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  913|      0|      break;
  914|      0|    case mhd_SOCKET_ERR_AGAIN:
  ------------------
  |  Branch (914:5): [True: 0, False: 0]
  ------------------
  915|      0|    case mhd_SOCKET_ERR_INTR:
  ------------------
  |  Branch (915:5): [True: 0, False: 0]
  ------------------
  916|      0|    default:
  ------------------
  |  Branch (916:5): [True: 0, False: 0]
  ------------------
  917|      0|      mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  918|      0|      break;
  919|      0|    }
  920|      0|    break;
  921|      0|  case mhd_CONN_CLOSE_DAEMON_SHUTDOWN:
  ------------------
  |  Branch (921:3): [True: 0, False: 3]
  ------------------
  922|      0|    close_hard = true;
  923|      0|    end_code = MHD_REQUEST_ENDED_DAEMON_SHUTDOWN;
  924|      0|    break;
  925|       |
  926|      0|  case mhd_CONN_CLOSE_TIMEDOUT:
  ------------------
  |  Branch (926:3): [True: 0, False: 3]
  ------------------
  927|      0|    if (mhd_HTTP_STAGE_INIT == c->stage)
  ------------------
  |  Branch (927:9): [True: 0, False: 0]
  ------------------
  928|      0|    {
  929|      0|      close_hard = false;
  930|      0|      end_code = MHD_REQUEST_ENDED_COMPLETED_OK; /* Not used */
  931|      0|      break;
  932|      0|    }
  933|      0|    close_hard = true;
  934|      0|    end_code = MHD_REQUEST_ENDED_TIMEOUT_REACHED;
  935|      0|    sc = MHD_SC_CONNECTION_TIMEOUT;
  936|      0|    if (reply_sending_aborted && (NULL == log_msg))
  ------------------
  |  Branch (936:9): [True: 0, False: 0]
  |  Branch (936:34): [True: 0, False: 0]
  ------------------
  937|      0|      log_msg = mhd_MSG4LOG ("Response aborted due to sending timeout");
  ------------------
  |  |   88|      0|#  define mhd_MSG4LOG(msg) msg
  ------------------
  938|      0|    break;
  939|       |
  940|      0|  case mhd_CONN_CLOSE_ERR_REPLY_SENT:
  ------------------
  |  Branch (940:3): [True: 0, False: 3]
  ------------------
  941|      0|    close_hard = false;
  942|      0|    end_code = c->rq.too_large ?
  ------------------
  |  Branch (942:16): [True: 0, False: 0]
  ------------------
  943|      0|               MHD_REQUEST_ENDED_NO_RESOURCES :
  944|      0|               MHD_REQUEST_ENDED_HTTP_PROTOCOL_ERROR;
  945|      0|    break;
  946|      0|#ifdef MHD_SUPPORT_UPGRADE
  947|      0|  case mhd_CONN_CLOSE_UPGRADE:
  ------------------
  |  Branch (947:3): [True: 0, False: 3]
  ------------------
  948|      0|    close_hard = false;
  949|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK_UPGRADE;
  950|      0|    break;
  951|      0|#endif /* MHD_SUPPORT_UPGRADE */
  952|      0|  case mhd_CONN_CLOSE_HTTP_COMPLETED:
  ------------------
  |  Branch (952:3): [True: 0, False: 3]
  ------------------
  953|      0|    close_hard = false;
  954|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK;
  955|      0|    break;
  956|       |
  957|      0|#ifdef MHD_SUPPORT_HTTP2
  958|      0|  case mhd_CONN_CLOSE_H2_CLOSE_SOFT:
  ------------------
  |  Branch (958:3): [True: 0, False: 3]
  ------------------
  959|      0|  case mhd_CONN_CLOSE_H2_CLOSE_HARD:
  ------------------
  |  Branch (959:3): [True: 0, False: 3]
  ------------------
  960|      0|#endif /* MHD_SUPPORT_HTTP2 */
  961|      0|  default:
  ------------------
  |  Branch (961:3): [True: 0, False: 3]
  ------------------
  962|      0|    mhd_assert (0 && "Unreachable code");
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  963|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  964|      0|    end_code = MHD_REQUEST_ENDED_COMPLETED_OK;
  965|      0|    close_hard = false;
  966|      0|    break;
  967|      3|  }
  968|       |
  969|      3|  mhd_assert ((NULL == log_msg) || (MHD_SC_INTERNAL_ERROR != sc));
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  970|       |
  971|      3|#ifdef MHD_SUPPORT_UPGRADE
  972|      3|  if (mhd_CONN_CLOSE_UPGRADE == reason)
  ------------------
  |  Branch (972:7): [True: 0, False: 3]
  ------------------
  973|      0|  {
  974|      0|    mhd_assert (mhd_HTTP_STAGE_UPGRADING == c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  975|      0|    c->event_loop_info = MHD_EVENT_LOOP_INFO_UPGRADED;
  976|      0|  }
  977|      3|  else
  978|      3|#endif /* MHD_SUPPORT_UPGRADE */
  979|      3|  if (1)
  ------------------
  |  Branch (979:7): [True: 3, Folded]
  ------------------
  980|      3|  {
  981|      3|    if (conn_start_socket_closing (c,
  ------------------
  |  Branch (981:9): [True: 0, False: 3]
  ------------------
  982|      3|                                   close_hard))
  983|      0|    {
  984|      0|      (void)0;  // TODO: start local lingering phase
  985|      0|      c->stage = mhd_HTTP_STAGE_PRE_CLOSING; // TODO: start local lingering phase
  986|      0|      c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; // TODO: start local lingering phase
  987|      0|    }
  988|      3|    else
  989|      3|    {  /* No need / not possible to linger */
  990|      3|      c->stage = mhd_HTTP_STAGE_PRE_CLOSING;
  991|      3|      c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  992|      3|    }
  993|      3|  }
  994|       |
  995|      3|#ifdef MHD_SUPPORT_LOG_FUNCTIONALITY
  996|      3|  if (NULL != log_msg)
  ------------------
  |  Branch (996:7): [True: 3, False: 0]
  ------------------
  997|      3|  {
  998|      3|    mhd_LOG_MSG (c->daemon, sc, log_msg);
  ------------------
  |  |   80|      3|#  define mhd_LOG_MSG(daemon, sc, msg) mhd_logger (daemon,sc,msg)
  ------------------
  999|      3|  }
 1000|       |#else  /* ! MHD_SUPPORT_LOG_FUNCTIONALITY */
 1001|       |  (void)log_msg;  /* Mute compiler warning */
 1002|       |  (void)sc;       /* Mute compiler warning */
 1003|       |#endif /* ! MHD_SUPPORT_LOG_FUNCTIONALITY */
 1004|       |
 1005|       |#if 0 // TODO: notification callback
 1006|       |  mhd_assert ((mhd_HTTP_STAGE_INIT != c->stage) || (!c->rq.app_aware));
 1007|       |  if ((NULL != d->notify_completed)
 1008|       |      && (c->rq.app_aware))
 1009|       |    d->notify_completed (d->notify_completed_cls,
 1010|       |                         c,
 1011|       |                         &c->rq.app_context,
 1012|       |                         MHD_REQUEST_ENDED_COMPLETED_OK);
 1013|       |#else
 1014|      3|  (void)end_code;
 1015|      3|#endif
 1016|      3|  c->rq.app_aware = false;
 1017|       |
 1018|      3|  if (!c->suspended)
  ------------------
  |  Branch (1018:7): [True: 3, False: 0]
  ------------------
 1019|      3|  {
 1020|      3|    mhd_assert (!c->resuming);
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1021|      3|    mhd_conn_deinit_activity_timeout (c);
 1022|      3|  }
 1023|       |
 1024|       |#ifndef NDEBUG
 1025|       |  c->dbg.closing_started = true;
 1026|       |#endif
 1027|      3|}
stream_funcs.c:_ZL25conn_start_socket_closingP14MHD_Connectionb:
  650|      3|{
  651|      3|  bool need_lingering;
  652|       |  /* Make changes on the socket early to let the kernel and the remote
  653|       |   * to process the changes in parallel. */
  654|      3|  if (close_hard)
  ------------------
  |  Branch (654:7): [True: 3, False: 0]
  ------------------
  655|      3|  {
  656|       |    /* Use abortive closing, send RST to remote to indicate a problem */
  657|      3|    (void)mhd_socket_set_hard_close (c->sk.fd);
  658|      3|    c->stage = mhd_HTTP_STAGE_PRE_CLOSING;
  659|      3|    c->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP;
  660|       |
  661|      3|    return false;
  662|      3|  }
  663|       |
  664|      0|  mhd_assert (c->sk.state.rmt_shut_wr \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  665|      0|              || !mhd_SOCKET_ERR_IS_HARD (c->sk.state.discnt_err));
  666|       |
  667|      0|  need_lingering = !c->sk.state.rmt_shut_wr;
  668|      0|  if (need_lingering)
  ------------------
  |  Branch (668:7): [True: 0, False: 0]
  ------------------
  669|      0|  {
  670|      0|#ifdef MHD_SUPPORT_HTTPS
  671|      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]
  |  |  ------------------
  ------------------
  672|      0|    {
  673|      0|      if ((0 != (((unsigned int)c->sk.ready)
  ------------------
  |  Branch (673:11): [True: 0, False: 0]
  ------------------
  674|      0|                 & mhd_SOCKET_NET_STATE_SEND_READY))
  675|      0|          || c->sk.props.is_nonblck)
  ------------------
  |  Branch (675:14): [True: 0, False: 0]
  ------------------
  676|      0|        need_lingering =
  677|      0|          (mhd_TLS_PROCED_FAILED != mhd_tls_conn_shutdown (c->tls));
  ------------------
  |  |  175|      0|        mhd_TLS_FUNC (_conn_shutdown)((c_tls))
  |  |  ------------------
  |  |  |  |  260|      0|        mhd_MACRO_CONCAT3 (mhd_tls_,mhd_TLS_FUNC_NAME_ID,name_suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      0|#define mhd_MACRO_CONCAT3(a, b, c)         mhd_MACRO_CONCAT3_ (a,b,c)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|      0|#define mhd_MACRO_CONCAT3_(a, b, c)        a ## b ## c
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  678|      0|    }
  679|      0|    else
  680|      0|#endif /* MHD_SUPPORT_HTTPS */
  681|      0|    if (1)
  ------------------
  |  Branch (681:9): [True: 0, Folded]
  ------------------
  682|      0|    {
  683|      0|      need_lingering = mhd_socket_shut_wr (c->sk.fd);
  684|      0|      if (need_lingering)
  ------------------
  |  Branch (684:11): [True: 0, False: 0]
  ------------------
  685|      0|        need_lingering = (!c->sk.state.rmt_shut_wr);  /* Skip as already closed */
  686|      0|    }
  687|      0|  }
  688|       |
  689|      0|  return need_lingering;
  690|      3|}

_Z21mhd_parse_http_methodmPKc:
  493|      6|{
  494|      6|  switch (len)
  495|      6|  {
  496|      1|  case 3: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_GET) */
  ------------------
  |  Branch (496:3): [True: 1, False: 5]
  ------------------
  497|       |          /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_PUT) */
  498|      1|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_GET));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  499|      1|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_PUT));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  500|      1|    if (0 == memcmp (mtd,
  ------------------
  |  Branch (500:9): [True: 1, False: 0]
  ------------------
  501|      1|                     MHD_HTTP_METHOD_STR_GET,
  ------------------
  |  | 1936|      1|#define MHD_HTTP_METHOD_STR_GET      "GET"
  ------------------
  502|      1|                     mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_GET)))
  ------------------
  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  503|      1|      return mhd_HTTP_METHOD_GET;
  504|      0|    else if (0 == memcmp (mtd,
  ------------------
  |  Branch (504:14): [True: 0, False: 0]
  ------------------
  505|      0|                          MHD_HTTP_METHOD_STR_PUT,
  ------------------
  |  | 1942|      0|#define MHD_HTTP_METHOD_STR_PUT      "PUT"
  ------------------
  506|      0|                          mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_PUT)))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  507|      0|      return mhd_HTTP_METHOD_PUT;
  508|      0|    break;
  509|      1|  case 4: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_HEAD) */
  ------------------
  |  Branch (509:3): [True: 1, False: 5]
  ------------------
  510|       |          /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_POST) */
  511|      1|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_HEAD));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  512|      1|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_POST));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  513|      1|    if (0 == memcmp (mtd,
  ------------------
  |  Branch (513:9): [True: 0, False: 1]
  ------------------
  514|      1|                     MHD_HTTP_METHOD_STR_HEAD,
  ------------------
  |  | 1938|      1|#define MHD_HTTP_METHOD_STR_HEAD     "HEAD"
  ------------------
  515|      1|                     mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_HEAD)))
  ------------------
  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  516|      0|      return mhd_HTTP_METHOD_HEAD;
  517|      1|    else if (0 == memcmp (mtd,
  ------------------
  |  Branch (517:14): [True: 1, False: 0]
  ------------------
  518|      1|                          MHD_HTTP_METHOD_STR_POST,
  ------------------
  |  | 1940|      1|#define MHD_HTTP_METHOD_STR_POST     "POST"
  ------------------
  519|      1|                          mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_POST)))
  ------------------
  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  520|      1|      return mhd_HTTP_METHOD_POST;
  521|      0|    break;
  522|      1|  case 6: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_DELETE) */
  ------------------
  |  Branch (522:3): [True: 1, False: 5]
  ------------------
  523|      1|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_DELETE));
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  524|      1|    if (0 == memcmp (mtd,
  ------------------
  |  Branch (524:9): [True: 1, False: 0]
  ------------------
  525|      1|                     MHD_HTTP_METHOD_STR_DELETE,
  ------------------
  |  | 1944|      1|#define MHD_HTTP_METHOD_STR_DELETE   "DELETE"
  ------------------
  526|      1|                     mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_DELETE)))
  ------------------
  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  527|      1|      return mhd_HTTP_METHOD_DELETE;
  528|      0|    break;
  529|      0|  case 7: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_CONNECT) */
  ------------------
  |  Branch (529:3): [True: 0, False: 6]
  ------------------
  530|       |          /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_OPTIONS) */
  531|      0|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_CONNECT));
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  532|      0|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_OPTIONS));
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  533|      0|    if (0 == memcmp (mtd,
  ------------------
  |  Branch (533:9): [True: 0, False: 0]
  ------------------
  534|      0|                     MHD_HTTP_METHOD_STR_CONNECT,
  ------------------
  |  | 1946|      0|#define MHD_HTTP_METHOD_STR_CONNECT  "CONNECT"
  ------------------
  535|      0|                     mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_CONNECT)))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  536|      0|      return mhd_HTTP_METHOD_CONNECT;
  537|      0|    else if (0 == memcmp (mtd,
  ------------------
  |  Branch (537:14): [True: 0, False: 0]
  ------------------
  538|      0|                          MHD_HTTP_METHOD_STR_OPTIONS,
  ------------------
  |  | 1948|      0|#define MHD_HTTP_METHOD_STR_OPTIONS  "OPTIONS"
  ------------------
  539|      0|                          mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_OPTIONS)))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  540|      0|      return mhd_HTTP_METHOD_OPTIONS;
  541|      0|    break;
  542|      3|  case 5: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_TRACE) */
  ------------------
  |  Branch (542:3): [True: 3, False: 3]
  ------------------
  543|      3|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_TRACE));
  ------------------
  |  |   66|      3|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  544|      3|    if (0 == memcmp (mtd,
  ------------------
  |  Branch (544:9): [True: 3, False: 0]
  ------------------
  545|      3|                     MHD_HTTP_METHOD_STR_TRACE,
  ------------------
  |  | 1950|      3|#define MHD_HTTP_METHOD_STR_TRACE    "TRACE"
  ------------------
  546|      3|                     mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_TRACE)))
  ------------------
  |  |   54|      3|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
  547|      3|      return mhd_HTTP_METHOD_TRACE;
  548|      0|    break;
  549|      0|  case 1: /* mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_ASTERISK) */
  ------------------
  |  Branch (549:3): [True: 0, False: 6]
  ------------------
  550|      0|    mhd_assert (len == mhd_SSTR_LEN (MHD_HTTP_METHOD_STR_ASTERISK));
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  551|      0|    if ('*' == mtd[0])
  ------------------
  |  Branch (551:9): [True: 0, False: 0]
  ------------------
  552|      0|      return mhd_HTTP_METHOD_ASTERISK;
  553|      0|    break;
  554|      0|  default:
  ------------------
  |  Branch (554:3): [True: 0, False: 6]
  ------------------
  555|      0|    break; /* Handled after the "switch()" body */
  556|      6|  }
  557|      0|  return mhd_HTTP_METHOD_OTHER;
  558|      6|}
_Z18mhd_parse_uri_argsmPcPFbPvPK10MHD_StringPK18MHD_StringNullableES0_:
 1298|      1|{
 1299|      1|  size_t i;
 1300|       |
 1301|      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)
  ------------------
 1302|       |
 1303|      2|  for (i = 0; i < args_len; ++i) /* Looking for names of the parameters */
  ------------------
  |  Branch (1303:15): [True: 1, False: 1]
  ------------------
 1304|      1|  {
 1305|      1|    size_t name_start;
 1306|      1|    size_t name_len;
 1307|      1|    size_t value_start;
 1308|      1|    size_t value_len;
 1309|      1|    struct MHD_String name;
 1310|      1|    struct MHD_StringNullable value;
 1311|       |
 1312|       |    /* Found start of the name */
 1313|       |
 1314|      1|    value_start = 0;
 1315|      2|    for (name_start = i; i < args_len; ++i) /* Processing parameter */
  ------------------
  |  Branch (1315:26): [True: 2, False: 0]
  ------------------
 1316|      2|    {
 1317|      2|      if ('+' == args[i])
  ------------------
  |  Branch (1317:11): [True: 0, False: 2]
  ------------------
 1318|      0|        args[i] = ' ';
 1319|      2|      else if ('=' == args[i])
  ------------------
  |  Branch (1319:16): [True: 1, False: 1]
  ------------------
 1320|      1|      {
 1321|       |        /* Found start of the value */
 1322|      2|        for (value_start = ++i; i < args_len; ++i) /* Processing parameter value */
  ------------------
  |  Branch (1322:33): [True: 1, False: 1]
  ------------------
 1323|      1|        {
 1324|      1|          if ('+' == args[i])
  ------------------
  |  Branch (1324:15): [True: 0, False: 1]
  ------------------
 1325|      0|            args[i] = ' ';
 1326|      1|          else if ('&' == args[i]) /* delimiter for the next parameter */
  ------------------
  |  Branch (1326:20): [True: 0, False: 1]
  ------------------
 1327|      0|            break; /* Next parameter */
 1328|      1|        }
 1329|      1|        break; /* End of the current parameter */
 1330|      1|      }
 1331|      1|      else if ('&' == args[i])
  ------------------
  |  Branch (1331:16): [True: 0, False: 1]
  ------------------
 1332|      0|        break; /* End of the name of the parameter without a value */
 1333|      2|    }
 1334|       |
 1335|       |    /* PCT-decode, zero-terminate and store the found parameter */
 1336|       |
 1337|      1|    if (0 != value_start) /* Value cannot start at zero position */
  ------------------
  |  Branch (1337:9): [True: 1, False: 0]
  ------------------
 1338|      1|    { /* Name with value */
 1339|      1|      mhd_assert (name_start + 1 <= value_start);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1340|      1|      name_len = value_start - name_start - 1;
 1341|       |
 1342|      1|      value_len =
 1343|      1|        mhd_str_pct_decode_lenient_n (args + value_start, i - value_start,
 1344|      1|                                      args + value_start, i - value_start,
 1345|      1|                                      NULL); // TODO: add support for broken encoding detection
 1346|      1|      if (value_start + value_len < args_len)
  ------------------
  |  Branch (1346:11): [True: 0, False: 1]
  ------------------
 1347|      0|        args[value_start + value_len] = 0;
 1348|      1|      value.cstr = args + value_start;
 1349|      1|      value.len = value_len;
 1350|      1|    }
 1351|      0|    else
 1352|      0|    { /* Name without value */
 1353|      0|      name_len = i - name_start;
 1354|       |
 1355|      0|      value.cstr = NULL;
 1356|      0|      value.len = 0;
 1357|      0|    }
 1358|      1|    name_len = mhd_str_pct_decode_lenient_n (args + name_start, name_len,
 1359|      1|                                             args + name_start, name_len,
 1360|      1|                                             NULL); // TODO: add support for broken encoding detection
 1361|      1|    if (name_start + name_len < args_len)
  ------------------
  |  Branch (1361:9): [True: 1, False: 0]
  ------------------
 1362|      1|      args[name_start + name_len] = 0;
 1363|      1|    name.cstr = args + name_start;
 1364|      1|    name.len = name_len;
 1365|      1|    if (!cb (cls, &name, &value))
  ------------------
  |  Branch (1365:9): [True: 0, False: 1]
  ------------------
 1366|      0|      return false;
 1367|      1|  }
 1368|      1|  return true;
 1369|      1|}
_Z27mhd_stream_get_request_lineP14MHD_Connection:
 1556|      6|{
 1557|      6|  const int discp_lvl = c->daemon->req_cfg.strictness;
 1558|       |  /* Parse whitespace in URI, special parsing of the request line */
 1559|      6|  const bool wsp_in_uri = (0 >= discp_lvl);
 1560|       |  /* Keep whitespace in URI, give app URI with whitespace instead of
 1561|       |     automatic redirect to fixed URI */
 1562|      6|  const bool wsp_in_uri_keep = (-2 >= discp_lvl);
 1563|       |
 1564|      6|  if (!get_request_line_inner (c))
  ------------------
  |  Branch (1564:7): [True: 0, False: 6]
  ------------------
 1565|      0|  {
 1566|       |    /* End of the request line has not been found yet */
 1567|      0|    mhd_assert ((!wsp_in_uri) || NULL == c->rq.version);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1568|      0|    if ((NULL != c->rq.version)
  ------------------
  |  Branch (1568:9): [True: 0, False: 0]
  ------------------
 1569|      0|        && (HTTP_VER_LEN <
  ------------------
  |  |  479|      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 (1569:12): [True: 0, False: 0]
  ------------------
 1570|      0|            (c->rq.hdrs.rq_line.proc_pos
 1571|      0|             - (size_t)(c->rq.version - c->read_buffer))))
 1572|      0|    {
 1573|      0|      c->rq.http_ver = MHD_HTTP_VERSION_INVALID;
 1574|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 1575|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 1576|      0|                                     ERR_RSP_REQUEST_MALFORMED);
 1577|      0|      return true; /* Error in the request */
 1578|      0|    }
 1579|      0|    return false;
 1580|      0|  }
 1581|      6|  if (mhd_HTTP_STAGE_REQ_LINE_RECEIVING < c->stage)
  ------------------
  |  Branch (1581:7): [True: 5, False: 1]
  ------------------
 1582|      5|    return true; /* Error in the request */
 1583|       |
 1584|      1|  mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1585|      1|  mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1586|      1|  mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1587|      1|  mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1588|      1|  if (0 != c->rq.hdrs.rq_line.num_ws_in_uri)
  ------------------
  |  Branch (1588:7): [True: 0, False: 1]
  ------------------
 1589|      0|  {
 1590|      0|    if (!wsp_in_uri)
  ------------------
  |  Branch (1590:9): [True: 0, False: 0]
  ------------------
 1591|      0|    {
 1592|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 1593|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 1594|      0|                                     ERR_RSP_RQ_TARGET_INVALID_CHAR);
 1595|      0|      return true; /* Error in the request */
 1596|      0|    }
 1597|      0|    if (!wsp_in_uri_keep)
  ------------------
  |  Branch (1597:9): [True: 0, False: 0]
  ------------------
 1598|      0|    {
 1599|      0|      send_redirect_fixed_rq_target (c);
 1600|      0|      return true; /* Error in the request */
 1601|      0|    }
 1602|      0|  }
 1603|      1|  if (!process_request_target (c))
  ------------------
  |  Branch (1603:7): [True: 0, False: 1]
  ------------------
 1604|      0|    return true; /* Error in processing */
 1605|       |
 1606|      1|  c->stage = mhd_HTTP_STAGE_REQ_LINE_RECEIVED;
 1607|      1|  return true;
 1608|      1|}
_Z36mhd_stream_switch_to_rq_headers_procP14MHD_Connection:
 1613|      1|{
 1614|      1|  c->rq.field_lines.start = c->read_buffer;
 1615|      1|  mhd_stream_reset_rq_hdr_proc_state (c);
 1616|      1|  c->stage = mhd_HTTP_STAGE_REQ_HEADERS_RECEIVING;
 1617|      1|}
_Z34mhd_stream_reset_rq_hdr_proc_stateP14MHD_Connection:
 2172|      1|{
 2173|      1|  memset (&c->rq.hdrs.hdr, 0, sizeof(c->rq.hdrs.hdr));
 2174|      1|}
_Z32mhd_stream_parse_request_headersP14MHD_Connection:
 2730|      4|{
 2731|      4|  bool has_host;
 2732|      4|  bool has_trenc;
 2733|      4|  bool has_cntnlen;
 2734|      4|  bool has_keepalive;
 2735|      4|  struct mhd_RequestField *f;
 2736|       |
 2737|       |  /* The presence of the request body is indicated by "Content-Length:" or
 2738|       |     "Transfer-Encoding:" request headers.
 2739|       |     Unless one of these two headers is used, the request has no request body.
 2740|       |     See RFC9112, Section 6, paragraph 4. */
 2741|      4|  c->rq.have_chunked_upload = false;
 2742|      4|  c->rq.cntn.cntn_size = 0;
 2743|       |
 2744|      4|  has_host = false;
 2745|      4|  has_trenc = false;
 2746|      4|  has_cntnlen = false;
 2747|      4|  has_keepalive = true;
 2748|       |
 2749|      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)
  |  |  ------------------
  ------------------
 2750|     12|       NULL != f;
  ------------------
  |  Branch (2750:8): [True: 12, False: 0]
  ------------------
 2751|      8|       f = mhd_DLINKEDL_GET_NEXT (f, fields))
  ------------------
  |  |  377|      8|#define mhd_DLINKEDL_GET_NEXT(p_obj, links_name) ((p_obj)->links_name.next)
  ------------------
 2752|     12|  {
 2753|     12|    if (MHD_VK_HEADER != f->field.kind)
  ------------------
  |  Branch (2753:9): [True: 0, False: 12]
  ------------------
 2754|      0|      continue;
 2755|       |
 2756|       |    /* "Host:" */
 2757|     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]
  |  |  ------------------
  ------------------
 2758|     12|                                     f->field.nv.name.cstr,
 2759|     12|                                     f->field.nv.name.len))
 2760|      4|    {
 2761|      4|      if ((has_host)
  ------------------
  |  Branch (2761:11): [True: 0, False: 4]
  ------------------
 2762|      0|          && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2762:14): [True: 0, False: 0]
  ------------------
 2763|      0|      {
 2764|      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)
  ------------------
 2765|      0|                     "Received request with more than one 'Host' header.");
 2766|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2767|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2768|      0|                                       ERR_RSP_REQUEST_HAS_SEVERAL_HOSTS);
 2769|      0|        return;
 2770|      0|      }
 2771|      4|      if ((0u == f->field.nv.value.len)
  ------------------
  |  Branch (2771:11): [True: 0, False: 4]
  ------------------
 2772|      0|          && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2772:14): [True: 0, False: 0]
  ------------------
 2773|      0|      {
 2774|      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)
  ------------------
 2775|      0|                     "Received request with empty 'Host' header.");
 2776|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2777|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2778|      0|                                       ERR_RSP_REQUEST_HAS_MALFORMED_HOST);
 2779|      0|        return;
 2780|      0|      }
 2781|      4|      has_host = true;
 2782|      4|      continue;
 2783|      4|    }
 2784|       |
 2785|       |    /* "Content-Length:" */
 2786|      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]
  |  |  ------------------
  ------------------
 2787|      8|                                     f->field.nv.name.cstr,
 2788|      8|                                     f->field.nv.name.len))
 2789|      4|    {
 2790|      4|      size_t num_digits;
 2791|      4|      uint_fast64_t cntn_size;
 2792|       |
 2793|      4|      num_digits = mhd_str_to_uint64_n (f->field.nv.value.cstr,
 2794|      4|                                        f->field.nv.value.len,
 2795|      4|                                        &cntn_size);
 2796|      4|      if (((0 == num_digits)
  ------------------
  |  Branch (2796:12): [True: 0, False: 4]
  ------------------
 2797|      0|           && (0 != f->field.nv.value.len)
  ------------------
  |  Branch (2797:15): [True: 0, False: 0]
  ------------------
 2798|      0|           && ('9' >= f->field.nv.value.cstr[0])
  ------------------
  |  Branch (2798:15): [True: 0, False: 0]
  ------------------
 2799|      0|           && ('0' <= f->field.nv.value.cstr[0]))
  ------------------
  |  Branch (2799:15): [True: 0, False: 0]
  ------------------
 2800|      4|          || (MHD_SIZE_UNKNOWN == c->rq.cntn.cntn_size))
  ------------------
  |  |  302|      4|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
  |  Branch (2800:14): [True: 4, False: 0]
  ------------------
 2801|      4|      {
 2802|      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)
  ------------------
 2803|      4|                     "Too large value of 'Content-Length' header. " \
 2804|      4|                     "Closing connection.");
 2805|      4|        mhd_RESPOND_WITH_ERROR_STATIC (c, \
  ------------------
  |  |   83|      4|          respond_with_error_len ((c), (code), \
  |  |   84|      4|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      4|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      4|                                  0, NULL)
  ------------------
 2806|      4|                                       MHD_HTTP_STATUS_CONTENT_TOO_LARGE, \
 2807|      4|                                       ERR_RSP_REQUEST_CONTENTLENGTH_TOOLARGE);
 2808|      4|        return;
 2809|      4|      }
 2810|      0|      else if ((f->field.nv.value.len != num_digits)
  ------------------
  |  Branch (2810:16): [True: 0, False: 0]
  ------------------
 2811|      0|               || (0 == num_digits))
  ------------------
  |  Branch (2811:19): [True: 0, False: 0]
  ------------------
 2812|      0|      {
 2813|      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)
  ------------------
 2814|      0|                     "Failed to parse 'Content-Length' header. " \
 2815|      0|                     "Closing connection.");
 2816|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c, \
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2817|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST, \
 2818|      0|                                       ERR_RSP_REQUEST_CONTENTLENGTH_MALFORMED);
 2819|      0|        return;
 2820|      0|      }
 2821|       |
 2822|      0|      if (has_cntnlen)
  ------------------
  |  Branch (2822:11): [True: 0, False: 0]
  ------------------
 2823|      0|      {
 2824|      0|        bool send_err;
 2825|      0|        send_err = false;
 2826|      0|        if (c->rq.cntn.cntn_size == cntn_size)
  ------------------
  |  Branch (2826:13): [True: 0, False: 0]
  ------------------
 2827|      0|        {
 2828|      0|          if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2828:15): [True: 0, False: 0]
  ------------------
 2829|      0|          {
 2830|      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)
  ------------------
 2831|      0|                         "Received request with more than one " \
 2832|      0|                         "'Content-Length' header with the same value.");
 2833|      0|            send_err = true;
 2834|      0|          }
 2835|      0|        }
 2836|      0|        else
 2837|      0|        {
 2838|      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)
  ------------------
 2839|      0|                       "Received request with more than one " \
 2840|      0|                       "'Content-Length' header with conflicting values.");
 2841|      0|          send_err = true;
 2842|      0|        }
 2843|       |
 2844|      0|        if (send_err)
  ------------------
  |  Branch (2844:13): [True: 0, False: 0]
  ------------------
 2845|      0|        {
 2846|      0|          mhd_RESPOND_WITH_ERROR_STATIC ( \
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2847|      0|            c, \
 2848|      0|            MHD_HTTP_STATUS_BAD_REQUEST, \
 2849|      0|            ERR_RSP_REQUEST_CONTENTLENGTH_SEVERAL);
 2850|      0|          return;
 2851|      0|        }
 2852|      0|      }
 2853|      0|      mhd_assert ((0 == c->rq.cntn.cntn_size) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2854|      0|                  || (c->rq.cntn.cntn_size == cntn_size));
 2855|      0|      c->rq.cntn.cntn_size = cntn_size;
 2856|      0|      has_cntnlen = true;
 2857|      0|      continue;
 2858|      0|    }
 2859|       |
 2860|       |    /* "Connection:" */
 2861|      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]
  |  |  ------------------
  ------------------
 2862|      4|                                     f->field.nv.name.cstr,
 2863|      4|                                     f->field.nv.name.len))
 2864|      0|    {
 2865|      0|      if (mhd_str_has_token_caseless (f->field.nv.value.cstr, // TODO: compare as size string
  ------------------
  |  Branch (2865:11): [True: 0, False: 0]
  ------------------
 2866|      0|                                      "close",
 2867|      0|                                      mhd_SSTR_LEN ("close")))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
 2868|      0|      {
 2869|      0|        mhd_assert (mhd_CONN_MUST_UPGRADE != c->conn_reuse);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2870|      0|        c->conn_reuse = mhd_CONN_MUST_CLOSE;
 2871|      0|      }
 2872|      0|      else if ((MHD_HTTP_VERSION_1_0 == c->rq.http_ver)
  ------------------
  |  Branch (2872:16): [True: 0, False: 0]
  ------------------
 2873|      0|               && (mhd_CONN_MUST_CLOSE != c->conn_reuse))
  ------------------
  |  Branch (2873:19): [True: 0, False: 0]
  ------------------
 2874|      0|      {
 2875|      0|        if (mhd_str_has_token_caseless (f->field.nv.value.cstr,  // TODO: compare as size string
  ------------------
  |  Branch (2875:13): [True: 0, False: 0]
  ------------------
 2876|      0|                                        "keep-alive",
 2877|      0|                                        mhd_SSTR_LEN ("keep-alive")))
  ------------------
  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  ------------------
 2878|      0|          has_keepalive = true;
 2879|      0|      }
 2880|       |
 2881|      0|      continue;
 2882|      0|    }
 2883|       |
 2884|       |    /* "Transfer-Encoding:" */
 2885|      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]
  |  |  ------------------
  ------------------
 2886|      4|                                     f->field.nv.name.cstr,
 2887|      4|                                     f->field.nv.name.len))
 2888|      4|    {
 2889|      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]
  |  |  ------------------
  ------------------
 2890|      4|                                       f->field.nv.value.cstr,
 2891|      4|                                       f->field.nv.value.len))
 2892|      4|      {
 2893|      4|        c->rq.have_chunked_upload = true;
 2894|      4|        c->rq.cntn.cntn_size = MHD_SIZE_UNKNOWN;
  ------------------
  |  |  302|      4|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
 2895|      4|      }
 2896|      0|      else
 2897|      0|      {
 2898|      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)
  ------------------
 2899|      0|                     "The 'Transfer-Encoding' used in request is " \
 2900|      0|                     "unsupported or invalid.");
 2901|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2902|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 2903|      0|                                       ERR_RSP_UNSUPPORTED_TR_ENCODING);
 2904|      0|        return;
 2905|      0|      }
 2906|      4|      has_trenc = true;
 2907|      4|      continue;
 2908|      4|    }
 2909|       |
 2910|      0|#ifdef MHD_SUPPORT_COOKIES
 2911|       |    /* "Cookie:" */
 2912|      0|    if ((!c->daemon->req_cfg.disable_cookies)
  ------------------
  |  Branch (2912:9): [True: 0, False: 0]
  ------------------
 2913|      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]
  |  |  ------------------
  ------------------
 2914|      0|                                        f->field.nv.name.cstr,
 2915|      0|                                        f->field.nv.name.len))
 2916|      0|    {
 2917|      0|      if (MHD_PARSE_COOKIE_NO_MEMORY ==
  ------------------
  |  Branch (2917:11): [True: 0, False: 0]
  ------------------
 2918|      0|          parse_cookie_header (c,
 2919|      0|                               &(f->field.nv.value)))
 2920|      0|      {
 2921|      0|        handle_req_cookie_no_space (c);
 2922|      0|        return;
 2923|      0|      }
 2924|      0|      continue;
 2925|      0|    }
 2926|      0|#endif /* MHD_SUPPORT_COOKIES */
 2927|       |
 2928|       |    /* "Expect: 100-continue" */
 2929|      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]
  |  |  ------------------
  ------------------
 2930|      0|                                     f->field.nv.name.cstr,
 2931|      0|                                     f->field.nv.name.len))
 2932|      0|    {
 2933|      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]
  |  |  ------------------
  ------------------
 2934|      0|                                       f->field.nv.value.cstr,
 2935|      0|                                       f->field.nv.value.len))
 2936|      0|        c->rq.have_expect_100 = true;
 2937|      0|      else
 2938|      0|      {
 2939|      0|        if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|        {
 2941|      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)
  ------------------
 2942|      0|                       "The 'Expect' header value used in request is " \
 2943|      0|                       "unsupported or invalid.");
 2944|      0|          mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2945|      0|                                         MHD_HTTP_STATUS_EXPECTATION_FAILED,
 2946|      0|                                         ERR_RSP_UNSUPPORTED_EXPECT_HDR_VALUE);
 2947|      0|          return;
 2948|      0|        }
 2949|      0|      }
 2950|      0|      continue;
 2951|      0|    }
 2952|      0|  }
 2953|       |
 2954|      0|  c->rq.cntn.cntn_present = (has_trenc || has_cntnlen);
  ------------------
  |  Branch (2954:30): [True: 0, False: 0]
  |  Branch (2954:43): [True: 0, False: 0]
  ------------------
 2955|      0|  if (has_trenc && has_cntnlen)
  ------------------
  |  Branch (2955:7): [True: 0, False: 0]
  |  Branch (2955:20): [True: 0, False: 0]
  ------------------
 2956|      0|  {
 2957|      0|    if (0 < c->daemon->req_cfg.strictness)
  ------------------
  |  Branch (2957:9): [True: 0, False: 0]
  ------------------
 2958|      0|    {
 2959|      0|      mhd_RESPOND_WITH_ERROR_STATIC ( \
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2960|      0|        c, \
 2961|      0|        MHD_HTTP_STATUS_BAD_REQUEST, \
 2962|      0|        ERR_RSP_REQUEST_CNTNLENGTH_WITH_TR_ENCODING);
 2963|      0|      return;
 2964|      0|    }
 2965|       |    /* Must close connection after reply to prevent potential attack */
 2966|      0|    c->conn_reuse = mhd_CONN_MUST_CLOSE;
 2967|      0|    c->rq.cntn.cntn_size = MHD_SIZE_UNKNOWN;
  ------------------
  |  |  302|      0|#  define MHD_SIZE_UNKNOWN UINT64_MAX
  ------------------
 2968|      0|    mhd_assert (c->rq.have_chunked_upload);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 2969|      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)
  ------------------
 2970|      0|                 "The 'Content-Length' request header is ignored " \
 2971|      0|                 "as chunked 'Transfer-Encoding' is used " \
 2972|      0|                 "for this request.");
 2973|      0|  }
 2974|       |
 2975|      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]
  |  |  ------------------
  ------------------
 2976|      0|  {
 2977|      0|    if ((!has_host)
  ------------------
  |  Branch (2977:9): [True: 0, False: 0]
  ------------------
 2978|      0|        && (-3 < c->daemon->req_cfg.strictness))
  ------------------
  |  Branch (2978:12): [True: 0, False: 0]
  ------------------
 2979|      0|    {
 2980|      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)
  ------------------
 2981|      0|                   "Received HTTP/1.1 request without 'Host' header.");
 2982|      0|      mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 2983|      0|                                     MHD_HTTP_STATUS_BAD_REQUEST,
 2984|      0|                                     ERR_RSP_REQUEST_LACKS_HOST);
 2985|      0|      return;
 2986|      0|    }
 2987|      0|  }
 2988|      0|  else
 2989|      0|  {
 2990|      0|    if (!has_keepalive)
  ------------------
  |  Branch (2990:9): [True: 0, False: 0]
  ------------------
 2991|      0|      c->conn_reuse = mhd_CONN_MUST_CLOSE; /* Do not re-use HTTP/1.0 connection by default */
 2992|      0|    if (has_trenc)
  ------------------
  |  Branch (2992:9): [True: 0, False: 0]
  ------------------
 2993|      0|      c->conn_reuse = mhd_CONN_MUST_CLOSE; /* Framing could be incorrect */
 2994|      0|  }
 2995|       |
 2996|      0|  c->stage = mhd_HTTP_STAGE_HEADERS_PROCESSED;
 2997|      0|  return;
 2998|      0|}
_Z36mhd_stream_process_req_recv_finishedP14MHD_Connection:
 3797|      6|{
 3798|      6|  if (NULL != c->rq.cntn.lbuf.data)
  ------------------
  |  Branch (3798:7): [True: 2, False: 4]
  ------------------
 3799|      2|    mhd_daemon_free_lbuf (c->daemon, &(c->rq.cntn.lbuf));
 3800|      6|  c->rq.cntn.lbuf.data = NULL;
 3801|      6|  if (c->rq.cntn.cntn_size != c->rq.cntn.proc_size)
  ------------------
  |  Branch (3801:7): [True: 4, False: 2]
  ------------------
 3802|      4|    c->discard_request = true;
 3803|      6|  mhd_assert (NULL != c->rp.response);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 3804|      6|  c->stage = mhd_HTTP_STAGE_START_REPLY;
 3805|      6|  return true;
 3806|      6|}
stream_process_request.c:_ZL22get_request_line_innerP14MHD_Connection:
  726|      6|{
  727|      6|  size_t p; /**< The current processing position */
  728|      6|  const int discp_lvl = c->daemon->req_cfg.strictness;
  729|       |  /* Allow to skip one or more empty lines before the request line.
  730|       |     RFC 9112, section 2.2 */
  731|      6|  const bool skip_empty_lines = (1 >= discp_lvl);
  732|       |  /* Allow to skip more then one empty line before the request line.
  733|       |     RFC 9112, section 2.2 */
  734|      6|  const bool skip_several_empty_lines = (skip_empty_lines && (0 >= discp_lvl));
  ------------------
  |  Branch (734:42): [True: 5, False: 1]
  |  Branch (734:62): [True: 1, False: 4]
  ------------------
  735|       |  /* Allow to skip unlimited number of empty lines before the request line.
  736|       |     RFC 9112, section 2.2 */
  737|      6|  const bool skip_unlimited_empty_lines =
  738|      6|    (skip_empty_lines && (-3 >= discp_lvl));
  ------------------
  |  Branch (738:6): [True: 5, False: 1]
  |  Branch (738:26): [True: 0, False: 5]
  ------------------
  739|       |  /* Treat bare LF as the end of the line.
  740|       |     RFC 9112, section 2.2 */
  741|      6|  const bool bare_lf_as_crlf = mhd_ALLOW_BARE_LF_AS_CRLF (discp_lvl);
  ------------------
  |  | 1327|      6|#define mhd_ALLOW_BARE_LF_AS_CRLF(strictness) (0 >= strictness)
  ------------------
  742|       |  /* Treat tab as whitespace delimiter.
  743|       |     RFC 9112, section 3 */
  744|      6|  const bool tab_as_wsp = (0 >= discp_lvl);
  745|       |  /* Treat VT (vertical tab) and FF (form feed) as whitespace delimiters.
  746|       |     RFC 9112, section 3 */
  747|      6|  const bool other_wsp_as_wsp = (-1 >= discp_lvl);
  748|       |  /* Treat continuous whitespace block as a single space.
  749|       |     RFC 9112, section 3 */
  750|      6|  const bool wsp_blocks = (-1 >= discp_lvl);
  751|       |  /* Parse whitespace in URI, special parsing of the request line.
  752|       |     RFC 9112, section 3.2 */
  753|      6|  const bool wsp_in_uri = (0 >= discp_lvl);
  754|       |  /* Keep whitespace in URI, give app URI with whitespace instead of
  755|       |     automatic redirect to fixed URI.
  756|       |     Violates RFC 9112, section 3.2 */
  757|      6|  const bool wsp_in_uri_keep = (-2 >= discp_lvl);
  758|       |  /* Keep bare CR character as is.
  759|       |     Violates RFC 9112, section 2.2 */
  760|      6|  const bool bare_cr_keep = (wsp_in_uri_keep && (-3 >= discp_lvl));
  ------------------
  |  Branch (760:30): [True: 0, False: 6]
  |  Branch (760:49): [True: 0, False: 0]
  ------------------
  761|       |  /* Treat bare CR as space; replace it with space before processing.
  762|       |     RFC 9112, section 2.2 */
  763|      6|  const bool bare_cr_as_sp = ((!bare_cr_keep) && (-1 >= discp_lvl));
  ------------------
  |  Branch (763:31): [True: 6, False: 0]
  |  Branch (763:50): [True: 0, False: 6]
  ------------------
  764|       |
  765|      6|  mhd_assert (mhd_HTTP_STAGE_INIT == c->stage \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  766|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  767|      6|  mhd_assert (NULL == c->rq.method.cstr \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  768|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  769|      6|  mhd_assert (mhd_HTTP_METHOD_NO_METHOD == c->rq.http_mthd \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  770|      6|              || mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  771|      6|  mhd_assert (mhd_HTTP_METHOD_NO_METHOD == c->rq.http_mthd \
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  772|      6|              || 0 != c->rq.hdrs.rq_line.proc_pos);
  773|       |
  774|      6|  if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (774:7): [True: 0, False: 6]
  ------------------
  775|      0|  {
  776|      0|    mhd_assert (mhd_HTTP_STAGE_INIT == c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  777|      0|    return false; /* No data to process */
  778|      0|  }
  779|      6|  p = c->rq.hdrs.rq_line.proc_pos;
  780|      6|  mhd_assert (p <= c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  781|       |
  782|       |  /* Skip empty lines, if any (and if allowed) */
  783|       |  /* See RFC 9112, section 2.2 */
  784|      6|  if ((0 == p)
  ------------------
  |  Branch (784:7): [True: 6, False: 0]
  ------------------
  785|      6|      && (skip_empty_lines))
  ------------------
  |  Branch (785:10): [True: 5, False: 1]
  ------------------
  786|      5|  {
  787|       |    /* Skip empty lines before the request line.
  788|       |       See RFC 9112, section 2.2 */
  789|      5|    bool is_empty_line;
  790|      5|    mhd_assert (mhd_HTTP_STAGE_INIT == c->stage);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  791|      5|    mhd_assert (0 == c->rq.method.len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  792|      5|    mhd_assert (NULL == c->rq.method.cstr);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  793|      5|    mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  794|      5|    mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  795|      5|    mhd_assert (NULL == c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  796|      5|    mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  797|      5|    mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  798|      5|    do
  799|      5|    {
  800|      5|      is_empty_line = false;
  801|      5|      if ('\r' == c->read_buffer[0])
  ------------------
  |  Branch (801:11): [True: 0, False: 5]
  ------------------
  802|      0|      {
  803|      0|        if (1 == c->read_buffer_offset)
  ------------------
  |  Branch (803:13): [True: 0, False: 0]
  ------------------
  804|      0|          return false; /* Not enough data yet */
  805|      0|        if ('\n' == c->read_buffer[1])
  ------------------
  |  Branch (805:13): [True: 0, False: 0]
  ------------------
  806|      0|        {
  807|      0|          is_empty_line = true;
  808|      0|          c->read_buffer += 2;
  809|      0|          c->read_buffer_size -= 2;
  810|      0|          c->read_buffer_offset -= 2;
  811|      0|          c->rq.hdrs.rq_line.skipped_empty_lines++;
  812|      0|        }
  813|      0|      }
  814|      5|      else if (('\n' == c->read_buffer[0])
  ------------------
  |  Branch (814:16): [True: 0, False: 5]
  ------------------
  815|      0|               && (bare_lf_as_crlf))
  ------------------
  |  Branch (815:19): [True: 0, False: 0]
  ------------------
  816|      0|      {
  817|      0|        is_empty_line = true;
  818|      0|        c->read_buffer += 1;
  819|      0|        c->read_buffer_size -= 1;
  820|      0|        c->read_buffer_offset -= 1;
  821|      0|        c->rq.hdrs.rq_line.skipped_empty_lines++;
  822|      0|      }
  823|      5|      if (is_empty_line)
  ------------------
  |  Branch (823:11): [True: 0, False: 5]
  ------------------
  824|      0|      {
  825|      0|        if ((!skip_unlimited_empty_lines)
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|            && (((unsigned int)((skip_several_empty_lines) ?
  ------------------
  |  Branch (826:16): [True: 0, False: 0]
  |  Branch (826:33): [True: 0, False: 0]
  ------------------
  827|      0|                                MHD_MAX_EMPTY_LINES_SKIP : 1)) <
  ------------------
  |  |  713|      0|#  define MHD_MAX_EMPTY_LINES_SKIP 1024
  ------------------
  828|      0|                c->rq.hdrs.rq_line.skipped_empty_lines))
  829|      0|        {
  830|      0|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  831|      0|                            "Too many meaningless extra empty lines " \
  832|      0|                            "received before the request.");
  833|      0|          return true; /* Process connection closure */
  834|      0|        }
  835|      0|        if (0 == c->read_buffer_offset)
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|          return false;  /* No more data to process */
  837|      0|      }
  838|      5|    } while (is_empty_line);
  ------------------
  |  Branch (838:14): [True: 0, False: 5]
  ------------------
  839|      5|  }
  840|       |  /* All empty lines are skipped */
  841|       |
  842|      6|  c->stage = mhd_HTTP_STAGE_REQ_LINE_RECEIVING;
  843|       |  /* Read and parse the request line */
  844|      6|  mhd_assert (1 <= c->read_buffer_offset);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  845|       |
  846|    134|  while (p < c->read_buffer_offset)
  ------------------
  |  Branch (846:10): [True: 134, False: 0]
  ------------------
  847|    134|  {
  848|    134|    char *const restrict read_buffer = c->read_buffer;
  849|    134|    const char chr = read_buffer[p];
  850|    134|    bool end_of_line;
  851|       |    /*
  852|       |       The processing logic is different depending on the configured strictness:
  853|       |
  854|       |       When whitespace BLOCKS are NOT ALLOWED, the end of the whitespace is
  855|       |       processed BEFORE processing of the current character.
  856|       |       When whitespace BLOCKS are ALLOWED, the end of the whitespace is
  857|       |       processed AFTER processing of the current character.
  858|       |
  859|       |       When space char in the URI is ALLOWED, the delimiter between the URI and
  860|       |       the HTTP version string is processed only at the END of the line.
  861|       |       When space in the URI is NOT ALLOWED, the delimiter between the URI and
  862|       |       the HTTP version string is processed as soon as the FIRST whitespace is
  863|       |       found after URI start.
  864|       |     */
  865|       |
  866|    134|    end_of_line = false;
  867|       |
  868|    134|    mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_end) \
  ------------------
  |  |   66|    134|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  869|    134|                || (c->rq.hdrs.rq_line.last_ws_end > \
  870|    134|                    c->rq.hdrs.rq_line.last_ws_start));
  871|    134|    mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_start) \
  ------------------
  |  |   66|    134|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  872|    134|                || (0 != c->rq.hdrs.rq_line.last_ws_end));
  873|       |
  874|       |    /* Check for the end of the line */
  875|    134|    if ('\r' == chr)
  ------------------
  |  Branch (875:9): [True: 3, False: 131]
  ------------------
  876|      3|    {
  877|      3|      if (p + 1 == c->read_buffer_offset)
  ------------------
  |  Branch (877:11): [True: 0, False: 3]
  ------------------
  878|      0|      {
  879|      0|        c->rq.hdrs.rq_line.proc_pos = p;
  880|      0|        return false; /* Not enough data yet */
  881|      0|      }
  882|      3|      else if ('\n' == read_buffer[p + 1])
  ------------------
  |  Branch (882:16): [True: 1, False: 2]
  ------------------
  883|      1|        end_of_line = true;
  884|      2|      else
  885|      2|      {
  886|       |        /* Bare CR alone */
  887|       |        /* Must be rejected or replaced with space char.
  888|       |           See RFC 9112, section 2.2 */
  889|      2|        if (bare_cr_as_sp)
  ------------------
  |  Branch (889:13): [True: 0, False: 2]
  ------------------
  890|      0|        {
  891|      0|          read_buffer[p] = ' ';
  892|      0|          c->rq.num_cr_sp_replaced++;
  893|      0|          continue; /* Re-start processing of the current character */
  894|      0|        }
  895|      2|        else if (!bare_cr_keep)
  ------------------
  |  Branch (895:18): [True: 2, False: 0]
  ------------------
  896|      2|        {
  897|       |          /* A quick simple check whether this line looks like an HTTP request */
  898|      2|          if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (898:15): [True: 2, False: 0]
  ------------------
  899|      2|              && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (899:18): [True: 0, False: 2]
  ------------------
  900|      0|          {
  901|      0|            mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
  902|      0|                                           MHD_HTTP_STATUS_BAD_REQUEST,
  903|      0|                                           ERR_RSP_BARE_CR_IN_HEADER);
  904|      0|          }
  905|      2|          else
  906|      2|            mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      2|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  907|      2|                              "Bare CR characters are not allowed " \
  908|      2|                              "in the request line.");
  909|       |
  910|      2|          return true; /* Error in the request */
  911|      2|        }
  912|      2|      }
  913|      3|    }
  914|    131|    else if ('\n' == chr)
  ------------------
  |  Branch (914:14): [True: 3, False: 128]
  ------------------
  915|      3|    {
  916|       |      /* Bare LF may be recognised as a line delimiter.
  917|       |         See RFC 9112, section 2.2 */
  918|      3|      if (bare_lf_as_crlf)
  ------------------
  |  Branch (918:11): [True: 0, False: 3]
  ------------------
  919|      0|        end_of_line = true;
  920|      3|      else
  921|      3|      {
  922|       |        /* While RFC does not enforce error for bare LF character,
  923|       |           if this char is not treated as a line delimiter, it should be
  924|       |           rejected to avoid any security weakness due to request smuggling. */
  925|       |        /* A quick simple check whether this line looks like an HTTP request */
  926|      3|        if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (926:13): [True: 3, False: 0]
  ------------------
  927|      3|            && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (927:16): [True: 2, False: 1]
  ------------------
  928|      2|        {
  929|      2|          mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      2|          respond_with_error_len ((c), (code), \
  |  |   84|      2|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      2|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      2|                                  0, NULL)
  ------------------
  930|      2|                                         MHD_HTTP_STATUS_BAD_REQUEST,
  931|      2|                                         ERR_RSP_BARE_LF_IN_HEADER);
  932|      2|        }
  933|      1|        else
  934|      1|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      1|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
  935|      3|                            "Bare LF characters are not allowed " \
  936|      3|                            "in the request line.");
  937|      3|        return true; /* Error in the request */
  938|      3|      }
  939|      3|    }
  940|       |
  941|    129|    if (end_of_line)
  ------------------
  |  Branch (941:9): [True: 1, False: 128]
  ------------------
  942|      1|    {
  943|       |      /* Handle the end of the request line */
  944|       |
  945|      1|      if (NULL != c->rq.method.cstr)
  ------------------
  |  Branch (945:11): [True: 1, False: 0]
  ------------------
  946|      1|      {
  947|      1|        if (wsp_in_uri)
  ------------------
  |  Branch (947:13): [True: 1, False: 0]
  ------------------
  948|      1|        {
  949|       |          /* The end of the URI and the start of the HTTP version string
  950|       |             should be determined now. */
  951|      1|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  952|      1|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  953|      1|          if (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (953:15): [True: 1, False: 0]
  ------------------
  954|      1|          {
  955|       |            /* Determine the end and the length of the URI */
  956|      1|            if (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (956:17): [True: 1, False: 0]
  ------------------
  957|      1|            {
  958|      1|              read_buffer[c->rq.hdrs.rq_line.last_ws_start] = 0;  /* Zero terminate the URI */
  959|      1|              c->rq.req_target_len =
  960|      1|                c->rq.hdrs.rq_line.last_ws_start
  961|      1|                - (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer);
  962|      1|            }
  963|      0|            else if ((c->rq.hdrs.rq_line.last_ws_start + 1 <
  ------------------
  |  Branch (963:22): [True: 0, False: 0]
  ------------------
  964|      0|                      c->rq.hdrs.rq_line.last_ws_end)
  965|      0|                     && (HTTP_VER_LEN == (p - c->rq.hdrs.rq_line.last_ws_end)))
  ------------------
  |  |  479|      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 (965:25): [True: 0, False: 0]
  ------------------
  966|      0|            {
  967|       |              /* Found only HTTP method and HTTP version and more than one
  968|       |                 whitespace between them. Assume zero-length URI. */
  969|      0|              mhd_assert (wsp_blocks);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  970|      0|              c->rq.hdrs.rq_line.last_ws_start++;
  971|      0|              read_buffer[c->rq.hdrs.rq_line.last_ws_start] = 0; /* Zero terminate the URI */
  972|      0|              c->rq.hdrs.rq_line.rq_tgt =
  973|      0|                read_buffer + c->rq.hdrs.rq_line.last_ws_start;
  974|      0|              c->rq.req_target_len = 0;
  975|      0|              c->rq.hdrs.rq_line.num_ws_in_uri = 0;
  976|      0|              c->rq.hdrs.rq_line.rq_tgt_qmark = NULL;
  977|      0|            }
  978|       |            /* Determine the start of the HTTP version string */
  979|      1|            if (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (979:17): [True: 1, False: 0]
  ------------------
  980|      1|            {
  981|      1|              c->rq.version = read_buffer + c->rq.hdrs.rq_line.last_ws_end;
  982|      1|            }
  983|      1|          }
  984|      1|        }
  985|      0|        else
  986|      0|        {
  987|       |          /* The end of the URI and the start of the HTTP version string
  988|       |             should be already known. */
  989|      0|          if ((NULL == c->rq.version)
  ------------------
  |  Branch (989:15): [True: 0, False: 0]
  ------------------
  990|      0|              && (NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (990:18): [True: 0, False: 0]
  ------------------
  991|      0|              && (HTTP_VER_LEN == p - (size_t)(c->rq.hdrs.rq_line.rq_tgt
  ------------------
  |  |  479|      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 (991:18): [True: 0, False: 0]
  ------------------
  992|      0|                                               - read_buffer))
  993|      0|              && (0 != read_buffer[(size_t)
  ------------------
  |  Branch (993:18): [True: 0, False: 0]
  ------------------
  994|      0|                                   (c->rq.hdrs.rq_line.rq_tgt
  995|      0|                                    - read_buffer) - 1]))
  996|      0|          {
  997|       |            /* Found only HTTP method and HTTP version and more than one
  998|       |               whitespace between them. Assume zero-length URI. */
  999|      0|            size_t uri_pos;
 1000|      0|            mhd_assert (wsp_blocks);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1001|      0|            mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1002|      0|            uri_pos = (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer) - 1;
 1003|      0|            mhd_assert (uri_pos < p);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1004|      0|            c->rq.version = c->rq.hdrs.rq_line.rq_tgt;
 1005|      0|            read_buffer[uri_pos] = 0;  /* Zero terminate the URI */
 1006|      0|            c->rq.hdrs.rq_line.rq_tgt = read_buffer + uri_pos;
 1007|      0|            c->rq.req_target_len = 0;
 1008|      0|            c->rq.hdrs.rq_line.num_ws_in_uri = 0;
 1009|      0|            c->rq.hdrs.rq_line.rq_tgt_qmark = NULL;
 1010|      0|          }
 1011|      0|        }
 1012|       |
 1013|      1|        if (NULL != c->rq.version)
  ------------------
  |  Branch (1013:13): [True: 1, False: 0]
  ------------------
 1014|      1|        {
 1015|      1|          mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1016|      1|          if (!process_http_version (c,
  ------------------
  |  Branch (1016:15): [True: 0, False: 1]
  ------------------
 1017|      1|                                     p - (size_t)(c->rq.version
 1018|      1|                                                  - read_buffer),
 1019|      1|                                     c->rq.version))
 1020|      0|          {
 1021|      0|            mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING < c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1022|      0|            return true; /* Unsupported / broken HTTP version */
 1023|      0|          }
 1024|      1|          read_buffer[p] = 0; /* Zero terminate the HTTP version strings */
 1025|      1|          if ('\r' == chr)
  ------------------
  |  Branch (1025:15): [True: 1, False: 0]
  ------------------
 1026|      1|          {
 1027|      1|            p++; /* Consume CR */
 1028|      1|            mhd_assert (p < c->read_buffer_offset); /* The next character has been already checked */
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1029|      1|          }
 1030|      1|          p++; /* Consume LF */
 1031|      1|          c->read_buffer += p;
 1032|      1|          c->read_buffer_size -= p;
 1033|      1|          c->read_buffer_offset -= p;
 1034|      1|          mhd_assert (c->rq.hdrs.rq_line.num_ws_in_uri <= \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1035|      1|                      c->rq.req_target_len);
 1036|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1037|      1|                      || (0 != c->rq.req_target_len));
 1038|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1039|      1|                      || ((size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark \
 1040|      1|                                   - c->rq.hdrs.rq_line.rq_tgt) < \
 1041|      1|                          c->rq.req_target_len));
 1042|      1|          mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1043|      1|                      || (c->rq.hdrs.rq_line.rq_tgt_qmark >= \
 1044|      1|                          c->rq.hdrs.rq_line.rq_tgt));
 1045|      1|          return true; /* The request line is successfully parsed */
 1046|      1|        }
 1047|      1|      }
 1048|       |      /* Error in the request line */
 1049|       |
 1050|       |      /* A quick simple check whether this line looks like an HTTP request */
 1051|      0|      if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (1051:11): [True: 0, False: 0]
  ------------------
 1052|      0|          && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (1052:14): [True: 0, False: 0]
  ------------------
 1053|      0|      {
 1054|      0|        mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 1055|      0|                                       MHD_HTTP_STATUS_BAD_REQUEST,
 1056|      0|                                       ERR_RSP_REQUEST_MALFORMED);
 1057|      0|      }
 1058|      0|      else
 1059|      0|        mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1060|      0|                          "The request line is malformed.");
 1061|       |
 1062|      0|      return true;
 1063|      1|    }
 1064|       |
 1065|       |    /* Process possible end of the previously found whitespace delimiter */
 1066|    128|    if ((!wsp_blocks)
  ------------------
  |  Branch (1066:9): [True: 128, False: 0]
  ------------------
 1067|    128|        && (p == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1067:12): [True: 18, False: 110]
  ------------------
 1068|     18|        && (0 != c->rq.hdrs.rq_line.last_ws_end))
  ------------------
  |  Branch (1068:12): [True: 12, False: 6]
  ------------------
 1069|     12|    {
 1070|       |      /* Previous character was a whitespace char and whitespace blocks
 1071|       |         are not allowed. */
 1072|       |      /* The current position is the next character after
 1073|       |         a whitespace delimiter */
 1074|     12|      if (NULL == c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (1074:11): [True: 6, False: 6]
  ------------------
 1075|      6|      {
 1076|       |        /* The current position is the start of the URI */
 1077|      6|        mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1078|      6|        mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1079|      6|        c->rq.hdrs.rq_line.rq_tgt = read_buffer + p;
 1080|       |        /* Reset the whitespace marker */
 1081|      6|        c->rq.hdrs.rq_line.last_ws_start = 0;
 1082|      6|        c->rq.hdrs.rq_line.last_ws_end = 0;
 1083|      6|      }
 1084|      6|      else
 1085|      6|      {
 1086|       |        /* It was a whitespace after the start of the URI */
 1087|      6|        if (!wsp_in_uri)
  ------------------
  |  Branch (1087:13): [True: 5, False: 1]
  ------------------
 1088|      5|        {
 1089|      5|          mhd_assert ((0 != c->rq.req_target_len) \
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1090|      5|                      || (c->rq.hdrs.rq_line.rq_tgt + 1 == read_buffer + p));
 1091|      5|          mhd_assert (NULL == c->rq.version); /* Too many whitespaces? This error is handled at whitespace start */
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1092|      5|          c->rq.version = read_buffer + p;
 1093|       |          /* Reset the whitespace marker */
 1094|      5|          c->rq.hdrs.rq_line.last_ws_start = 0;
 1095|      5|          c->rq.hdrs.rq_line.last_ws_end = 0;
 1096|      5|        }
 1097|      6|      }
 1098|     12|    }
 1099|       |
 1100|       |    /* Process the current character.
 1101|       |       Is it not the end of the line.  */
 1102|    128|    if ((' ' == chr)
  ------------------
  |  Branch (1102:9): [True: 12, False: 116]
  ------------------
 1103|    116|        || (('\t' == chr) && (tab_as_wsp))
  ------------------
  |  Branch (1103:13): [True: 0, False: 116]
  |  Branch (1103:30): [True: 0, False: 0]
  ------------------
 1104|    116|        || ((other_wsp_as_wsp) && ((0xb == chr) || (0xc == chr))))
  ------------------
  |  Branch (1104:13): [True: 0, False: 116]
  |  Branch (1104:36): [True: 0, False: 0]
  |  Branch (1104:52): [True: 0, False: 0]
  ------------------
 1105|     12|    {
 1106|       |      /* A whitespace character */
 1107|     12|      if ((0 == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1107:11): [True: 12, False: 0]
  ------------------
 1108|      0|          || (p != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1108:14): [True: 0, False: 0]
  ------------------
 1109|      0|          || (!wsp_blocks))
  ------------------
  |  Branch (1109:14): [True: 0, False: 0]
  ------------------
 1110|     12|      {
 1111|       |        /* Found first whitespace char of the new whitespace block */
 1112|     12|        if (NULL == c->rq.method.cstr)
  ------------------
  |  Branch (1112:13): [True: 6, False: 6]
  ------------------
 1113|      6|        {
 1114|       |          /* Found the end of the HTTP method string */
 1115|      6|          mhd_assert (0 == c->rq.hdrs.rq_line.last_ws_start);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1116|      6|          mhd_assert (0 == c->rq.hdrs.rq_line.last_ws_end);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1117|      6|          mhd_assert (NULL == c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1118|      6|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1119|      6|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1120|      6|          if (0 == p)
  ------------------
  |  Branch (1120:15): [True: 0, False: 6]
  ------------------
 1121|      0|          {
 1122|      0|            mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1123|      0|                              "The request line starts with a whitespace.");
 1124|      0|            return true; /* Error in the request */
 1125|      0|          }
 1126|      6|          read_buffer[p] = 0; /* Zero-terminate the request method string */
 1127|      6|          c->rq.method.cstr = read_buffer;
 1128|      6|          c->rq.method.len = p;
 1129|      6|          parse_http_std_method (c);
 1130|      6|        }
 1131|      6|        else
 1132|      6|        {
 1133|       |          /* A whitespace after the start of the URI */
 1134|      6|          if (!wsp_in_uri)
  ------------------
  |  Branch (1134:15): [True: 5, False: 1]
  ------------------
 1135|      5|          {
 1136|       |            /* Whitespace in URI is not allowed to be parsed */
 1137|      5|            if (NULL == c->rq.version)
  ------------------
  |  Branch (1137:17): [True: 5, False: 0]
  ------------------
 1138|      5|            {
 1139|      5|              mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1140|       |              /* This is a delimiter between URI and HTTP version string */
 1141|      5|              read_buffer[p] = 0; /* Zero-terminate request URI string */
 1142|      5|              mhd_assert (((size_t)(c->rq.hdrs.rq_line.rq_tgt   \
  ------------------
  |  |   66|      5|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1143|      5|                                    - read_buffer)) <= p);
 1144|      5|              c->rq.req_target_len =
 1145|      5|                p - (size_t)(c->rq.hdrs.rq_line.rq_tgt - read_buffer);
 1146|      5|            }
 1147|      0|            else
 1148|      0|            {
 1149|       |              /* This is a delimiter AFTER version string */
 1150|       |
 1151|       |              /* A quick simple check whether this line looks like an HTTP request */
 1152|      0|              if ((mhd_HTTP_METHOD_GET <= c->rq.http_mthd)
  ------------------
  |  Branch (1152:19): [True: 0, False: 0]
  ------------------
 1153|      0|                  && (mhd_HTTP_METHOD_DELETE >= c->rq.http_mthd))
  ------------------
  |  Branch (1153:22): [True: 0, False: 0]
  ------------------
 1154|      0|              {
 1155|      0|                mhd_RESPOND_WITH_ERROR_STATIC (c,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 1156|      0|                                               MHD_HTTP_STATUS_BAD_REQUEST,
 1157|      0|                                               ERR_RSP_RQ_LINE_TOO_MANY_WSP);
 1158|      0|              }
 1159|      0|              else
 1160|      0|                mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1161|      0|                                  "The request line has more than "
 1162|      0|                                  "two whitespaces.");
 1163|      0|              return true; /* Error in the request */
 1164|      0|            }
 1165|      5|          }
 1166|      1|          else
 1167|      1|          {
 1168|       |            /* Whitespace in URI is allowed to be parsed */
 1169|      1|            if (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1169:17): [True: 0, False: 1]
  ------------------
 1170|      0|            {
 1171|       |              /* The whitespace after the start of the URI has been found already */
 1172|      0|              c->rq.hdrs.rq_line.num_ws_in_uri +=
 1173|      0|                c->rq.hdrs.rq_line.last_ws_end
 1174|      0|                - c->rq.hdrs.rq_line.last_ws_start;
 1175|      0|            }
 1176|      1|          }
 1177|      6|        }
 1178|     12|        c->rq.hdrs.rq_line.last_ws_start = p;
 1179|     12|        c->rq.hdrs.rq_line.last_ws_end = p + 1; /* Will be updated on the next char parsing */
 1180|     12|      }
 1181|      0|      else
 1182|      0|      {
 1183|       |        /* Continuation of the whitespace block */
 1184|      0|        mhd_assert (0 != c->rq.hdrs.rq_line.last_ws_end);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1185|      0|        mhd_assert (0 != p);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1186|      0|        c->rq.hdrs.rq_line.last_ws_end = p + 1;
 1187|      0|      }
 1188|     12|    }
 1189|    116|    else
 1190|    116|    {
 1191|       |      /* Non-whitespace char, not the end of the line */
 1192|    116|      mhd_assert ((0 == c->rq.hdrs.rq_line.last_ws_end) \
  ------------------
  |  |   66|    116|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1193|    116|                  || (c->rq.hdrs.rq_line.last_ws_end == p) \
 1194|    116|                  || wsp_in_uri);
 1195|       |
 1196|    116|      if ((p == c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1196:11): [True: 7, False: 109]
  ------------------
 1197|      7|          && (0 != c->rq.hdrs.rq_line.last_ws_end)
  ------------------
  |  Branch (1197:14): [True: 1, False: 6]
  ------------------
 1198|      1|          && (wsp_blocks))
  ------------------
  |  Branch (1198:14): [True: 0, False: 1]
  ------------------
 1199|      0|      {
 1200|       |        /* The end of the whitespace block */
 1201|      0|        if (NULL == c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (1201:13): [True: 0, False: 0]
  ------------------
 1202|      0|        {
 1203|       |          /* This is the first character of the URI */
 1204|      0|          mhd_assert (0 == c->rq.req_target_len);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1205|      0|          mhd_assert (NULL == c->rq.version);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1206|      0|          c->rq.hdrs.rq_line.rq_tgt = read_buffer + p;
 1207|       |          /* Reset the whitespace marker */
 1208|      0|          c->rq.hdrs.rq_line.last_ws_start = 0;
 1209|      0|          c->rq.hdrs.rq_line.last_ws_end = 0;
 1210|      0|        }
 1211|      0|        else
 1212|      0|        {
 1213|      0|          if (!wsp_in_uri)
  ------------------
  |  Branch (1213:15): [True: 0, False: 0]
  ------------------
 1214|      0|          {
 1215|       |            /* This is the first character of the HTTP version */
 1216|      0|            mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1217|      0|            mhd_assert ((0 != c->rq.req_target_len) \
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1218|      0|                        || (c->rq.hdrs.rq_line.rq_tgt + 1 == read_buffer + p));
 1219|      0|            mhd_assert (NULL == c->rq.version); /* Handled at whitespace start */
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1220|      0|            c->rq.version = read_buffer + p;
 1221|       |            /* Reset the whitespace marker */
 1222|      0|            c->rq.hdrs.rq_line.last_ws_start = 0;
 1223|      0|            c->rq.hdrs.rq_line.last_ws_end = 0;
 1224|      0|          }
 1225|      0|        }
 1226|      0|      }
 1227|       |
 1228|       |      /* Handle other special characters */
 1229|    116|      if ('?' == chr)
  ------------------
  |  Branch (1229:11): [True: 2, False: 114]
  ------------------
 1230|      2|      {
 1231|      2|        if ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark)
  ------------------
  |  Branch (1231:13): [True: 2, False: 0]
  ------------------
 1232|      2|            && (NULL != c->rq.hdrs.rq_line.rq_tgt))
  ------------------
  |  Branch (1232:16): [True: 2, False: 0]
  ------------------
 1233|      2|        {
 1234|      2|          c->rq.hdrs.rq_line.rq_tgt_qmark = read_buffer + p;
 1235|      2|        }
 1236|      2|      }
 1237|    114|      else if ((0xb == chr) || (0xc == chr))
  ------------------
  |  Branch (1237:16): [True: 0, False: 114]
  |  Branch (1237:32): [True: 0, False: 114]
  ------------------
 1238|      0|      {
 1239|       |        /* VT or LF characters */
 1240|      0|        mhd_assert (!other_wsp_as_wsp);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1241|      0|        if ((NULL != c->rq.hdrs.rq_line.rq_tgt)
  ------------------
  |  Branch (1241:13): [True: 0, False: 0]
  ------------------
 1242|      0|            && (NULL == c->rq.version)
  ------------------
  |  Branch (1242:16): [True: 0, False: 0]
  ------------------
 1243|      0|            && (wsp_in_uri))
  ------------------
  |  Branch (1243:16): [True: 0, False: 0]
  ------------------
 1244|      0|        {
 1245|      0|          c->rq.hdrs.rq_line.num_ws_in_uri++;
 1246|      0|        }
 1247|      0|        else
 1248|      0|        {
 1249|      0|          mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1250|      0|                            "Invalid character is in the request line.");
 1251|      0|          return true; /* Error in the request */
 1252|      0|        }
 1253|      0|      }
 1254|    114|      else if (0 == chr)
  ------------------
  |  Branch (1254:16): [True: 0, False: 114]
  ------------------
 1255|      0|      {
 1256|       |        /* NUL character */
 1257|      0|        mhd_STREAM_ABORT (c, mhd_CONN_CLOSE_CLIENT_HTTP_ERR_ABORT_CONN,
  ------------------
  |  |  333|      0|#  define mhd_STREAM_ABORT(c, r, m) (mhd_conn_start_closing ((c),(r),(m)))
  ------------------
 1258|      0|                          "The NUL character is in the request line.");
 1259|      0|        return true; /* Error in the request */
 1260|      0|      }
 1261|    116|    }
 1262|       |
 1263|    128|    p++;
 1264|    128|  }
 1265|       |
 1266|      0|  c->rq.hdrs.rq_line.proc_pos = p;
 1267|      0|  return false; /* Not enough data yet */
 1268|      6|}
stream_process_request.c:_ZL20process_http_versionP14MHD_ConnectionmPKc:
  662|      1|{
  663|      1|  enum mhd_HTTP_ProtVerParse h_ver;
  664|       |
  665|      1|  h_ver = parse_http_version (len,
  666|      1|                              http_string);
  667|      1|  if (mhd_HTTP_VER_0X == h_ver)
  ------------------
  |  Branch (667:7): [True: 0, False: 1]
  ------------------
  668|      0|  {
  669|      0|    connection->rq.http_ver = MHD_HTTP_VERSION_INVALID;
  670|      0|    mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
  671|      0|                                   MHD_HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
  672|      0|                                   ERR_RSP_REQ_HTTP_VER_IS_TOO_OLD);
  673|      0|    return false;
  674|      0|  }
  675|       |
  676|      1|  connection->rq.http_ver = (enum MHD_HTTP_ProtocolVersion)h_ver;
  677|       |
  678|      1|  switch (connection->rq.http_ver)
  679|      1|  {
  680|      0|  case MHD_HTTP_VERSION_INVALID:
  ------------------
  |  Branch (680:3): [True: 0, False: 1]
  ------------------
  681|      0|    break;
  682|      1|  case MHD_HTTP_VERSION_1_1:
  ------------------
  |  Branch (682:3): [True: 1, False: 0]
  ------------------
  683|      1|  case MHD_HTTP_VERSION_1_0:
  ------------------
  |  Branch (683:3): [True: 0, False: 1]
  ------------------
  684|      1|    return true;
  685|      0|  case MHD_HTTP_VERSION_1_2P:
  ------------------
  |  Branch (685:3): [True: 0, False: 1]
  ------------------
  686|      0|    if (MHD_PSL_VERY_STRICT > connection->daemon->req_cfg.strictness)
  ------------------
  |  Branch (686:9): [True: 0, False: 0]
  ------------------
  687|      0|      return true;
  688|      0|    break;
  689|      0|  case MHD_HTTP_VERSION_2:
  ------------------
  |  Branch (689:3): [True: 0, False: 1]
  ------------------
  690|      0|    mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
  691|      0|                                   MHD_HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
  692|      0|                                   ERR_RSP_REQ_HTTP_VER_IS_NOT_SUPPORTED);
  693|      0|    return false;
  694|      0|  case MHD_HTTP_VERSION_3:
  ------------------
  |  Branch (694:3): [True: 0, False: 1]
  ------------------
  695|      0|  case MHD_HTTP_VERSION_FUTURE:
  ------------------
  |  Branch (695:3): [True: 0, False: 1]
  ------------------
  696|      0|  default:
  ------------------
  |  Branch (696:3): [True: 0, False: 1]
  ------------------
  697|      0|    mhd_UNREACHABLE ();
  ------------------
  |  |   64|      0|#    define mhd_UNREACHABLE()           MHD_UNREACHABLE_KEYWORD
  |  |  ------------------
  |  |  |  | 1080|      0|#define MHD_UNREACHABLE_KEYWORD __builtin_unreachable()
  |  |  ------------------
  ------------------
  698|      0|    break;
  699|      1|  }
  700|       |
  701|      0|  mhd_RESPOND_WITH_ERROR_STATIC (connection,
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
  702|      0|                                 MHD_HTTP_STATUS_BAD_REQUEST,
  703|      0|                                 ERR_RSP_REQUEST_MALFORMED);
  704|      0|  return false;
  705|      1|}
stream_process_request.c:_ZL18parse_http_versionmPKc:
  612|      1|{
  613|      1|  const char *const h = http_string; /**< short alias */
  614|      1|  mhd_assert (NULL != http_string);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  615|       |
  616|       |  /* String must start with 'HTTP/d.d', case-sensitive match.
  617|       |   * See https://www.rfc-editor.org/rfc/rfc9112#name-http-version */
  618|      1|  if ((HTTP_VER_LEN == len)
  ------------------
  |  |  479|      1|#define HTTP_VER_LEN (mhd_SSTR_LEN (MHD_HTTP_VERSION_1_1_STR))
  |  |  ------------------
  |  |  |  |   54|      1|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  ------------------
  |  Branch (618:7): [True: 1, False: 0]
  ------------------
  619|      1|      && (0 == memcmp ("HTTP/", h, 5u))
  ------------------
  |  Branch (619:10): [True: 1, False: 0]
  ------------------
  620|      1|      && ('.' == h[6]))
  ------------------
  |  Branch (620:10): [True: 1, False: 0]
  ------------------
  621|      1|  {
  622|      1|    const unsigned char mj = (unsigned char)(h[5] - '0');  /**< Major number */
  623|      1|    const unsigned char mn = (unsigned char)(h[7] - '0');  /**< Minor number */
  624|       |
  625|      1|    if (1u == mj)
  ------------------
  |  Branch (625:9): [True: 1, False: 0]
  ------------------
  626|      1|    {
  627|       |      /* HTTP/1.x */
  628|      1|      if (1u == mn)
  ------------------
  |  Branch (628:11): [True: 1, False: 0]
  ------------------
  629|      1|        return mhd_HTTP_VER_1_1;
  630|      0|      if (0u == mn)
  ------------------
  |  Branch (630:11): [True: 0, False: 0]
  ------------------
  631|      0|        return mhd_HTTP_VER_1_0;
  632|      0|      if (9u >= mn)
  ------------------
  |  Branch (632:11): [True: 0, False: 0]
  ------------------
  633|      0|        return mhd_HTTP_VER_1_2P;
  634|       |
  635|      0|      return mhd_HTTP_VER_INVALID;
  636|      0|    }
  637|       |
  638|      0|    if ((0u == mj) && (9u >= mn))
  ------------------
  |  Branch (638:9): [True: 0, False: 0]
  |  Branch (638:23): [True: 0, False: 0]
  ------------------
  639|      0|      return mhd_HTTP_VER_0X; /* Too old major version */
  640|       |
  641|      0|    if ((2u == mj) && (0u == mn))
  ------------------
  |  Branch (641:9): [True: 0, False: 0]
  |  Branch (641:23): [True: 0, False: 0]
  ------------------
  642|      0|      return mhd_HTTP_VER_2;
  643|      0|  }
  644|       |
  645|      0|  return mhd_HTTP_VER_INVALID;
  646|      1|}
stream_process_request.c:_ZL21parse_http_std_methodP14MHD_Connection:
  568|      6|{
  569|      6|  const char *const restrict m = connection->rq.method.cstr; /**< short alias */
  570|      6|  const size_t len =  connection->rq.method.len; /**< short alias */
  571|      6|  mhd_assert (NULL != m);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  572|      6|  mhd_assert (0 != len);
  ------------------
  |  |   66|      6|#  define mhd_assert(ignore) ((void) 0)
  ------------------
  573|       |
  574|      6|  connection->rq.http_mthd = mhd_parse_http_method (len,
  575|      6|                                                    m);
  576|      6|}
stream_process_request.c:_ZL22process_request_targetP14MHD_Connection:
 1380|      1|{
 1381|      1|  size_t params_len;
 1382|       |
 1383|      1|  mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING == c->stage);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1384|      1|  mhd_assert (NULL == c->rq.url);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1385|      1|  mhd_assert (0 == c->rq.url_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1386|      1|  mhd_assert (NULL != c->rq.hdrs.rq_line.rq_tgt);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1387|      1|  mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1388|      1|              || (c->rq.hdrs.rq_line.rq_tgt <=
 1389|      1|                  c->rq.hdrs.rq_line.rq_tgt_qmark));
 1390|      1|  mhd_assert ((NULL == c->rq.hdrs.rq_line.rq_tgt_qmark) \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1391|      1|              || (c->rq.req_target_len > \
 1392|      1|                  (size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark \
 1393|      1|                           - c->rq.hdrs.rq_line.rq_tgt)));
 1394|       |
 1395|       |  /* Log callback before the request-target is modified/decoded */
 1396|      1|  if (NULL != c->daemon->req_cfg.uri_cb.cb)
  ------------------
  |  Branch (1396:7): [True: 0, False: 1]
  ------------------
 1397|      0|  {
 1398|      0|    struct MHD_EarlyUriCbData req_data;
 1399|      0|    req_data.request = &(c->rq);
 1400|      0|    req_data.full_uri.cstr = c->rq.hdrs.rq_line.rq_tgt;
 1401|      0|    req_data.full_uri.len = c->rq.req_target_len;
 1402|      0|    c->rq.app_aware = true;
 1403|      0|    c->daemon->req_cfg.uri_cb.cb (c->daemon->req_cfg.uri_cb.cls,
 1404|      0|                                  &req_data,
 1405|      0|                                  &(c->rq.app_context));
 1406|      0|  }
 1407|       |
 1408|      1|  if (NULL != c->rq.hdrs.rq_line.rq_tgt_qmark)
  ------------------
  |  Branch (1408:7): [True: 1, False: 0]
  ------------------
 1409|      1|  {
 1410|      1|    params_len =
 1411|      1|      c->rq.req_target_len
 1412|      1|      - (size_t)(c->rq.hdrs.rq_line.rq_tgt_qmark - c->rq.hdrs.rq_line.rq_tgt);
 1413|       |
 1414|      1|    mhd_assert (1 <= params_len);
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1415|       |
 1416|      1|    c->rq.hdrs.rq_line.rq_tgt_qmark[0] = 0; /* Replace '?' with zero termination */
 1417|       |
 1418|       |    // TODO: support detection of decoding errors
 1419|      1|    if (!mhd_parse_uri_args (params_len - 1,
  ------------------
  |  Branch (1419:9): [True: 0, False: 1]
  ------------------
 1420|      1|                             c->rq.hdrs.rq_line.rq_tgt_qmark + 1,
 1421|      1|                             &request_add_get_arg,
 1422|      1|                             &(c->h1_stream)))
 1423|      0|    {
 1424|      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)
  ------------------
 1425|      0|                   "Not enough memory in the pool to store GET parameter");
 1426|       |
 1427|      0|      mhd_RESPOND_WITH_ERROR_STATIC (
  ------------------
  |  |   83|      0|          respond_with_error_len ((c), (code), \
  |  |   84|      0|                                  mhd_SSTR_LEN (msg), (msg), \
  |  |  ------------------
  |  |  |  |   54|      0|#define mhd_SSTR_LEN(sstr) (sizeof(sstr) / sizeof(char) - 1)
  |  |  ------------------
  |  |   85|      0|                                  0, NULL)
  ------------------
 1428|      0|        c,
 1429|      0|        mhd_stream_get_no_space_err_status_code (c,
 1430|      0|                                                 MHD_PROC_RECV_URI,
 1431|      0|                                                 0,
 1432|      0|                                                 NULL),
 1433|      0|        ERR_RSP_MSG_REQUEST_TOO_BIG);
 1434|      0|      mhd_assert (mhd_HTTP_STAGE_REQ_LINE_RECEIVING != c->stage);
  ------------------
  |  |   66|      0|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1435|      0|      return false;
 1436|       |
 1437|      0|    }
 1438|      1|  }
 1439|      0|  else
 1440|      0|    params_len = 0;
 1441|       |
 1442|      1|  mhd_assert (strlen (c->rq.hdrs.rq_line.rq_tgt) == \
  ------------------
  |  |   66|      1|#  define mhd_assert(ignore) ((void) 0)
  ------------------
 1443|      1|              c->rq.req_target_len - params_len);
 1444|       |
 1445|       |  /* Finally unescape URI itself */
 1446|       |  // TODO: support detection of decoding errors
 1447|      1|  c->rq.url_len =
 1448|      1|    mhd_str_pct_decode_lenient_n (c->rq.hdrs.rq_line.rq_tgt,
 1449|      1|                                  c->rq.req_target_len - params_len,
 1450|      1|                                  c->rq.hdrs.rq_line.rq_tgt,
 1451|      1|                                  c->rq.req_target_len - params_len,
 1452|      1|                                  NULL);
 1453|      1|  c->rq.url = c->rq.hdrs.rq_line.rq_tgt;
 1454|       |
 1455|      1|  return true;
 1456|      1|}
stream_process_request.c:_ZL19request_add_get_argPvPK10MHD_StringPK18MHD_StringNullable:
 1283|      1|{
 1284|      1|  struct MHD_Stream *s = (struct MHD_Stream *)cls;
 1285|       |
 1286|      1|  return mhd_stream_add_field_nullable (s, MHD_VK_URI_QUERY_PARAM, name, value);
 1287|      1|}

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

