Skip to content

v0.13.0: URL key normalization API + cache correctness fixes (2026-03-14)

Latest

Choose a tag to compare

@bartventer bartventer released this 14 Mar 11:23
v0.13.0
cf5ae53

Highlights

  • New reusable urlkey package for canonical URL normalization.
  • Fixes that improve Vary-handling correctness and cache stability.
  • No breaking API changes.

What's Changed

✨ Features

  • Expose reusable URL cache-key normalization package (urlkey)
    • Added a public API for normalized URL cache-key generation.
    • by @bartventer in #34 and #35
    • Example usage:
      import "github.com/bartventer/httpcache/pkg/urlkey"
      
      url := "https://EXAMPLE.com:443/a/./b/../c?q=%7e1#fragment"
      fmt.Println(urlkey.Normalize(url)) // https://example.com/a/c?q=~1
    • Note: This package is used internally for consistent URL normalization in cache key generation; it can now be reused in other contexts where canonical URL forms are needed.

🐛 Fixes

  • Handle multiple Vary header lines correctly

    • Includes all Vary header lines when building normalized vary keys; adds regression tests.
    • by @bartventer in #33 (closes #32)
  • Return immediately on upstream RoundTrip error

    • Prevents nil-response dereference when transport returns an error.
    • by @cih9088 in #29
  • Refresh stored headers on 304 Not Modified revalidation

    • Updates cached metadata from 304 responses per RFC 9111 §4.3.4; adds regression/integration coverage.
    • by @cih9088 in #27

🔧 Other

New Contributors

Full Changelog: v0.12.0...v0.13.0


The project is nearing a stable v1.0.0 milestone.
Any further feedback, issues, or contributions are welcome as we finalize the implementation and documentation.