anchor.diff:  -spec parse_query(binary(), uri_map()) -> {binary(), uri_map()}.
   parse_query(?STRING_REST($#, Rest), URI) ->
       {T, URI1} = parse_fragment(Rest, URI),
  -    Fragment = calculate_parsed_fragment(Rest, T),
  +    Fragment = calculate_parsed_query_fragment(Rest, T),
       {Rest, URI1#{fragment => decode_fragment(Fragment)}};
   parse_query(?STRING_REST(Char, Rest), URI) ->
       case is_query(Char) of
  
positive.code:     {Rest, URI1#{path => decode_path(?STRING_REST($/, Path))}};
  parse_host(?STRING_REST($?, Rest), URI) ->
      {T, URI1} = parse_query(Rest, URI),  % path-empty ?query
      Query = calculate_parsed_query(Rest, T),
      {Rest, URI1#{query => decode_query(Query)}};
  parse_host(?STRING_REST($[, Rest), URI) ->
      parse_ipv6_bin(Rest, [], URI);
  parse_host(?STRING_REST($#, Rest), URI) ->
      {T, URI1} = parse_fragment(Rest, URI),  % path-empty
      Fragment = calculate_parsed_fragment(Rest, T),
      {Rest, URI1#{fragment => decode_fragment(Fragment)}};
  parse_host(?STRING_REST(Char, Rest), URI) ->
      case is_digit(Char) of
  
negative.code:     {Rest, URI1#{path => decode_path(?STRING_REST($/, Path))}};
  parse_reg_name(?STRING_REST($?, Rest), URI) ->
      {T, URI1} = parse_query(Rest, URI),  % path-empty ?query
      Query = calculate_parsed_query_fragment(Rest, T),
      {Rest, URI1#{query => decode_query(Query)}};
  parse_reg_name(?STRING_REST($#, Rest), URI) ->
      {T, URI1} = parse_fragment(Rest, URI),  % path-empty
      Fragment = calculate_parsed_query_fragment(Rest, T),
      {Rest, URI1#{fragment => decode_fragment(Fragment)}};
  parse_reg_name(?STRING_REST(Char, Rest), URI) ->
      case is_reg_name(Char) of
  