Skip to content

Two issues: HTTP 308 status, and capitals in hostname #12

@room34

Description

@room34

This is a great tool! However as I started working with it on a batch of URLs I needed to validate, I ran into a couple of problems:

  1. HTTP status code 308 Permanent Redirect: This is much less used than 301 (in fact I had forgotten it existed until now), but apparently some sites are using it. I was able to patch this easily by just adding || $this->status == 308 to the conditional in the hasRedirectHTTPStatus() method (~line 608 of URLResolver.php).

  2. Capitalization in hostnames: The data I was provided had some instances where a domain name included capitalization. It's possible there's a setting for handling this that I just missed, but I found the capitalization just caused URLResolver to return the original URL, with a 404 status. (In this case, I wrote my own code that converts the hostname to lowercase before passing it to URLResolver.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions