_ZN6YaHTTP9CookieJarC2Ev:
   65|  4.10k|    CookieJar() {}; //<! constructs empty cookie jar
_ZN6YaHTTP9CookieJar5clearEv:
   71|  12.3k|    void clear() {
   72|  12.3k|      this->cookies.clear();
   73|  12.3k|    }
_ZN6YaHTTP6CookieaSERKS0_:
   22|  74.4k|     Cookie& operator=(const Cookie &rhs) {
   23|  74.4k|       name = rhs.name;
   24|  74.4k|       value = rhs.value;
   25|  74.4k|       domain = rhs.domain;
   26|  74.4k|       path = rhs.path;
   27|  74.4k|       secure = rhs.secure;
   28|  74.4k|       httponly = rhs.httponly;
   29|  74.4k|       expires = rhs.expires;
   30|  74.4k|       return *this;
   31|  74.4k|     }
_ZN6YaHTTP6CookieC2ERKS0_:
   12|   140k|     Cookie(const Cookie &rhs) {
   13|   140k|       name = rhs.name;
   14|   140k|       value = rhs.value;
   15|   140k|       domain = rhs.domain;
   16|   140k|       path = rhs.path;
   17|   140k|       secure = rhs.secure;
   18|   140k|       httponly = rhs.httponly;
   19|   140k|       expires = rhs.expires;
   20|   140k|     }; //<! Copy cookie values
_ZN6YaHTTP6CookieC2Ev:
    5|  6.92k|     Cookie() {
    6|  6.92k|       secure = false;
    7|  6.92k|       httponly = false;
    8|  6.92k|       name = value = "";
    9|  6.92k|       expires = DateTime();
   10|  6.92k|     }; //!< Set the cookie to empty value
_ZN6YaHTTP9CookieJar12keyValuePairERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERS7_SA_:
   75|   140k|    void keyValuePair(const std::string &keyvalue, std::string &key, std::string &value) {
   76|   140k|      size_t pos;
   77|   140k|      pos = keyvalue.find('=');
   78|   140k|      if (pos == std::string::npos) throw ParseError("Not a Key-Value pair (cookie)");
  ------------------
  |  Branch (78:11): [True: 115, False: 140k]
  ------------------
   79|   140k|      key = std::string(keyvalue.begin(), keyvalue.begin()+pos);
   80|   140k|      value = std::string(keyvalue.begin()+pos+1, keyvalue.end());
   81|   140k|    } //<! key value pair parser
_ZN6YaHTTP9CookieJar17parseCookieHeaderERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   83|  2.31k|    void parseCookieHeader(const std::string &cookiestr) {
   84|  2.31k|      size_t pos, npos;
   85|  2.31k|      std::list<Cookie> lcookies;
   86|  2.31k|      Cookie c;
   87|  2.31k|      pos = 0;
   88|   142k|      while(pos < cookiestr.size()) {
  ------------------
  |  Branch (88:13): [True: 140k, False: 2.31k]
  ------------------
   89|   140k|        if ((npos = cookiestr.find("; ", pos)) == std::string::npos)
  ------------------
  |  Branch (89:13): [True: 2.01k, False: 138k]
  ------------------
   90|  2.01k|          npos = cookiestr.size();
   91|   140k|        keyValuePair(cookiestr.substr(pos, npos-pos), c.name, c.value);
   92|   140k|        c.name = YaHTTP::Utility::decodeURL(c.name);
   93|   140k|        c.value = YaHTTP::Utility::decodeURL(c.value);
   94|   140k|        lcookies.push_back(c);
   95|   140k|        pos = npos+2;
   96|   140k|      }
   97|  76.7k|      for(std::list<Cookie>::iterator i = lcookies.begin(); i != lcookies.end(); i++) {
  ------------------
  |  Branch (97:61): [True: 74.4k, False: 2.31k]
  ------------------
   98|  74.4k|        this->cookies[i->name] = *i;
   99|  74.4k|      }
  100|  2.31k|    }

_ZN6YaHTTP5ErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
    9|    645|    Error(const std::string& reason_): reason(reason_) {};
_ZN6YaHTTP5ErrorD2Ev:
   10|    645|    virtual ~Error() throw() {};
_ZN6YaHTTP10ParseErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   22|    645|    ParseError(const std::string& reason_): Error(reason_) {};

_ZN6YaHTTP7isspaceEc:
   10|  1.03M|  bool isspace(char c) {
   11|  1.03M|    return std::isspace(c) != 0;
   12|  1.03M|  }
_ZN6YaHTTP7isspaceEcRKNSt3__16localeE:
   14|  14.9k|  bool isspace(char c, const std::locale& loc) {
   15|  14.9k|    return std::isspace(c, loc);
   16|  14.9k|  }
_ZN6YaHTTP11AsyncLoaderINS_7RequestEE4feedERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   44|  4.10k|  {
   45|  4.10k|    if (state < 2) {
  ------------------
  |  Branch (45:9): [True: 4.10k, False: 0]
  ------------------
   46|  4.10k|      headersize += somedata.length(); // maye include some body data, we don't know yet...
   47|  4.10k|      if (headersize > target->max_header_size) {
  ------------------
  |  Branch (47:11): [True: 41, False: 4.06k]
  ------------------
   48|     41|        if (target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|     41|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (48:13): [True: 41, False: 0]
  ------------------
   49|     41|          throw ParseError("Request header too large");
   50|     41|        }
   51|      0|        else {
   52|      0|          throw ParseError("Response header too large");
   53|      0|        }
   54|     41|      }
   55|  4.10k|    }
   56|  4.06k|    buffer.append(somedata);
   57|  33.7k|    while(state < 2) {
  ------------------
  |  Branch (57:11): [True: 33.6k, False: 140]
  ------------------
   58|  33.6k|      int cr=0;
   59|  33.6k|      pos = buffer.find_first_of("\n");
   60|       |      // need to find CRLF in buffer
   61|  33.6k|      if (pos == std::string::npos) return false;
  ------------------
  |  Branch (61:11): [True: 2.82k, False: 30.8k]
  ------------------
   62|  30.8k|      if (pos>0 && buffer[pos-1]=='\r')
  ------------------
  |  Branch (62:11): [True: 27.6k, False: 3.14k]
  |  Branch (62:20): [True: 220, False: 27.4k]
  ------------------
   63|    220|        cr=1;
   64|  30.8k|      std::string line(buffer.begin(), buffer.begin()+pos-cr); // exclude CRLF
   65|  30.8k|      buffer.erase(buffer.begin(), buffer.begin()+pos+1); // remove line from buffer including CRLF
   66|       |
   67|  30.8k|      if (state == 0) { // startup line
  ------------------
  |  Branch (67:11): [True: 4.04k, False: 26.7k]
  ------------------
   68|  4.04k|        if (target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  4.04k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (68:13): [True: 4.04k, False: 0]
  ------------------
   69|  4.04k|          std::string ver;
   70|  4.04k|          std::string tmpurl;
   71|  4.04k|          std::istringstream iss(line);
   72|  4.04k|          iss >> target->method >> tmpurl >> ver;
   73|  4.04k|          if (ver.size() == 0)
  ------------------
  |  Branch (73:15): [True: 3.97k, False: 73]
  ------------------
   74|  3.97k|            target->version = 9;
   75|     73|          else if (ver.find("HTTP/0.9") == 0)
  ------------------
  |  Branch (75:20): [True: 1, False: 72]
  ------------------
   76|      1|            target->version = 9;
   77|     72|          else if (ver.find("HTTP/1.0") == 0)
  ------------------
  |  Branch (77:20): [True: 2, False: 70]
  ------------------
   78|      2|            target->version = 10;
   79|     70|          else if (ver.find("HTTP/1.1") == 0)
  ------------------
  |  Branch (79:20): [True: 3, False: 67]
  ------------------
   80|      3|            target->version = 11;
   81|     67|          else
   82|     67|            throw ParseError("HTTP version not supported");
   83|       |          // uppercase the target method
   84|  3.97k|          std::transform(target->method.begin(), target->method.end(), target->method.begin(), ::toupper);
   85|  3.97k|          target->url.parse(tmpurl);
   86|  3.97k|          target->getvars = Utility::parseUrlParameters(target->url.parameters);
   87|  3.97k|          state = 1;
   88|  3.97k|        } else if(target->kind == YAHTTP_TYPE_RESPONSE) {
  ------------------
  |  |   36|      0|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (88:19): [True: 0, False: 0]
  ------------------
   89|      0|          std::string ver;
   90|      0|          std::istringstream iss(line);
   91|      0|          std::string::size_type pos1;
   92|      0|          iss >> ver >> target->status;
   93|      0|          std::getline(iss, target->statusText);
   94|      0|          pos1=0;
   95|      0|          while(pos1 < target->statusText.size() && YaHTTP::isspace(target->statusText.at(pos1))) pos1++;
  ------------------
  |  Branch (95:17): [True: 0, False: 0]
  |  Branch (95:53): [True: 0, False: 0]
  ------------------
   96|      0|          target->statusText = target->statusText.substr(pos1); 
   97|      0|          if ((pos1 = target->statusText.find("\r")) != std::string::npos) {
  ------------------
  |  Branch (97:15): [True: 0, False: 0]
  ------------------
   98|      0|            target->statusText = target->statusText.substr(0, pos1-1);
   99|      0|          }
  100|      0|          if (ver.size() == 0) {
  ------------------
  |  Branch (100:15): [True: 0, False: 0]
  ------------------
  101|      0|            target->version = 9;
  102|      0|          } else if (ver.find("HTTP/0.9") == 0)
  ------------------
  |  Branch (102:22): [True: 0, False: 0]
  ------------------
  103|      0|            target->version = 9;
  104|      0|          else if (ver.find("HTTP/1.0") == 0)
  ------------------
  |  Branch (104:20): [True: 0, False: 0]
  ------------------
  105|      0|            target->version = 10;
  106|      0|          else if (ver.find("HTTP/1.1") == 0)
  ------------------
  |  Branch (106:20): [True: 0, False: 0]
  ------------------
  107|      0|            target->version = 11;
  108|      0|          else
  109|      0|            throw ParseError("HTTP version not supported");
  110|      0|          state = 1;
  111|      0|        }
  112|  26.7k|      } else if (state == 1) {
  ------------------
  |  Branch (112:18): [True: 26.7k, False: 0]
  ------------------
  113|  26.7k|        std::string key,value;
  114|  26.7k|        size_t pos1;
  115|  26.7k|        if (line.empty()) {
  ------------------
  |  Branch (115:13): [True: 992, False: 25.7k]
  ------------------
  116|    992|          chunked = (target->headers.find("transfer-encoding") != target->headers.end() && target->headers["transfer-encoding"] == "chunked");
  ------------------
  |  Branch (116:22): [True: 437, False: 555]
  |  Branch (116:92): [True: 412, False: 25]
  ------------------
  117|    992|          state = 2;
  118|    992|          break;
  119|    992|        }
  120|       |        // split headers
  121|  25.7k|        if ((pos1 = line.find(':')) == std::string::npos) {
  ------------------
  |  Branch (121:13): [True: 24, False: 25.7k]
  ------------------
  122|     24|          throw ParseError("Malformed header line");
  123|     24|        }
  124|  25.7k|        key = line.substr(0, pos1);
  125|  25.7k|        value = line.substr(pos1 + 1);
  126|  1.06M|        for(std::string::iterator it=key.begin(); it != key.end(); it++)
  ------------------
  |  Branch (126:51): [True: 1.03M, False: 25.7k]
  ------------------
  127|  1.03M|          if (YaHTTP::isspace(*it))
  ------------------
  |  Branch (127:15): [True: 15, False: 1.03M]
  ------------------
  128|     15|            throw ParseError("Header key contains whitespace which is not allowed by RFC");
  129|       |
  130|  25.7k|        Utility::trim(value);
  131|  25.7k|        std::transform(key.begin(), key.end(), key.begin(), ::tolower);
  132|       |        // is it already defined
  133|       |
  134|  25.7k|        if (key == "set-cookie" && target->kind == YAHTTP_TYPE_RESPONSE) {
  ------------------
  |  |   36|    209|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (134:13): [True: 209, False: 25.5k]
  |  Branch (134:36): [True: 0, False: 209]
  ------------------
  135|      0|          target->jar.parseSetCookieHeader(value);
  136|  25.7k|        } else if (key == "cookie" && target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  2.31k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (136:20): [True: 2.31k, False: 23.4k]
  |  Branch (136:39): [True: 2.31k, False: 0]
  ------------------
  137|  2.31k|          target->jar.parseCookieHeader(value);
  138|  23.4k|        } else {
  139|  23.4k|          if (key == "host" && target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  1.89k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (139:15): [True: 1.89k, False: 21.5k]
  |  Branch (139:32): [True: 1.89k, False: 0]
  ------------------
  140|       |            // maybe it contains port?
  141|  1.89k|            if ((pos1 = value.find(':')) == std::string::npos) {
  ------------------
  |  Branch (141:17): [True: 338, False: 1.55k]
  ------------------
  142|    338|              target->url.host = value;
  143|  1.55k|            } else {
  144|  1.55k|              target->url.host = value.substr(0, pos1);
  145|  1.55k|              target->url.port = ::atoi(value.substr(pos1).c_str());
  146|  1.55k|            }
  147|  1.89k|          }
  148|  23.4k|          if (target->headers.find(key) != target->headers.end()) {
  ------------------
  |  Branch (148:15): [True: 11.5k, False: 11.9k]
  ------------------
  149|  11.5k|            target->headers[key] = target->headers[key] + ";" + value;
  150|  11.9k|          } else {
  151|  11.9k|            target->headers[key] = std::move(value);
  152|  11.9k|          }
  153|  23.4k|        }
  154|  25.7k|      }
  155|  30.8k|    }
  156|       |
  157|  1.13k|    minbody = 0;
  158|       |    // check for expected body size
  159|  1.13k|    if (target->kind == YAHTTP_TYPE_REQUEST) maxbody = target->max_request_size;
  ------------------
  |  |   35|  1.13k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (159:9): [True: 992, False: 140]
  ------------------
  160|    140|    else if (target->kind == YAHTTP_TYPE_RESPONSE) maxbody = target->max_response_size;
  ------------------
  |  |   36|    140|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (160:14): [True: 0, False: 140]
  ------------------
  161|    140|    else maxbody = 0;
  162|       |
  163|  1.13k|    if (!chunked) {
  ------------------
  |  Branch (163:9): [True: 580, False: 552]
  ------------------
  164|    580|      if (target->headers.find("content-length") != target->headers.end()) {
  ------------------
  |  Branch (164:11): [True: 379, False: 201]
  ------------------
  165|    379|        std::istringstream maxbodyS(target->headers["content-length"]);
  166|    379|        maxbodyS >> minbody;
  167|    379|        maxbody = minbody;
  168|    379|      }
  169|    580|      if (minbody < 1) return true; // guess there isn't anything left.
  ------------------
  |  Branch (169:11): [True: 209, False: 371]
  ------------------
  170|    371|      if (target->kind == YAHTTP_TYPE_REQUEST && minbody > target->max_request_size) throw ParseError("Max request body size exceeded");
  ------------------
  |  |   35|    742|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (170:11): [True: 371, False: 0]
  |  Branch (170:50): [True: 161, False: 210]
  ------------------
  171|    210|      else if (target->kind == YAHTTP_TYPE_RESPONSE && minbody > target->max_response_size) throw ParseError("Max response body size exceeded");
  ------------------
  |  |   36|    420|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (171:16): [True: 0, False: 210]
  |  Branch (171:56): [True: 0, False: 0]
  ------------------
  172|    371|    }
  173|       |
  174|    762|    if (maxbody == 0) hasBody = false;
  ------------------
  |  Branch (174:9): [True: 0, False: 762]
  ------------------
  175|    762|    else hasBody = true;
  176|       |
  177|    762|    if (buffer.size() == 0) return ready();
  ------------------
  |  Branch (177:9): [True: 23, False: 739]
  ------------------
  178|       |
  179|  4.01k|    while(buffer.size() > 0) {
  ------------------
  |  Branch (179:11): [True: 3.65k, False: 361]
  ------------------
  180|  3.65k|      if (chunked) {
  ------------------
  |  Branch (180:11): [True: 3.46k, False: 188]
  ------------------
  181|  3.46k|        if (chunk_size == 0) {
  ------------------
  |  Branch (181:13): [True: 1.87k, False: 1.59k]
  ------------------
  182|  1.87k|          char buf[100];
  183|       |          // read chunk length
  184|  1.87k|          if ((pos = buffer.find('\n')) == std::string::npos) return false;
  ------------------
  |  Branch (184:15): [True: 13, False: 1.85k]
  ------------------
  185|  1.85k|          if (pos > 99)
  ------------------
  |  Branch (185:15): [True: 26, False: 1.83k]
  ------------------
  186|     26|            throw ParseError("Impossible chunk_size");
  187|  1.83k|          buffer.copy(buf, pos);
  188|  1.83k|          buf[pos]=0; // just in case...
  189|  1.83k|          buffer.erase(buffer.begin(), buffer.begin()+pos+1); // remove line from buffer
  190|  1.83k|          if (sscanf(buf, "%zx", &chunk_size) != 1) {
  ------------------
  |  Branch (190:15): [True: 20, False: 1.81k]
  ------------------
  191|     20|            throw ParseError("Unable to parse chunk size");
  192|     20|          }
  193|  1.81k|          if (chunk_size == 0) { state = 3; break; } // last chunk
  ------------------
  |  Branch (193:15): [True: 3, False: 1.80k]
  ------------------
  194|  1.80k|          if (chunk_size > (std::numeric_limits<decltype(chunk_size)>::max() - 2) || chunk_size > maxbody) {
  ------------------
  |  Branch (194:15): [True: 1, False: 1.80k]
  |  Branch (194:86): [True: 175, False: 1.63k]
  ------------------
  195|    176|            throw ParseError("Chunk is too large");
  196|    176|          }
  197|  1.80k|        } else {
  198|  1.59k|          int crlf=1;
  199|  1.59k|          if (buffer.size() < chunk_size+1) return false; // expect newline
  ------------------
  |  Branch (199:15): [True: 38, False: 1.56k]
  ------------------
  200|  1.56k|          if (buffer.at(chunk_size) == '\r') {
  ------------------
  |  Branch (200:15): [True: 452, False: 1.10k]
  ------------------
  201|    452|            if (buffer.size() < chunk_size+2 || buffer.at(chunk_size+1) != '\n') return false; // expect newline after carriage return
  ------------------
  |  Branch (201:17): [True: 3, False: 449]
  |  Branch (201:49): [True: 13, False: 436]
  ------------------
  202|    436|            crlf=2;
  203|  1.10k|          } else if (buffer.at(chunk_size) != '\n') return false;
  ------------------
  |  Branch (203:22): [True: 27, False: 1.08k]
  ------------------
  204|  1.51k|          if (bodysize + chunk_size > maxbody) {
  ------------------
  |  Branch (204:15): [True: 0, False: 1.51k]
  ------------------
  205|      0|            throw ParseError("Chunked body is too large");
  206|      0|          }
  207|  1.51k|          std::string tmp = buffer.substr(0, chunk_size);
  208|  1.51k|          buffer.erase(buffer.begin(), buffer.begin()+chunk_size+crlf);
  209|  1.51k|          bodybuf << tmp;
  210|  1.51k|          bodysize += chunk_size;
  211|  1.51k|          chunk_size = 0;
  212|  1.51k|          if (buffer.size() == 0) break; // just in case
  ------------------
  |  Branch (212:15): [True: 59, False: 1.45k]
  ------------------
  213|  1.51k|        }
  214|  3.46k|      } else {
  215|    188|        if (bodysize + buffer.length() > maxbody) {
  ------------------
  |  Branch (215:13): [True: 89, False: 99]
  ------------------
  216|     89|          bodybuf << buffer.substr(0, maxbody - bodybuf.str().length());
  217|     89|          bodysize = maxbody;
  218|     89|        }
  219|     99|        else {
  220|     99|          bodybuf << buffer;
  221|     99|          bodysize += buffer.length();
  222|     99|        }
  223|    188|        buffer = "";
  224|    188|      }
  225|  3.65k|    }
  226|       |
  227|    423|    if (chunk_size!=0) return false; // need more data
  ------------------
  |  Branch (227:9): [True: 33, False: 390]
  ------------------
  228|       |
  229|    390|    return ready();
  230|    423|  };

_ZN6YaHTTP7RequestC2Ev:
  237|  4.10k|    Request() { Request::initialize(); };
_ZN6YaHTTP8HTTPBaseC2Ev:
  102|  4.10k|    HTTPBase() {
  103|  4.10k|      HTTPBase::initialize();
  104|  4.10k|    };
_ZN6YaHTTP8HTTPBase10initializeEv:
  107|  12.3k|    virtual void initialize() {
  108|  12.3k|      kind = 0;
  109|  12.3k|      status = 0;
  110|  12.3k|#ifdef HAVE_CPP_FUNC_PTR
  111|  12.3k|      renderer = SendBodyRender();
  112|  12.3k|#endif
  113|  12.3k|      max_request_size = YAHTTP_MAX_REQUEST_SIZE;
  ------------------
  |  |   28|  12.3k|#define YAHTTP_MAX_REQUEST_SIZE 2097152
  ------------------
  114|  12.3k|      max_response_size = YAHTTP_MAX_RESPONSE_SIZE;
  ------------------
  |  |   32|  12.3k|#define YAHTTP_MAX_RESPONSE_SIZE 2097152
  ------------------
  115|  12.3k|      max_header_size = YAHTTP_MAX_HEADER_SIZE;
  ------------------
  |  |   24|  12.3k|#define YAHTTP_MAX_HEADER_SIZE (100 * 1024)
  ------------------
  116|  12.3k|      url = "";
  117|  12.3k|      method = "";
  118|  12.3k|      statusText = "";
  119|  12.3k|      jar.clear();
  120|  12.3k|      headers.clear();
  121|  12.3k|      parameters.clear();
  122|  12.3k|      getvars.clear();
  123|  12.3k|      postvars.clear();
  124|  12.3k|      body = "";
  125|  12.3k|      routeName = "";
  126|  12.3k|      version = 11; // default to version 1.1
  127|  12.3k|      is_multipart = false;
  128|  12.3k|    }
_ZN6YaHTTP8HTTPBase14SendBodyRenderC2Ev:
   52|  12.3k|      SendBodyRender() {};
_ZN6YaHTTP7Request10initializeEv:
  246|  8.20k|    void initialize() override {
  247|  8.20k|      HTTPBase::initialize();
  248|  8.20k|      this->kind = YAHTTP_TYPE_REQUEST;
  ------------------
  |  |   35|  8.20k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  249|  8.20k|    }
_ZN6YaHTTP8HTTPBaseD2Ev:
  105|  4.10k|    virtual ~HTTPBase() = default;
_ZN6YaHTTP11AsyncLoaderINS_7RequestEE10initializeEPS1_:
  322|  4.10k|    void initialize(T* target_) {
  323|  4.10k|      chunked = false; chunk_size = 0;
  324|  4.10k|      bodybuf.str(""); minbody = 0; maxbody = 0;
  325|  4.10k|      pos = 0; state = 0; this->target = target_;
  326|  4.10k|      hasBody = false;
  327|  4.10k|      buffer = "";
  328|  4.10k|      headersize = 0;
  329|  4.10k|      bodysize = 0;
  330|  4.10k|      this->target->initialize();
  331|  4.10k|    }; //<! Initialize the parser for target and clear state
_ZN6YaHTTP11AsyncLoaderINS_7RequestEE8finalizeEv:
  338|    371|    void finalize() {
  339|    371|      bodybuf.flush();
  340|    371|      if (ready()) {
  ------------------
  |  Branch (340:11): [True: 371, False: 0]
  ------------------
  341|    371|        std::string body = bodybuf.str();
  342|    371|        strstr_map_t::iterator cpos = target->headers.find("content-type");
  343|    371|        if (cpos != target->headers.end() && Utility::iequals(cpos->second, "application/x-www-form-urlencoded", 32)) {
  ------------------
  |  Branch (343:13): [True: 122, False: 249]
  |  Branch (343:13): [True: 88, False: 283]
  |  Branch (343:46): [True: 88, False: 34]
  ------------------
  344|     88|          target->postvars = Utility::parseUrlParameters(body);
  345|     88|        }
  346|    371|        target->body = std::move(body);
  347|    371|      }
  348|    371|      bodybuf.str("");
  349|    371|      bodysize = 0;
  350|       |      this->target = NULL;
  351|    371|    }; //<! finalize and release target
_ZN6YaHTTP11AsyncLoaderINS_7RequestEE5readyEv:
  333|    644|    bool ready() {
  334|    644|     return (chunked == true && state == 3) || // if it's chunked we get end of data indication
  ------------------
  |  Branch (334:14): [True: 66, False: 578]
  |  Branch (334:33): [True: 6, False: 60]
  ------------------
  335|    638|             (chunked == false && state > 1 &&  
  ------------------
  |  Branch (335:15): [True: 578, False: 60]
  |  Branch (335:35): [True: 578, False: 0]
  ------------------
  336|    578|               (!hasBody || (bodysize <= maxbody && bodysize >= minbody))); 
  ------------------
  |  Branch (336:17): [True: 209, False: 369]
  |  Branch (336:30): [True: 369, False: 0]
  |  Branch (336:53): [True: 318, False: 51]
  ------------------
  337|    644|    }; //<! whether we have received enough data

_ZN6YaHTTP3URLC2Ev:
  166|  4.10k|      URL() { initialize(); }; //<! construct empty url
_ZN6YaHTTP3URL10initializeEv:
  116|  20.3k|      void initialize() {
  117|  20.3k|        protocol = ""; host = ""; port = 0; username = ""; password = ""; path = ""; parameters = ""; anchor =""; pathless = true;
  118|  20.3k|      }; //<! initialize to empty URL
_ZN6YaHTTP3URLC2EPKc:
  171|  12.3k|      URL(const char *url) {
  172|  12.3k|        parse(std::string(url));
  173|  12.3k|      }; //<! calls parse with url
_ZN6YaHTTP3URL5parseERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  175|  16.2k|      bool parse(const std::string& url) {
  176|       |        // setup
  177|  16.2k|        initialize();
  178|       |
  179|  16.2k|        if (url.size() > YAHTTP_MAX_URL_LENGTH) return false;
  ------------------
  |  |    8|  16.2k|#define YAHTTP_MAX_URL_LENGTH 2048
  ------------------
  |  Branch (179:13): [True: 12, False: 16.2k]
  ------------------
  180|  16.2k|        size_t pos = 0;
  181|  16.2k|        if (*(url.begin()) != '/') { // full url?
  ------------------
  |  Branch (181:13): [True: 16.0k, False: 237]
  ------------------
  182|  16.0k|          if (parseSchema(url, pos) == false) return false;
  ------------------
  |  Branch (182:15): [True: 14.6k, False: 1.38k]
  ------------------
  183|  1.38k|          if (pathless) {
  ------------------
  |  Branch (183:15): [True: 806, False: 574]
  ------------------
  184|    806|            parameters = url.substr(pos);
  185|    806|            return true;
  186|    806|          }
  187|    574|          if (parseUserPass(url, pos) == false) return false;
  ------------------
  |  Branch (187:15): [True: 0, False: 574]
  ------------------
  188|    574|          if (parseHost(url, pos) == false) return false;
  ------------------
  |  Branch (188:15): [True: 28, False: 546]
  ------------------
  189|    574|        }
  190|    783|        if (parsePath(url, pos) == false) return false;
  ------------------
  |  Branch (190:13): [True: 0, False: 783]
  ------------------
  191|    783|        if (parseParameters(url, pos) == false) return false;
  ------------------
  |  Branch (191:13): [True: 0, False: 783]
  ------------------
  192|    783|        return parseAnchor(url, pos);
  193|    783|    }; //<! parse various formats of urls ranging from http://example.com/foo?bar=baz into data:base64:d089swt64wt... 
_ZN6YaHTTP3URL11parseSchemaERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   15|  16.0k|      bool parseSchema(const std::string& url, size_t &pos) {
   16|  16.0k|          size_t pos1;
   17|  16.0k|          if (pos >= url.size()) return false; // no data
  ------------------
  |  Branch (17:15): [True: 14.6k, False: 1.41k]
  ------------------
   18|  1.41k|          if ( (pos1 = url.find_first_of(":",pos)) == std::string::npos ) return false; // schema is mandatory
  ------------------
  |  Branch (18:16): [True: 30, False: 1.38k]
  ------------------
   19|  1.38k|          protocol = url.substr(pos, pos1-pos);
   20|  1.38k|          if (protocol == "http") port = 80;
  ------------------
  |  Branch (20:15): [True: 1, False: 1.37k]
  ------------------
   21|  1.38k|          if (protocol == "https") port = 443;
  ------------------
  |  Branch (21:15): [True: 1, False: 1.37k]
  ------------------
   22|  1.38k|          pos = pos1+1; // after :
   23|  1.38k|          if (url.compare(pos, 2, "//") == 0) {
  ------------------
  |  Branch (23:15): [True: 574, False: 806]
  ------------------
   24|    574|             pathless = false; // if this is true we put rest into parameters
   25|    574|             pos += 2;
   26|    574|          }
   27|  1.38k|          return true;
   28|  1.41k|      }; //<! parse schema/protocol part 
_ZN6YaHTTP3URL13parseUserPassERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   60|    574|      bool parseUserPass(const std::string& url, size_t &pos) {
   61|    574|          size_t pos1,pos2;
   62|    574|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (62:15): [True: 1, False: 573]
  ------------------
   63|       |
   64|    573|          if ( (pos1 = url.find_first_of("@",pos)) == std::string::npos ) return true; // no userinfo
  ------------------
  |  Branch (64:16): [True: 356, False: 217]
  ------------------
   65|    217|          pos2 = url.find_first_of(":",pos);
   66|       |
   67|    217|          if (pos2 != std::string::npos) { // comes with password
  ------------------
  |  Branch (67:15): [True: 125, False: 92]
  ------------------
   68|    125|             username = url.substr(pos, pos2 - pos);
   69|    125|             password = url.substr(pos2+1, pos1 - pos2 - 1);
   70|    125|             password = Utility::decodeURL(password);
   71|    125|          } else {
   72|     92|             username = url.substr(pos, pos1 - pos);
   73|     92|          }
   74|    217|          pos = pos1+1;
   75|    217|          username = Utility::decodeURL(username);
   76|    217|          return true;
   77|    573|      }; //<! parse possible username and password
_ZN6YaHTTP3URL9parseHostERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   30|    574|      bool parseHost(const std::string& url, size_t &pos) {
   31|    574|          size_t pos1;
   32|    574|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (32:15): [True: 74, False: 500]
  ------------------
   33|    500|          if ( (pos1 = url.find_first_of("/", pos)) == std::string::npos ) {
  ------------------
  |  Branch (33:16): [True: 359, False: 141]
  ------------------
   34|    359|             host = url.substr(pos);
   35|    359|             path = "/";
   36|    359|             pos = url.size();
   37|    359|          } else {
   38|    141|             host = url.substr(pos, pos1-pos);
   39|    141|             pos = pos1;
   40|    141|          }
   41|    500|          if (host.at(0) == '[') { // IPv6
  ------------------
  |  Branch (41:15): [True: 170, False: 330]
  ------------------
   42|    170|            if ((pos1 = host.find_first_of("]")) == std::string::npos) {
  ------------------
  |  Branch (42:17): [True: 28, False: 142]
  ------------------
   43|       |              // incomplete address
   44|     28|              return false;
   45|     28|            }
   46|    142|            size_t pos2;
   47|    142|            if ((pos2 = host.find_first_of(":", pos1)) != std::string::npos) {
  ------------------
  |  Branch (47:17): [True: 69, False: 73]
  ------------------
   48|     69|              std::istringstream tmp(host.substr(pos2 + 1));
   49|     69|              tmp >> port;
   50|     69|            }
   51|    142|            host = host.substr(1, pos1 - 1);
   52|    330|          } else if ( (pos1 = host.find_first_of(":")) != std::string::npos ) {
  ------------------
  |  Branch (52:23): [True: 173, False: 157]
  ------------------
   53|    173|             std::istringstream tmp(host.substr(pos1+1));
   54|    173|             tmp >> port;
   55|    173|             host = host.substr(0, pos1);
   56|    173|          }
   57|    472|          return true;
   58|    500|      }; //<! parse host and port
_ZN6YaHTTP3URL9parsePathERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   79|    758|      bool parsePath(const std::string& url, size_t &pos) {
   80|    758|          size_t pos1;
   81|    758|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (81:15): [True: 407, False: 351]
  ------------------
   82|    351|          if (url[pos] != '/') return false; // not an url
  ------------------
  |  Branch (82:15): [True: 0, False: 351]
  ------------------
   83|    351|          if ( (pos1 = url.find_first_of("?", pos)) == std::string::npos ) {
  ------------------
  |  Branch (83:16): [True: 120, False: 231]
  ------------------
   84|    120|             path = url.substr(pos);
   85|    120|             pos = url.size();
   86|    231|          } else {
   87|    231|             path = url.substr(pos, pos1-pos);
   88|    231|             pos = pos1;
   89|    231|          }
   90|    351|          return true;
   91|    351|      }; //<! parse path component
_ZN6YaHTTP3URL15parseParametersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   93|    758|      bool parseParameters(const std::string& url, size_t &pos) {
   94|    758|          size_t pos1;
   95|    758|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (95:15): [True: 527, False: 231]
  ------------------
   96|    231|          if (url[pos] == '#') return true; // anchor starts here
  ------------------
  |  Branch (96:15): [True: 0, False: 231]
  ------------------
   97|    231|          if (url[pos] != '?') return false; // not a parameter
  ------------------
  |  Branch (97:15): [True: 0, False: 231]
  ------------------
   98|    231|          if ( (pos1 = url.find_first_of("#", pos)) == std::string::npos ) {
  ------------------
  |  Branch (98:16): [True: 140, False: 91]
  ------------------
   99|    140|             parameters = url.substr(pos+1);;
  100|    140|             pos = url.size();
  101|    140|          } else {
  102|     91|             parameters = url.substr(pos+1, pos1-pos-1);
  103|     91|             pos = pos1;
  104|     91|          }
  105|    231|          if (parameters.size()>0 && *(parameters.end()-1) == '&') parameters.resize(parameters.size()-1);
  ------------------
  |  Branch (105:15): [True: 151, False: 80]
  |  Branch (105:15): [True: 5, False: 226]
  |  Branch (105:38): [True: 5, False: 146]
  ------------------
  106|    231|          return true;
  107|    231|      }; //<! parse url parameters
_ZN6YaHTTP3URL11parseAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
  109|    758|      bool parseAnchor(const std::string& url, size_t &pos) {
  110|    758|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (110:15): [True: 667, False: 91]
  ------------------
  111|     91|          if (url[pos] != '#') return false; // not anchor
  ------------------
  |  Branch (111:15): [True: 0, False: 91]
  ------------------
  112|     91|          anchor = url.substr(pos+1);
  113|     91|          return true;
  114|     91|      }; //<! parse anchor

_ZN6YaHTTP7Utility9decodeURLERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  229|   314k|    static std::string decodeURL(const std::string& component) {
  230|   314k|        std::string result = component;
  231|   314k|        size_t pos1,pos2;
  232|   314k|        pos2 = 0;
  233|   722k|        while((pos1 = result.find_first_of("%", pos2))!=std::string::npos) {
  ------------------
  |  Branch (233:15): [True: 413k, False: 308k]
  ------------------
  234|   413k|           std::string code;
  235|   413k|           char a,b,c;
  236|   413k|           if (pos1 + 2 > result.length()) return result; // end of result
  ------------------
  |  Branch (236:16): [True: 5.84k, False: 407k]
  ------------------
  237|   407k|           code = result.substr(pos1+1, 2);
  238|   407k|           a = std::tolower(code[0]); b = std::tolower(code[1]);
  239|       |
  240|   407k|           if ((( '0' > a || a > '9') && ('a' > a || a > 'f')) ||
  ------------------
  |  Branch (240:19): [True: 223k, False: 183k]
  |  Branch (240:30): [True: 150k, False: 33.6k]
  |  Branch (240:43): [True: 250k, False: 123k]
  |  Branch (240:54): [True: 34.1k, False: 89.6k]
  ------------------
  241|   348k|              (( '0' > b || b > '9') && ('a' > b || b > 'f'))) {
  ------------------
  |  Branch (241:18): [True: 43.2k, False: 79.9k]
  |  Branch (241:29): [True: 73.7k, False: 6.21k]
  |  Branch (241:42): [True: 62.0k, False: 54.9k]
  |  Branch (241:53): [True: 2.46k, False: 52.5k]
  ------------------
  242|   348k|              pos2 = pos1+3;
  243|   348k|              continue;
  244|   348k|           }
  245|       |
  246|  58.7k|           if ('0' <= a && a <= '9') a = a - '0';
  ------------------
  |  Branch (246:16): [True: 58.7k, False: 0]
  |  Branch (246:28): [True: 6.09k, False: 52.6k]
  ------------------
  247|  52.6k|           else if ('a' <= a && a <= 'f') a = a - 'a' + 0x0a;
  ------------------
  |  Branch (247:21): [True: 52.6k, False: 0]
  |  Branch (247:33): [True: 52.6k, False: 0]
  ------------------
  248|  58.7k|           if ('0' <= b && b <= '9') b = b - '0';
  ------------------
  |  Branch (248:16): [True: 58.7k, False: 0]
  |  Branch (248:28): [True: 6.21k, False: 52.5k]
  ------------------
  249|  52.5k|           else if ('a' <= b && b <= 'f') b = b - 'a' + 0x0a;
  ------------------
  |  Branch (249:21): [True: 52.5k, False: 0]
  |  Branch (249:33): [True: 52.5k, False: 0]
  ------------------
  250|       |
  251|  58.7k|           c = (a<<4)+b;
  252|  58.7k|           result = result.replace(pos1,3,1,c);
  253|  58.7k|           pos2=pos1;
  254|  58.7k|        }
  255|   308k|        return result;
  256|   314k|    }; //<! Decodes %xx from string into bytes
_ZN6YaHTTP8DateTimeC2Ev:
   57|   154k|     DateTime() { 
   58|   154k|       initialize();
   59|   154k|     }; //<! Construct and initialize
_ZN6YaHTTP8DateTime10initializeEv:
   61|   154k|     void initialize() {
   62|   154k|       isSet = false; 
   63|   154k|       year = month = day = wday = hours = minutes = seconds = utc_offset = 0;
   64|   154k|       month = 1; // it's invalid otherwise
   65|   154k|     }; //<! Creates year 0 date
_ZNK6YaHTTP25ASCIICINullSafeComparatorclERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   26|   677k|    bool operator() (const std::string& lhs, const std::string& rhs) const {
   27|   677k|      int v;
   28|   677k|      std::string::const_iterator lhi = lhs.begin();
   29|   677k|      std::string::const_iterator rhi = rhs.begin();
   30|  1.45M|      for(;lhi != lhs.end() && rhi != rhs.end(); lhi++, rhi++)
  ------------------
  |  Branch (30:12): [True: 1.14M, False: 312k]
  |  Branch (30:12): [True: 1.13M, False: 323k]
  |  Branch (30:32): [True: 1.13M, False: 11.2k]
  ------------------
   31|  1.13M|        if ((v = ::tolower(*lhi) - ::tolower(*rhi)) != 0) return v<0; 
  ------------------
  |  Branch (31:13): [True: 353k, False: 776k]
  ------------------
   32|   323k|      if (lhi == lhs.end() && rhi != rhs.end()) return true;
  ------------------
  |  Branch (32:11): [True: 312k, False: 11.2k]
  |  Branch (32:11): [True: 85.8k, False: 238k]
  |  Branch (32:31): [True: 85.8k, False: 226k]
  ------------------
   33|   238k|      if (lhi != lhs.end() && rhi == rhs.end()) return false;
  ------------------
  |  Branch (33:11): [True: 11.2k, False: 226k]
  |  Branch (33:11): [True: 11.2k, False: 226k]
  |  Branch (33:31): [True: 11.2k, False: 0]
  ------------------
   34|   226k|      return false; // they are equal
   35|   238k|    }
_ZN6YaHTTP7Utility7iequalsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_m:
  419|    122|    static bool iequals(const std::string& a, const std::string& b, size_t length) {
  420|    122|      std::string::const_iterator ai, bi;
  421|    122|      size_t i;
  422|  3.27k|      for(ai = a.begin(), bi = b.begin(), i = 0; ai != a.end() && bi != b.end() && i < length; ai++,bi++,i++) {
  ------------------
  |  Branch (422:50): [True: 3.25k, False: 18]
  |  Branch (422:50): [True: 3.16k, False: 111]
  |  Branch (422:67): [True: 3.25k, False: 0]
  |  Branch (422:84): [True: 3.16k, False: 93]
  ------------------
  423|  3.16k|        if (::toupper(*ai) != ::toupper(*bi)) return false;
  ------------------
  |  Branch (423:13): [True: 11, False: 3.15k]
  ------------------
  424|  3.16k|      }
  425|       |
  426|    111|      if (ai == a.end() && bi == b.end()) return true;
  ------------------
  |  Branch (426:11): [True: 18, False: 93]
  |  Branch (426:11): [True: 0, False: 111]
  |  Branch (426:28): [True: 0, False: 18]
  ------------------
  427|    111|      if ((ai == a.end() && bi != b.end()) ||
  ------------------
  |  Branch (427:11): [True: 18, False: 93]
  |  Branch (427:12): [True: 18, False: 93]
  |  Branch (427:29): [True: 18, False: 0]
  ------------------
  428|     93|          (ai != a.end() && bi == b.end())) return false;
  ------------------
  |  Branch (428:12): [True: 93, False: 0]
  |  Branch (428:29): [True: 0, False: 93]
  ------------------
  429|       |      
  430|     93|      return ::toupper(*ai) == ::toupper(*bi);
  431|    111|    }; //<! case-insensitive comparison with length
_ZN6YaHTTP7Utility18parseUrlParametersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  376|  4.04k|    static strstr_map_t parseUrlParameters(const std::string& parameters) {
  377|  4.04k|      if (parameters.size() > YAHTTP_MAX_REQUEST_LINE_SIZE) {
  ------------------
  |  |    4|  4.04k|#define YAHTTP_MAX_REQUEST_LINE_SIZE 8192
  ------------------
  |  Branch (377:11): [True: 2, False: 4.03k]
  ------------------
  378|      2|        return {};
  379|      2|      }
  380|  4.03k|      std::string::size_type pos = 0;
  381|  4.03k|      strstr_map_t parameter_map;
  382|  20.0k|      while (pos != std::string::npos) {
  ------------------
  |  Branch (382:14): [True: 20.0k, False: 0]
  ------------------
  383|       |        // find next parameter start
  384|  20.0k|        std::string::size_type nextpos = parameters.find('&', pos);
  385|  20.0k|        std::string::size_type delim = parameters.find('=', pos);
  386|  20.0k|        if (delim > nextpos) {
  ------------------
  |  Branch (386:13): [True: 14.2k, False: 5.80k]
  ------------------
  387|  14.2k|          delim = nextpos;
  388|  14.2k|        }
  389|  20.0k|        std::string key;
  390|  20.0k|        std::string value;
  391|  20.0k|        if (delim == std::string::npos) {
  ------------------
  |  Branch (391:13): [True: 3.80k, False: 16.2k]
  ------------------
  392|  3.80k|          key = parameters.substr(pos);
  393|  16.2k|        } else {
  394|  16.2k|          key = parameters.substr(pos, delim-pos);
  395|  16.2k|          if (nextpos == std::string::npos) {
  ------------------
  |  Branch (395:15): [True: 121, False: 16.0k]
  ------------------
  396|    121|            value = parameters.substr(delim+1);
  397|  16.0k|          } else {
  398|  16.0k|            value = parameters.substr(delim+1, nextpos-delim-1);
  399|  16.0k|          }
  400|  16.2k|        }
  401|  20.0k|        if (key.empty()) {
  ------------------
  |  Branch (401:13): [True: 3.32k, False: 16.6k]
  ------------------
  402|       |          // no parameters at all
  403|  3.32k|          break;
  404|  3.32k|        }
  405|  16.6k|        parameter_map[decodeURL(key)] = decodeURL(value);
  406|  16.6k|        if (nextpos == std::string::npos) {
  ------------------
  |  Branch (406:13): [True: 709, False: 15.9k]
  ------------------
  407|       |          // no more parameters left
  408|    709|          break;
  409|    709|        }
  410|  15.9k|        if (parameter_map.size() >= YAHTTP_MAX_REQUEST_FIELDS) {
  ------------------
  |  |    8|  15.9k|#define YAHTTP_MAX_REQUEST_FIELDS 100
  ------------------
  |  Branch (410:13): [True: 5, False: 15.9k]
  ------------------
  411|      5|          break;
  412|      5|        }
  413|       |
  414|  15.9k|        pos = nextpos+1;
  415|  15.9k|      }
  416|  4.03k|      return parameter_map;
  417|  4.04k|    }; //<! parses URL parameters into string map 
_ZN6YaHTTP7Utility8trimLeftERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  438|  25.7k|    static void trimLeft(std::string &str) {
  439|  25.7k|       const std::locale &loc = std::locale::classic();
  440|  25.7k|       std::string::iterator iter = str.begin();
  441|  26.7k|       while(iter != str.end() && YaHTTP::isspace(*iter, loc)) iter++;
  ------------------
  |  Branch (441:14): [True: 7.28k, False: 19.4k]
  |  Branch (441:14): [True: 1.00k, False: 25.7k]
  |  Branch (441:35): [True: 1.00k, False: 6.27k]
  ------------------
  442|  25.7k|       str.erase(str.begin(), iter);
  443|  25.7k|    }; //<! removes whitespace from left
_ZN6YaHTTP7Utility9trimRightERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  445|  25.7k|    static void trimRight(std::string &str) {
  446|  25.7k|       const std::locale &loc = std::locale::classic();
  447|  25.7k|       std::string::reverse_iterator iter = str.rbegin();
  448|  27.1k|       while(iter != str.rend() && YaHTTP::isspace(*iter, loc)) iter++;
  ------------------
  |  Branch (448:14): [True: 7.70k, False: 19.4k]
  |  Branch (448:14): [True: 1.42k, False: 25.7k]
  |  Branch (448:36): [True: 1.42k, False: 6.27k]
  ------------------
  449|  25.7k|       str.erase(iter.base(), str.end());
  450|  25.7k|    }; //<! removes whitespace from right
_ZN6YaHTTP7Utility4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  452|  25.7k|    static void trim(std::string &str) {
  453|  25.7k|       trimLeft(str);
  454|  25.7k|       trimRight(str);
  455|  25.7k|    }; //<! removes whitespace from left and right

LLVMFuzzerTestOneInput:
   30|  4.10k|{
   31|  4.10k|  try {
   32|  4.10k|    YaHTTP::AsyncRequestLoader yarl;
   33|  4.10k|    YaHTTP::Request req;
   34|       |
   35|  4.10k|    yarl.initialize(&req);
   36|  4.10k|    bool finished = yarl.feed(std::string(reinterpret_cast<const char*>(data), size));
   37|  4.10k|    if (finished) {
  ------------------
  |  Branch (37:9): [True: 371, False: 3.73k]
  ------------------
   38|    371|      yarl.finalize();
   39|    371|    }
   40|  4.10k|  }
   41|  4.10k|  catch (const YaHTTP::ParseError& e) {
   42|    645|  }
   43|  4.10k|  catch (const std::exception& e) {
   44|     25|  }
   45|  4.10k|  catch (...) {
   46|      0|  }
   47|       |
   48|  4.10k|  return 0;
   49|  4.10k|}

