Skip to content

Support for Case Insensitive Schemes #181

Open
@mijho

Description

@mijho

We've come across some sites where the scheme's are capitalised, as wombat expects these to be lower cased they are not re-written.

I'm happy to put in a PR for this but before doing the work thought I should ask whether you'd want wombat to handle scheme's case insensitively first?

From RFC 3986:

Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus
("+"), period ("."), or hyphen ("-"). Although schemes are case-
insensitive, the canonical form is lowercase and documents that
specify schemes must do so with lowercase letters. An implementation
should accept uppercase letters as equivalent to lowercase in scheme
names (e.g., allow "HTTP" as well as "http") for the sake of
robustness but should only produce lowercase scheme names for
consistency.

If you'd like support for this would you prefer for it to be added via a regex patten match or via explicitly adding the additional options?

this.HTTP_PREFIX = 'http://';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions