Skip to content

v0.62.0

Choose a tag to compare

@hughpyle hughpyle released this 24 Feb 01:41
· 786 commits to main since this release

RFC 3986 URI normalization for document IDs

HTTP/HTTPS URIs are now canonicalized before storage and lookup, applying five safe normalizations from RFC 3986 §6.2.2:

  1. Scheme + host lowercasing (HTTPS://Example.COM → https://example.com)
  2. Unreserved percent-decoding (%41 → A)
  3. Default port removal (:443 on https, :80 on http)
  4. Dot segment resolution (/a/../b → /b)
  5. Empty path normalization (https://example.com → https://example.com/)

This prevents phantom duplicate items when the same URL is indexed with different casing or encoding. Non-URI IDs are unaffected.

Also fixes a gap where find(similar_to=...) was not validating the ID parameter.