docs: private void parseTemplate() {
      /*
       * query string and path literals have different reserved characters and different encoding
       * requirements. to ensure compliance with RFC 6570, we'll need to encode query literals
       * differently from path literals. let's look at the template to see if it contains a query
       * string and if so, keep track of where it starts.
       */
      Matcher queryStringMatcher = QUERY_STRING_PATTERN.matcher(this.template);
      if (queryStringMatcher.find()) {
        /*
         * the template contains a query string, split the template into two parts, the path and query
         */
        String path = this.template.substring(0, queryStringMatcher.start());
        String query = this.template.substring(queryStringMatcher.end() - 1);
        this.parseFragment(path, false);
        this.parseFragment(query, true);
      } else {
        /* parse the entire template */
        this.parseFragment(this.template, false);
      }
    }