1

I am using GIO to mount an SFTP path where the name contains upper-case characters. This seems to fail, and in the error message the input name seems to have been converted into lower-case.

The full command is gio mount sftp://FOO and the error message is:

gio: sftp://foo/: Connection failed

Notice the change in case.

Is this a bug, or am I missing some standard where the paths must be case insensitive?

I got this case where I had an SSH server configured in ~/.ssh/config and the Host name contained upper-case characters. I was trying to do an SFTP mount to it via GNOME Files. Changing the name used in Host to all lower-case characters solved my problem.

If you want to try for yourself, here is the minimal setup with Docker:

docker run -it --rm ubuntu:24.04 bash

apt-get update apt-get install dbus ssh gvfs-backends libglib2.0-bin

dbus-run-session bash

gio mount sftp://FOO

1 Answers1

1

Is this a bug, or am I missing some standard where the paths must be case insensitive?

That's not the path; that's the "authority" section of the URL – in other words, the host name field – and host names are defined as case-insensitive in the standard URL format (RFC 3986 §3.2.2), following from its original HTTP-specific definition (RFC 2616 §3.2.3), as they are likewise case-insensitive in DNS (RFC 1035 §2.3.3). Implementations are not required to be case-preserving.

The "path" of the URL (which is case-sensitive) only begins at the slash following the authority (both of your URLs have / as the path).

(Most other host naming systems are case-insensitive as well, including mDNS/Bonjour (RFC 6762 §5 last paragraph) and ARPANET HOSTS.TXT (RFC 810 item 1). Although NetBIOS/WINS names are technically case-sensitive at protocol level (MS-NBTE §2.2.1), they are almost universally forced to upper-case by NetBIOS-using software.)

So I would argue that it is an OpenSSH bug if it matches the Host section case-sensitively.

grawity
  • 501,077