I decided to use segments and stick to lowercase "https", because I didn't trust various implementations out there to handle "HTTPS" correctly. Should I?
I decided to use segments and stick to lowercase "https", because I didn't trust various implementations out there to handle "HTTPS" correctly. Should I?
RFC 3986 explicitly says schemes can have uppercase letters but are canonically lowercase, and says that they are case-insensitive. But it also still says that implementations "should" accept uppercase letters as equivalent.
WHATWG's URL standard mandates case-insensitive matching.
In practice anything you scan a QR code with will probably not have a problem with the uppercase scheme.
Although we found browsers were out of alignment with standards on all sorts of matters, we found broad compatibility with upper case. (Of course, meaning everything before the path. The interpretation of the path is delegated to the server which may or may not be case sensitive, up until octothorpe, #, which is then solely interpreted by the browser.)
Leaving a naked domain name like "www.example.com/1234" was not quite as good, but at least iPhones, Pixels and Samsungs worked well IIRC.
I used this trick to allow printing of QR codes at smaller resolutions for 4+ years, and phones have gotten noticeably better in that span at handling QR codes printed at smaller sizes, with uppercase, nonstandard shapes, borders, you name it.
If you make https: lowercase and the rest uppercase, with QR encoding that does smart segmentation, I'm pretty sure you can still get most of the benefit... but, exercise for the reader.
The smallest v1 QR code is 21 modules. That can fit 20 uppercase letters.
The 25 module size, is not that much bigger and can get 38 uppercase or 26 lowercase letters.
That is actually exactly what I ended up doing. I care about all mobile phones and tablets, and I was worried whether any implementers actually tested uppercase protocol names.
In the old days, Yahoo's build of Apache (yApache) included an option to automatically lower case urls before matching them. Super handy because lots of urls were coming in from print publications and you could never get publications to show urls properly, nor get users to type them in properly.