d = uri.length;
            }
          }
        }
      } else if (schemeEnd == start + 5 &amp;&amp; uri.startsWith(&quot;https&quot;, start)) {
        scheme = &quot;https&quot;;
        &#47;&#47; HTTPS URIs should not have an explicit port of 443.
        if (portStart &gt; start &amp;&amp;
            portStart + 4 == pathStart &amp;&amp;
            uri.startsWith(&quot;443&quot;, portStart + 1)) {
          if (start == 0 &amp;&amp; end == uri.length) {
            uri = uri.replaceRange(portStart,