&quot;&#47;&quot;);
              queryStart += 1;
              fragmentStart += 1;
              end += 1;
            } else {
              uri = &quot;${uri.substring(start, pathStart)}&#47;&quot;
                  &quot;${uri.substring(queryStart, end)}&quot;;
              schemeEnd -= start;
              hostStart -= start;
              portStart -= start;
              pathStart -= start;
              queryStart += 1 - start;
              fragmentStart += 1 - start;
              start = 0;
   