8000 Comparing master...fix-basic-auth-improvements · labstack/echo · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: labstack/echo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: labstack/echo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix-basic-auth-improvements
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Sep 16, 2025

  1. Improve BasicAuth middleware: use strings.Cut and RFC compliance

    - Replace manual for loop with strings.Cut for credential parsing
    - Simplify realm handling to always quote according to RFC 7617
    - Improve code readability and maintainability
    
    Fixes #2794
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    vishr and claude committed Sep 16, 2025
    Configuration menu
    Copy the full SHA
    dc5d145 View commit details
    Browse the repository at this point in the history
  2. Add comprehensive tests for realm quoting behavior

    Tests cover:
    - Default realm quoting
    - Custom realm with spaces
    - Special characters (quotes, backslashes)
    - Empty realm fallback to default
    - Unicode realm support
    
    Addresses review feedback about testing strconv.Quote behavior
    in WWW-Authenticate header per RFC 7617 compliance.
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    vishr and claude committed Sep 16, 2025
    Configuration menu
    Copy the full SHA
    9144e71 View commit details
    Browse the repository at this point in the history
  3. Optimize realm quoting to happen once during middleware creation

    Move strconv.Quote(config.Realm) from per-request execution
    to middleware initialization for better performance.
    
    - Pre-compute quoted realm at middleware creation time
    - Avoids repeated string operations on every auth failure
    - Maintains same behavior with better efficiency
    
    Performance improvement suggested during code review.
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    vishr and claude committed Sep 16, 2025
    Configuration menu
    Copy the full SHA
    cbff9d1 View commit details
    Browse the repository at this point in the history
Loading
0