The DEBUG switch clearly says that it will display the line just before it's send out to the script or program and it told me
that the http:// part was still there...maybe it's "lying" and removes that part AFTER the debug window shows the commandline?
The last line in the debug requester IS the exact line that is executed in an asyncronous shell.
When you enable the debug switch, it's showing what launch-handler is doing with the supplied info, but there's more
happening if you are calling the C:URLOpen command, so lets go over this step by step and i'll explain how it all works
and what happens within the various parts...
First of all, there's the L:launch-handler that is responsible for the mounted URL: device, and then there's the C:URLOpen
command, the URL: device is called by C:URLOpen, although you can also invoke the URL: device yourself without C:URLOpen,
if you happen to be an application that can call the DOS Open() function itself.
For simplicity, lets just start with the C:URLOpen command that is used in a shell, or can be used as a default tool
via workbench, and what its job is in this situation.
If I were to type (in a shell) the following line; "urlopen http://www.google.com", then the C:URLOpen command
doesn't do much, here it will just check to see if the command line argument string (the "http://www.google.com" part)
starts with "URL:" and if not, it prepends "URL:" to the front of what you supplied, it then calls DOS Open().
That's all it does, it just provides an executable command interface to the DOS Open() function for passing command
string to the URL: device.
By calling the DOS Open() function with the command line; "URL: http://www.google.com", DOS will identify the
handler by the first part up to the first colon character, in this case, the "URL:" which means L:launch-handler,
like the same way any path starting with "RAM:" ends up being handled by the ram-handler.
At this stage, L:launch-handler will have received the string; "URL: http://www.google.com".
It immediately strips off the handler identifier from what it received, leaving; "http://www.google.com".
It then parses the remainder stripping off the first part to identify the protocol, leaving; "www.google.com".
Now, with the protocol "http" identified, and the rest "www.google.com", it reads the file "HTTP.LH" (where the
name was derived from protocol), found in the "ENV:launch-handler/URL" directory to find out what to do with it.
With the information in there, it builds a requester with all the "ClientName" arguments, and creates a command line
for the client program (browser) specified by the "ClientPath" arguments, then uses the "CMDFORMAT" string as the format
to create the final browser command line that will be passed to the client when it is run by L:launch-handler.
In this case; "*"http://%s*"" where %s will be replaced by the "www.google.com" string, and because the "http://"
part was removed in the initial parsing, it need to be put back on for the client and why it is specified again here.
The result is a commandline for the selected client which is shown as the last line in the debug requester.