Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IPv6 hostname normalization #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 29, 2019

  1. fix: ipv6 hostname normalization

    The old check looked at both `host` and `hostname`, which was prone to
    errors for multiple reasons:
    - `host` could include `:` but be ipv4
    - ipv6 could already have square brackets, which produced invalid URIs like
      `http://[[::1]]:80`
    
    This changes ipv6 normalization to only run if `hostname` parameter is
    provided and does not start with `[`. Also, added missing tests for ipv6.
    
    License: MIT
    Signed-off-by: Marcin Rataj <lidel@lidel.org>
    lidel committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    6d50db5 View commit details
    Browse the repository at this point in the history