Scheme-Based Normalization

Summary

Implement scheme-based normalization per RFC 3986 Section 6.2.3. This includes removing default ports for known schemes and applying scheme-specific path rules.

Source

This requirement is documented in the README.md roadmap under v1.0.0 - Stable Release but was not tracked by an issue. The README incorrectly references this as #24 (closed). Also referenced in docs/RFC_COMPLIANCE.md under Section 6 as "6.2.3 Scheme-Based: Not yet - Default port removal".

Note: Issue #10 (closed) (Enhanced Normalization) covers some related normalization enhancements including default port removal, but scheme-based normalization as defined by RFC 3986 Section 6.2.3 is a distinct concept that warrants its own tracking.

Requirements

  • Remove default ports (e.g., :80 for http, :443 for https)
  • Normalize empty path to "/" for URIs with authority
  • Apply scheme-specific rules per RFC 3986 Section 6.2.3
  • Leverage the existing defaultPort() function

Acceptance Criteria