Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Allow upper case scheme names in url

Closed / Fixed3eb2ec1449150778e3907e2e35e94ffe7339c780Created 13 years agoUpdated 13 years ago
Descriptionwiki2013-07-26 14:40:20
An upper case scheme name in an URL is not allowed:
% http::geturl HTTP://www.elmicron.de/
Unsupported URL type "HTTP"

But following RFC 3986, URL Scheme names should be case insensitive: http://tools.ietf.org/html/rfc3986 Chapter 3.1:

   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.

This could be cured by inserting:

set proto [string tolower $proto]
in line 504 of http.tcl.

For me, this extension is relatively important, as I get URLs from RFID tags and there, the protocol is written in uppercase (which may be stored more efficiently). Of cause, I may do the conversion on my own, but as it is standard, we could also enhance the http package...

Thank you, Harald

Referenced by2
jan.nijtmansplain2013-10-25 13:07:05
Fixed in core-8-5-branch and trunk
Log in (anonymous is fine) to add a comment.