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

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

_ZN6YaHTTP7isspaceEc:
   10|  1.14M|  bool isspace(char c) {
   11|  1.14M|    return std::isspace(c) != 0;
   12|  1.14M|  }
_ZN6YaHTTP7isspaceEcRKNSt3__16localeE:
   14|  15.1k|  bool isspace(char c, const std::locale& loc) {
   15|  15.1k|    return std::isspace(c, loc);
   16|  15.1k|  }
_ZN6YaHTTP11AsyncLoaderINS_7RequestEE4feedERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   44|  4.13k|  {
   45|  4.13k|    if (state < 2) {
  ------------------
  |  Branch (45:9): [True: 4.13k, False: 0]
  ------------------
   46|  4.13k|      headersize += somedata.length(); // maye include some body data, we don't know yet...
   47|  4.13k|      if (headersize > target->max_header_size) {
  ------------------
  |  Branch (47:11): [True: 45, False: 4.09k]
  ------------------
   48|     45|        if (target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|     45|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (48:13): [True: 45, False: 0]
  ------------------
   49|     45|          throw ParseError("Request header too large");
   50|     45|        }
   51|      0|        else {
   52|      0|          throw ParseError("Response header too large");
   53|      0|        }
   54|     45|      }
   55|  4.13k|    }
   56|  4.09k|    buffer.append(somedata);
   57|  34.9k|    while(state < 2) {
  ------------------
  |  Branch (57:11): [True: 34.7k, False: 138]
  ------------------
   58|  34.7k|      int cr=0;
   59|  34.7k|      pos = buffer.find_first_of("\n");
   60|       |      // need to find CRLF in buffer
   61|  34.7k|      if (pos == std::string::npos) return false;
  ------------------
  |  Branch (61:11): [True: 2.84k, False: 31.9k]
  ------------------
   62|  31.9k|      if (pos>0 && buffer[pos-1]=='\r')
  ------------------
  |  Branch (62:11): [True: 28.7k, False: 3.17k]
  |  Branch (62:20): [True: 220, False: 28.5k]
  ------------------
   63|    220|        cr=1;
   64|  31.9k|      std::string line(buffer.begin(), buffer.begin()+pos-cr); // exclude CRLF
   65|  31.9k|      buffer.erase(buffer.begin(), buffer.begin()+pos+1); // remove line from buffer including CRLF
   66|       |
   67|  31.9k|      if (state == 0) { // startup line
  ------------------
  |  Branch (67:11): [True: 4.07k, False: 27.8k]
  ------------------
   68|  4.07k|        if (target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  4.07k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (68:13): [True: 4.07k, False: 0]
  ------------------
   69|  4.07k|          std::string ver;
   70|  4.07k|          std::string tmpurl;
   71|  4.07k|          std::istringstream iss(line);
   72|  4.07k|          iss >> target->method >> tmpurl >> ver;
   73|  4.07k|          if (ver.size() == 0)
  ------------------
  |  Branch (73:15): [True: 3.99k, False: 78]
  ------------------
   74|  3.99k|            target->version = 9;
   75|     78|          else if (ver.find("HTTP/0.9") == 0)
  ------------------
  |  Branch (75:20): [True: 2, False: 76]
  ------------------
   76|      2|            target->version = 9;
   77|     76|          else if (ver.find("HTTP/1.0") == 0)
  ------------------
  |  Branch (77:20): [True: 2, False: 74]
  ------------------
   78|      2|            target->version = 10;
   79|     74|          else if (ver.find("HTTP/1.1") == 0)
  ------------------
  |  Branch (79:20): [True: 2, False: 72]
  ------------------
   80|      2|            target->version = 11;
   81|     72|          else
   82|     72|            throw ParseError("HTTP version not supported");
   83|       |          // uppercase the target method
   84|  4.00k|          std::transform(target->method.begin(), target->method.end(), target->method.begin(), ::toupper);
   85|  4.00k|          target->url.parse(tmpurl);
   86|  4.00k|          target->getvars = Utility::parseUrlParameters(target->url.parameters);
   87|  4.00k|          state = 1;
   88|  4.00k|        } 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|  27.8k|      } else if (state == 1) {
  ------------------
  |  Branch (112:18): [True: 27.8k, False: 0]
  ------------------
  113|  27.8k|        std::string key,value;
  114|  27.8k|        size_t pos1;
  115|  27.8k|        if (line.empty()) {
  ------------------
  |  Branch (115:13): [True: 997, False: 26.8k]
  ------------------
  116|    997|          chunked = (target->headers.find("transfer-encoding") != target->headers.end() && target->headers["transfer-encoding"] == "chunked");
  ------------------
  |  Branch (116:22): [True: 449, False: 548]
  |  Branch (116:92): [True: 422, False: 27]
  ------------------
  117|    997|          state = 2;
  118|    997|          break;
  119|    997|        }
  120|       |        // split headers
  121|  26.8k|        if ((pos1 = line.find(':')) == std::string::npos) {
  ------------------
  |  Branch (121:13): [True: 27, False: 26.8k]
  ------------------
  122|     27|          throw ParseError("Malformed header line");
  123|     27|        }
  124|  26.8k|        key = line.substr(0, pos1);
  125|  26.8k|        value = line.substr(pos1 + 1);
  126|  1.17M|        for(std::string::iterator it=key.begin(); it != key.end(); it++)
  ------------------
  |  Branch (126:51): [True: 1.14M, False: 26.8k]
  ------------------
  127|  1.14M|          if (YaHTTP::isspace(*it))
  ------------------
  |  Branch (127:15): [True: 18, False: 1.14M]
  ------------------
  128|     18|            throw ParseError("Header key contains whitespace which is not allowed by RFC");
  129|       |
  130|  26.8k|        Utility::trim(value);
  131|  26.8k|        std::transform(key.begin(), key.end(), key.begin(), ::tolower);
  132|       |        // is it already defined
  133|       |
  134|  26.8k|        if (key == "set-cookie" && target->kind == YAHTTP_TYPE_RESPONSE) {
  ------------------
  |  |   36|    211|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (134:13): [True: 211, False: 26.6k]
  |  Branch (134:36): [True: 0, False: 211]
  ------------------
  135|      0|          target->jar.parseSetCookieHeader(value);
  136|  26.8k|        } else if (key == "cookie" && target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  2.23k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (136:20): [True: 2.23k, False: 24.5k]
  |  Branch (136:39): [True: 2.23k, False: 0]
  ------------------
  137|  2.23k|          target->jar.parseCookieHeader(value);
  138|  24.5k|        } else {
  139|  24.5k|          if (key == "host" && target->kind == YAHTTP_TYPE_REQUEST) {
  ------------------
  |  |   35|  1.97k|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (139:15): [True: 1.97k, False: 22.6k]
  |  Branch (139:32): [True: 1.97k, False: 0]
  ------------------
  140|       |            // maybe it contains port?
  141|  1.97k|            if ((pos1 = value.find(':')) == std::string::npos) {
  ------------------
  |  Branch (141:17): [True: 371, False: 1.60k]
  ------------------
  142|    371|              target->url.host = value;
  143|  1.60k|            } else {
  144|  1.60k|              target->url.host = value.substr(0, pos1);
  145|  1.60k|              target->url.port = ::atoi(value.substr(pos1).c_str());
  146|  1.60k|            }
  147|  1.97k|          }
  148|  24.5k|          if (target->headers.find(key) != target->headers.end()) {
  ------------------
  |  Branch (148:15): [True: 11.9k, False: 12.6k]
  ------------------
  149|  11.9k|            target->headers[key] = target->headers[key] + ";" + value;
  150|  12.6k|          } else {
  151|  12.6k|            target->headers[key] = std::move(value);
  152|  12.6k|          }
  153|  24.5k|        }
  154|  26.8k|      }
  155|  31.9k|    }
  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: 997, False: 138]
  ------------------
  160|    138|    else if (target->kind == YAHTTP_TYPE_RESPONSE) maxbody = target->max_response_size;
  ------------------
  |  |   36|    138|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (160:14): [True: 0, False: 138]
  ------------------
  161|    138|    else maxbody = 0;
  162|       |
  163|  1.13k|    if (!chunked) {
  ------------------
  |  Branch (163:9): [True: 575, False: 560]
  ------------------
  164|    575|      if (target->headers.find("content-length") != target->headers.end()) {
  ------------------
  |  Branch (164:11): [True: 370, False: 205]
  ------------------
  165|    370|        std::istringstream maxbodyS(target->headers["content-length"]);
  166|    370|        maxbodyS >> minbody;
  167|    370|        maxbody = minbody;
  168|    370|      }
  169|    575|      if (minbody < 1) return true; // guess there isn't anything left.
  ------------------
  |  Branch (169:11): [True: 215, False: 360]
  ------------------
  170|    360|      if (target->kind == YAHTTP_TYPE_REQUEST && minbody > target->max_request_size) throw ParseError("Max request body size exceeded");
  ------------------
  |  |   35|    720|#define YAHTTP_TYPE_REQUEST 1
  ------------------
  |  Branch (170:11): [True: 360, False: 0]
  |  Branch (170:50): [True: 153, False: 207]
  ------------------
  171|    207|      else if (target->kind == YAHTTP_TYPE_RESPONSE && minbody > target->max_response_size) throw ParseError("Max response body size exceeded");
  ------------------
  |  |   36|    414|#define YAHTTP_TYPE_RESPONSE 2
  ------------------
  |  Branch (171:16): [True: 0, False: 207]
  |  Branch (171:56): [True: 0, False: 0]
  ------------------
  172|    360|    }
  173|       |
  174|    767|    if (maxbody == 0) hasBody = false;
  ------------------
  |  Branch (174:9): [True: 0, False: 767]
  ------------------
  175|    767|    else hasBody = true;
  176|       |
  177|    767|    if (buffer.size() == 0) return ready();
  ------------------
  |  Branch (177:9): [True: 24, False: 743]
  ------------------
  178|       |
  179|  4.15k|    while(buffer.size() > 0) {
  ------------------
  |  Branch (179:11): [True: 3.79k, False: 359]
  ------------------
  180|  3.79k|      if (chunked) {
  ------------------
  |  Branch (180:11): [True: 3.61k, False: 185]
  ------------------
  181|  3.61k|        if (chunk_size == 0) {
  ------------------
  |  Branch (181:13): [True: 1.94k, False: 1.66k]
  ------------------
  182|  1.94k|          char buf[100];
  183|       |          // read chunk length
  184|  1.94k|          if ((pos = buffer.find('\n')) == std::string::npos) return false;
  ------------------
  |  Branch (184:15): [True: 13, False: 1.93k]
  ------------------
  185|  1.93k|          if (pos > 99)
  ------------------
  |  Branch (185:15): [True: 28, False: 1.90k]
  ------------------
  186|     28|            throw ParseError("Impossible chunk_size");
  187|  1.90k|          buffer.copy(buf, pos);
  188|  1.90k|          buf[pos]=0; // just in case...
  189|  1.90k|          buffer.erase(buffer.begin(), buffer.begin()+pos+1); // remove line from buffer
  190|  1.90k|          if (sscanf(buf, "%zx", &chunk_size) != 1) {
  ------------------
  |  Branch (190:15): [True: 24, False: 1.87k]
  ------------------
  191|     24|            throw ParseError("Unable to parse chunk size");
  192|     24|          }
  193|  1.87k|          if (chunk_size == 0) { state = 3; break; } // last chunk
  ------------------
  |  Branch (193:15): [True: 4, False: 1.87k]
  ------------------
  194|  1.87k|          if (chunk_size > (std::numeric_limits<decltype(chunk_size)>::max() - 2) || chunk_size > maxbody) {
  ------------------
  |  Branch (194:15): [True: 3, False: 1.87k]
  |  Branch (194:86): [True: 168, False: 1.70k]
  ------------------
  195|    171|            throw ParseError("Chunk is too large");
  196|    171|          }
  197|  1.87k|        } else {
  198|  1.66k|          int crlf=1;
  199|  1.66k|          if (buffer.size() < chunk_size+1) return false; // expect newline
  ------------------
  |  Branch (199:15): [True: 38, False: 1.63k]
  ------------------
  200|  1.63k|          if (buffer.at(chunk_size) == '\r') {
  ------------------
  |  Branch (200:15): [True: 429, False: 1.20k]
  ------------------
  201|    429|            if (buffer.size() < chunk_size+2 || buffer.at(chunk_size+1) != '\n') return false; // expect newline after carriage return
  ------------------
  |  Branch (201:17): [True: 5, False: 424]
  |  Branch (201:49): [True: 9, False: 415]
  ------------------
  202|    415|            crlf=2;
  203|  1.20k|          } else if (buffer.at(chunk_size) != '\n') return false;
  ------------------
  |  Branch (203:22): [True: 25, False: 1.17k]
  ------------------
  204|  1.59k|          if (bodysize + chunk_size > maxbody) {
  ------------------
  |  Branch (204:15): [True: 0, False: 1.59k]
  ------------------
  205|      0|            throw ParseError("Chunked body is too large");
  206|      0|          }
  207|  1.59k|          std::string tmp = buffer.substr(0, chunk_size);
  208|  1.59k|          buffer.erase(buffer.begin(), buffer.begin()+chunk_size+crlf);
  209|  1.59k|          bodybuf << tmp;
  210|  1.59k|          bodysize += chunk_size;
  211|  1.59k|          chunk_size = 0;
  212|  1.59k|          if (buffer.size() == 0) break; // just in case
  ------------------
  |  Branch (212:15): [True: 67, False: 1.52k]
  ------------------
  213|  1.59k|        }
  214|  3.61k|      } else {
  215|    185|        if (bodysize + buffer.length() > maxbody) {
  ------------------
  |  Branch (215:13): [True: 85, False: 100]
  ------------------
  216|     85|          bodybuf << buffer.substr(0, maxbody - bodybuf.str().length());
  217|     85|          bodysize = maxbody;
  218|     85|        }
  219|    100|        else {
  220|    100|          bodybuf << buffer;
  221|    100|          bodysize += buffer.length();
  222|    100|        }
  223|    185|        buffer = "";
  224|    185|      }
  225|  3.79k|    }
  226|       |
  227|    430|    if (chunk_size!=0) return false; // need more data
  ------------------
  |  Branch (227:9): [True: 36, False: 394]
  ------------------
  228|       |
  229|    394|    return ready();
  230|    430|  };

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

_ZN6YaHTTP3URLC2Ev:
  166|  4.13k|      URL() { initialize(); }; //<! construct empty url
_ZN6YaHTTP3URL10initializeEv:
  116|  20.5k|      void initialize() {
  117|  20.5k|        protocol = ""; host = ""; port = 0; username = ""; password = ""; path = ""; parameters = ""; anchor =""; pathless = true;
  118|  20.5k|      }; //<! initialize to empty URL
_ZN6YaHTTP3URLC2EPKc:
  171|  12.4k|      URL(const char *url) {
  172|  12.4k|        parse(std::string(url));
  173|  12.4k|      }; //<! calls parse with url
_ZN6YaHTTP3URL5parseERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  175|  16.4k|      bool parse(const std::string& url) {
  176|       |        // setup
  177|  16.4k|        initialize();
  178|       |
  179|  16.4k|        if (url.size() > YAHTTP_MAX_URL_LENGTH) return false;
  ------------------
  |  |    8|  16.4k|#define YAHTTP_MAX_URL_LENGTH 2048
  ------------------
  |  Branch (179:13): [True: 10, False: 16.4k]
  ------------------
  180|  16.4k|        size_t pos = 0;
  181|  16.4k|        if (*(url.begin()) != '/') { // full url?
  ------------------
  |  Branch (181:13): [True: 16.1k, False: 237]
  ------------------
  182|  16.1k|          if (parseSchema(url, pos) == false) return false;
  ------------------
  |  Branch (182:15): [True: 14.7k, False: 1.38k]
  ------------------
  183|  1.38k|          if (pathless) {
  ------------------
  |  Branch (183:15): [True: 828, False: 557]
  ------------------
  184|    828|            parameters = url.substr(pos);
  185|    828|            return true;
  186|    828|          }
  187|    557|          if (parseUserPass(url, pos) == false) return false;
  ------------------
  |  Branch (187:15): [True: 0, False: 557]
  ------------------
  188|    557|          if (parseHost(url, pos) == false) return false;
  ------------------
  |  Branch (188:15): [True: 26, False: 531]
  ------------------
  189|    557|        }
  190|    768|        if (parsePath(url, pos) == false) return false;
  ------------------
  |  Branch (190:13): [True: 0, False: 768]
  ------------------
  191|    768|        if (parseParameters(url, pos) == false) return false;
  ------------------
  |  Branch (191:13): [True: 0, False: 768]
  ------------------
  192|    768|        return parseAnchor(url, pos);
  193|    768|    }; //<! 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.1k|      bool parseSchema(const std::string& url, size_t &pos) {
   16|  16.1k|          size_t pos1;
   17|  16.1k|          if (pos >= url.size()) return false; // no data
  ------------------
  |  Branch (17:15): [True: 14.7k, 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: 34, 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.38k]
  ------------------
   21|  1.38k|          if (protocol == "https") port = 443;
  ------------------
  |  Branch (21:15): [True: 1, False: 1.38k]
  ------------------
   22|  1.38k|          pos = pos1+1; // after :
   23|  1.38k|          if (url.compare(pos, 2, "//") == 0) {
  ------------------
  |  Branch (23:15): [True: 557, False: 828]
  ------------------
   24|    557|             pathless = false; // if this is true we put rest into parameters
   25|    557|             pos += 2;
   26|    557|          }
   27|  1.38k|          return true;
   28|  1.41k|      }; //<! parse schema/protocol part 
_ZN6YaHTTP3URL13parseUserPassERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   60|    557|      bool parseUserPass(const std::string& url, size_t &pos) {
   61|    557|          size_t pos1,pos2;
   62|    557|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (62:15): [True: 1, False: 556]
  ------------------
   63|       |
   64|    556|          if ( (pos1 = url.find_first_of("@",pos)) == std::string::npos ) return true; // no userinfo
  ------------------
  |  Branch (64:16): [True: 343, False: 213]
  ------------------
   65|    213|          pos2 = url.find_first_of(":",pos);
   66|       |
   67|    213|          if (pos2 != std::string::npos) { // comes with password
  ------------------
  |  Branch (67:15): [True: 131, False: 82]
  ------------------
   68|    131|             username = url.substr(pos, pos2 - pos);
   69|    131|             password = url.substr(pos2+1, pos1 - pos2 - 1);
   70|    131|             password = Utility::decodeURL(password);
   71|    131|          } else {
   72|     82|             username = url.substr(pos, pos1 - pos);
   73|     82|          }
   74|    213|          pos = pos1+1;
   75|    213|          username = Utility::decodeURL(username);
   76|    213|          return true;
   77|    556|      }; //<! parse possible username and password
_ZN6YaHTTP3URL9parseHostERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   30|    557|      bool parseHost(const std::string& url, size_t &pos) {
   31|    557|          size_t pos1;
   32|    557|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (32:15): [True: 75, False: 482]
  ------------------
   33|    482|          if ( (pos1 = url.find_first_of("/", pos)) == std::string::npos ) {
  ------------------
  |  Branch (33:16): [True: 346, False: 136]
  ------------------
   34|    346|             host = url.substr(pos);
   35|    346|             path = "/";
   36|    346|             pos = url.size();
   37|    346|          } else {
   38|    136|             host = url.substr(pos, pos1-pos);
   39|    136|             pos = pos1;
   40|    136|          }
   41|    482|          if (host.at(0) == '[') { // IPv6
  ------------------
  |  Branch (41:15): [True: 166, False: 316]
  ------------------
   42|    166|            if ((pos1 = host.find_first_of("]")) == std::string::npos) {
  ------------------
  |  Branch (42:17): [True: 26, False: 140]
  ------------------
   43|       |              // incomplete address
   44|     26|              return false;
   45|     26|            }
   46|    140|            size_t pos2;
   47|    140|            if ((pos2 = host.find_first_of(":", pos1)) != std::string::npos) {
  ------------------
  |  Branch (47:17): [True: 63, False: 77]
  ------------------
   48|     63|              std::istringstream tmp(host.substr(pos2 + 1));
   49|     63|              tmp >> port;
   50|     63|            }
   51|    140|            host = host.substr(1, pos1 - 1);
   52|    316|          } else if ( (pos1 = host.find_first_of(":")) != std::string::npos ) {
  ------------------
  |  Branch (52:23): [True: 162, False: 154]
  ------------------
   53|    162|             std::istringstream tmp(host.substr(pos1+1));
   54|    162|             tmp >> port;
   55|    162|             host = host.substr(0, pos1);
   56|    162|          }
   57|    456|          return true;
   58|    482|      }; //<! parse host and port
_ZN6YaHTTP3URL9parsePathERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   79|    744|      bool parsePath(const std::string& url, size_t &pos) {
   80|    744|          size_t pos1;
   81|    744|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (81:15): [True: 397, False: 347]
  ------------------
   82|    347|          if (url[pos] != '/') return false; // not an url
  ------------------
  |  Branch (82:15): [True: 0, False: 347]
  ------------------
   83|    347|          if ( (pos1 = url.find_first_of("?", pos)) == std::string::npos ) {
  ------------------
  |  Branch (83:16): [True: 113, False: 234]
  ------------------
   84|    113|             path = url.substr(pos);
   85|    113|             pos = url.size();
   86|    234|          } else {
   87|    234|             path = url.substr(pos, pos1-pos);
   88|    234|             pos = pos1;
   89|    234|          }
   90|    347|          return true;
   91|    347|      }; //<! parse path component
_ZN6YaHTTP3URL15parseParametersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   93|    744|      bool parseParameters(const std::string& url, size_t &pos) {
   94|    744|          size_t pos1;
   95|    744|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (95:15): [True: 510, False: 234]
  ------------------
   96|    234|          if (url[pos] == '#') return true; // anchor starts here
  ------------------
  |  Branch (96:15): [True: 0, False: 234]
  ------------------
   97|    234|          if (url[pos] != '?') return false; // not a parameter
  ------------------
  |  Branch (97:15): [True: 0, False: 234]
  ------------------
   98|    234|          if ( (pos1 = url.find_first_of("#", pos)) == std::string::npos ) {
  ------------------
  |  Branch (98:16): [True: 135, False: 99]
  ------------------
   99|    135|             parameters = url.substr(pos+1);;
  100|    135|             pos = url.size();
  101|    135|          } else {
  102|     99|             parameters = url.substr(pos+1, pos1-pos-1);
  103|     99|             pos = pos1;
  104|     99|          }
  105|    234|          if (parameters.size()>0 && *(parameters.end()-1) == '&') parameters.resize(parameters.size()-1);
  ------------------
  |  Branch (105:15): [True: 156, False: 78]
  |  Branch (105:15): [True: 7, False: 227]
  |  Branch (105:38): [True: 7, False: 149]
  ------------------
  106|    234|          return true;
  107|    234|      }; //<! parse url parameters
_ZN6YaHTTP3URL11parseAnchorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
  109|    744|      bool parseAnchor(const std::string& url, size_t &pos) {
  110|    744|          if (pos >= url.size()) return true; // no data
  ------------------
  |  Branch (110:15): [True: 645, False: 99]
  ------------------
  111|     99|          if (url[pos] != '#') return false; // not anchor
  ------------------
  |  Branch (111:15): [True: 0, False: 99]
  ------------------
  112|     99|          anchor = url.substr(pos+1);
  113|     99|          return true;
  114|     99|      }; //<! parse anchor

_ZN6YaHTTP7Utility9decodeURLERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  229|   330k|    static std::string decodeURL(const std::string& component) {
  230|   330k|        std::string result = component;
  231|   330k|        size_t pos1,pos2;
  232|   330k|        pos2 = 0;
  233|   633k|        while((pos1 = result.find_first_of("%", pos2))!=std::string::npos) {
  ------------------
  |  Branch (233:15): [True: 308k, False: 325k]
  ------------------
  234|   308k|           std::string code;
  235|   308k|           char a,b,c;
  236|   308k|           if (pos1 + 2 > result.length()) return result; // end of result
  ------------------
  |  Branch (236:16): [True: 5.13k, False: 303k]
  ------------------
  237|   303k|           code = result.substr(pos1+1, 2);
  238|   303k|           a = std::tolower(code[0]); b = std::tolower(code[1]);
  239|       |
  240|   303k|           if ((( '0' > a || a > '9') && ('a' > a || a > 'f')) ||
  ------------------
  |  Branch (240:19): [True: 132k, False: 171k]
  |  Branch (240:30): [True: 135k, False: 35.6k]
  |  Branch (240:43): [True: 155k, False: 112k]
  |  Branch (240:54): [True: 30.6k, False: 81.7k]
  ------------------
  241|   244k|              (( '0' > b || b > '9') && ('a' > b || b > 'f'))) {
  ------------------
  |  Branch (241:18): [True: 37.9k, False: 79.4k]
  |  Branch (241:29): [True: 71.9k, False: 7.50k]
  |  Branch (241:42): [True: 57.4k, False: 52.3k]
  |  Branch (241:53): [True: 1.47k, False: 50.9k]
  ------------------
  242|   244k|              pos2 = pos1+3;
  243|   244k|              continue;
  244|   244k|           }
  245|       |
  246|  58.4k|           if ('0' <= a && a <= '9') a = a - '0';
  ------------------
  |  Branch (246:16): [True: 58.4k, False: 0]
  |  Branch (246:28): [True: 7.47k, False: 50.9k]
  ------------------
  247|  50.9k|           else if ('a' <= a && a <= 'f') a = a - 'a' + 0x0a;
  ------------------
  |  Branch (247:21): [True: 50.9k, False: 0]
  |  Branch (247:33): [True: 50.9k, False: 0]
  ------------------
  248|  58.4k|           if ('0' <= b && b <= '9') b = b - '0';
  ------------------
  |  Branch (248:16): [True: 58.4k, False: 0]
  |  Branch (248:28): [True: 7.50k, False: 50.9k]
  ------------------
  249|  50.9k|           else if ('a' <= b && b <= 'f') b = b - 'a' + 0x0a;
  ------------------
  |  Branch (249:21): [True: 50.9k, False: 0]
  |  Branch (249:33): [True: 50.9k, False: 0]
  ------------------
  250|       |
  251|  58.4k|           c = (a<<4)+b;
  252|  58.4k|           result = result.replace(pos1,3,1,c);
  253|  58.4k|           pos2=pos1;
  254|  58.4k|        }
  255|   325k|        return result;
  256|   330k|    }; //<! Decodes %xx from string into bytes
_ZN6YaHTTP8DateTimeC2Ev:
   57|   163k|     DateTime() { 
   58|   163k|       initialize();
   59|   163k|     }; //<! Construct and initialize
_ZN6YaHTTP8DateTime10initializeEv:
   61|   163k|     void initialize() {
   62|   163k|       isSet = false; 
   63|   163k|       year = month = day = wday = hours = minutes = seconds = utc_offset = 0;
   64|   163k|       month = 1; // it's invalid otherwise
   65|   163k|     }; //<! Creates year 0 date
_ZNK6YaHTTP25ASCIICINullSafeComparatorclERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   26|   724k|    bool operator() (const std::string& lhs, const std::string& rhs) const {
   27|   724k|      int v;
   28|   724k|      std::string::const_iterator lhi = lhs.begin();
   29|   724k|      std::string::const_iterator rhi = rhs.begin();
   30|  1.46M|      for(;lhi != lhs.end() && rhi != rhs.end(); lhi++, rhi++)
  ------------------
  |  Branch (30:12): [True: 1.10M, False: 351k]
  |  Branch (30:12): [True: 1.09M, False: 363k]
  |  Branch (30:32): [True: 1.09M, False: 11.6k]
  ------------------
   31|  1.09M|        if ((v = ::tolower(*lhi) - ::tolower(*rhi)) != 0) return v<0; 
  ------------------
  |  Branch (31:13): [True: 361k, False: 736k]
  ------------------
   32|   363k|      if (lhi == lhs.end() && rhi != rhs.end()) return true;
  ------------------
  |  Branch (32:11): [True: 351k, False: 11.6k]
  |  Branch (32:11): [True: 105k, False: 258k]
  |  Branch (32:31): [True: 105k, False: 246k]
  ------------------
   33|   258k|      if (lhi != lhs.end() && rhi == rhs.end()) return false;
  ------------------
  |  Branch (33:11): [True: 11.6k, False: 246k]
  |  Branch (33:11): [True: 11.6k, False: 246k]
  |  Branch (33:31): [True: 11.6k, False: 0]
  ------------------
   34|   246k|      return false; // they are equal
   35|   258k|    }
_ZN6YaHTTP7Utility7iequalsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_m:
  419|    118|    static bool iequals(const std::string& a, const std::string& b, size_t length) {
  420|    118|      std::string::const_iterator ai, bi;
  421|    118|      size_t i;
  422|  3.08k|      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.06k, False: 19]
  |  Branch (422:50): [True: 2.97k, False: 106]
  |  Branch (422:67): [True: 3.06k, False: 0]
  |  Branch (422:84): [True: 2.97k, False: 87]
  ------------------
  423|  2.97k|        if (::toupper(*ai) != ::toupper(*bi)) return false;
  ------------------
  |  Branch (423:13): [True: 12, False: 2.96k]
  ------------------
  424|  2.97k|      }
  425|       |
  426|    106|      if (ai == a.end() && bi == b.end()) return true;
  ------------------
  |  Branch (426:11): [True: 19, False: 87]
  |  Branch (426:11): [True: 0, False: 106]
  |  Branch (426:28): [True: 0, False: 19]
  ------------------
  427|    106|      if ((ai == a.end() && bi != b.end()) ||
  ------------------
  |  Branch (427:11): [True: 19, False: 87]
  |  Branch (427:12): [True: 19, False: 87]
  |  Branch (427:29): [True: 19, False: 0]
  ------------------
  428|     87|          (ai != a.end() && bi == b.end())) return false;
  ------------------
  |  Branch (428:12): [True: 87, False: 0]
  |  Branch (428:29): [True: 0, False: 87]
  ------------------
  429|       |      
  430|     87|      return ::toupper(*ai) == ::toupper(*bi);
  431|    106|    }; //<! case-insensitive comparison with length
_ZN6YaHTTP7Utility18parseUrlParametersERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  376|  4.06k|    static strstr_map_t parseUrlParameters(const std::string& parameters) {
  377|  4.06k|      if (parameters.size() > YAHTTP_MAX_REQUEST_LINE_SIZE) {
  ------------------
  |  |    4|  4.06k|#define YAHTTP_MAX_REQUEST_LINE_SIZE 8192
  ------------------
  |  Branch (377:11): [True: 2, False: 4.05k]
  ------------------
  378|      2|        return {};
  379|      2|      }
  380|  4.05k|      std::string::size_type pos = 0;
  381|  4.05k|      strstr_map_t parameter_map;
  382|  18.2k|      while (pos != std::string::npos) {
  ------------------
  |  Branch (382:14): [True: 18.2k, False: 0]
  ------------------
  383|       |        // find next parameter start
  384|  18.2k|        std::string::size_type nextpos = parameters.find('&', pos);
  385|  18.2k|        std::string::size_type delim = parameters.find('=', pos);
  386|  18.2k|        if (delim > nextpos) {
  ------------------
  |  Branch (386:13): [True: 12.8k, False: 5.41k]
  ------------------
  387|  12.8k|          delim = nextpos;
  388|  12.8k|        }
  389|  18.2k|        std::string key;
  390|  18.2k|        std::string value;
  391|  18.2k|        if (delim == std::string::npos) {
  ------------------
  |  Branch (391:13): [True: 3.82k, False: 14.4k]
  ------------------
  392|  3.82k|          key = parameters.substr(pos);
  393|  14.4k|        } else {
  394|  14.4k|          key = parameters.substr(pos, delim-pos);
  395|  14.4k|          if (nextpos == std::string::npos) {
  ------------------
  |  Branch (395:15): [True: 119, False: 14.2k]
  ------------------
  396|    119|            value = parameters.substr(delim+1);
  397|  14.2k|          } else {
  398|  14.2k|            value = parameters.substr(delim+1, nextpos-delim-1);
  399|  14.2k|          }
  400|  14.4k|        }
  401|  18.2k|        if (key.empty()) {
  ------------------
  |  Branch (401:13): [True: 3.31k, False: 14.9k]
  ------------------
  402|       |          // no parameters at all
  403|  3.31k|          break;
  404|  3.31k|        }
  405|  14.9k|        parameter_map[decodeURL(key)] = decodeURL(value);
  406|  14.9k|        if (nextpos == std::string::npos) {
  ------------------
  |  Branch (406:13): [True: 738, False: 14.1k]
  ------------------
  407|       |          // no more parameters left
  408|    738|          break;
  409|    738|        }
  410|  14.1k|        if (parameter_map.size() >= YAHTTP_MAX_REQUEST_FIELDS) {
  ------------------
  |  |    8|  14.1k|#define YAHTTP_MAX_REQUEST_FIELDS 100
  ------------------
  |  Branch (410:13): [True: 4, False: 14.1k]
  ------------------
  411|      4|          break;
  412|      4|        }
  413|       |
  414|  14.1k|        pos = nextpos+1;
  415|  14.1k|      }
  416|  4.05k|      return parameter_map;
  417|  4.06k|    }; //<! parses URL parameters into string map 
_ZN6YaHTTP7Utility8trimLeftERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  438|  26.8k|    static void trimLeft(std::string &str) {
  439|  26.8k|       const std::locale &loc = std::locale::classic();
  440|  26.8k|       std::string::iterator iter = str.begin();
  441|  27.7k|       while(iter != str.end() && YaHTTP::isspace(*iter, loc)) iter++;
  ------------------
  |  Branch (441:14): [True: 7.38k, False: 20.3k]
  |  Branch (441:14): [True: 881, False: 26.8k]
  |  Branch (441:35): [True: 881, False: 6.50k]
  ------------------
  442|  26.8k|       str.erase(str.begin(), iter);
  443|  26.8k|    }; //<! removes whitespace from left
_ZN6YaHTTP7Utility9trimRightERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  445|  26.8k|    static void trimRight(std::string &str) {
  446|  26.8k|       const std::locale &loc = std::locale::classic();
  447|  26.8k|       std::string::reverse_iterator iter = str.rbegin();
  448|  28.0k|       while(iter != str.rend() && YaHTTP::isspace(*iter, loc)) iter++;
  ------------------
  |  Branch (448:14): [True: 7.71k, False: 20.3k]
  |  Branch (448:14): [True: 1.21k, False: 26.8k]
  |  Branch (448:36): [True: 1.21k, False: 6.50k]
  ------------------
  449|  26.8k|       str.erase(iter.base(), str.end());
  450|  26.8k|    }; //<! removes whitespace from right
_ZN6YaHTTP7Utility4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  452|  26.8k|    static void trim(std::string &str) {
  453|  26.8k|       trimLeft(str);
  454|  26.8k|       trimRight(str);
  455|  26.8k|    }; //<! removes whitespace from left and right

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

