ueryStart) queryStart = fragmentStart;
  if (pathStart &lt; hostStart || pathStart &lt;= schemeEnd) {
    pathStart = queryStart;
  }
  &#47;&#47; If there is an authority with no port, set the port position
  &#47;&#47; to be at the end of the authority (equal to pathStart).
  &#47;&#47; This also handles a &quot;:&quot; in a user-info component incorrectly setting
  &#47;&#47; the port start position.
  if (portStart &lt; hostStart) portStart = pathStart;

  assert(hostStart == start || schemeEnd &lt;= ho