This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
URL paths in setup.exe
- From: Pavel Tsekov <ptsekov at syntrex dot com>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 7 May 2002 12:31:20 +0200
- Subject: URL paths in setup.exe
- Organization: Syntrex, Inc.
- References: <3C1DB30F.8F419A90@syntrex.com>
- Reply-to: Pavel Tsekov <ptsekov at syntrex dot com>
I'd like to inform the people involved with setup.exe development
about some changes that my patch will introduce.
1. io_stream derived NetIO classes i.e. NetIO_FTP and
NetIO_HTTP (NetIO_IE5 is not yet completed). The NetIO_File will
no longer be needed i.e. it will autogically replace by
io_stream_file. The NetIO base class is also no longer needed.
2. Along with the changes above there is another change which will
introduce URLs as means of working with the io_stream classes i.e.
io_stream::open will accept url and will create approapriate instances
for the different url schemas.
Currently the following url schemas are supported: file, cygfile,
http, ftp.
I'd like to make you aware of how the URLParser class interprets url
of each kind.
a) URLs from the file schema - currently relative and absolute URLs
are supported.
The syntax of the absolute URL in the 'file' schema
is: <schema>://<authority><path>
Now the interesting part is the authority and the path. Consider
the following path c:\somedir\somefile. As url in the 'file'
schema it be would represented like this: 'file://c/somedir/somefile'.
The drive is the url authority and the remains are considerd the
url path.
Means are provided to convert dos style paths to their url
representation.
The syntax of the relative URL in the 'file' schema is:
<schema>:<relative_path>
This relies on the following excerpt from rfc2396, section 5 - "Relative URI References":
A relative reference beginning with two slash characters is termed a
network-path reference, as defined by <net_path> in Section 3. Such
references are rarely used.
A relative reference beginning with a single slash character is
termed an absolute-path reference, as defined by <abs_path> in
Section 3.
A relative reference that does not begin with a scheme name or a
slash character is termed a relative-path reference.
And also on section 5.1.4 - "Default Base URI" - from the same
rfc. I.e. we define and application wide base URL to be used
to complete relative URLs.
Here is how a relative URL in the 'file' schema looks like:
file:somedir/somefile
This means that if relative URL is detected it will be
concatenated with the applicate wide base URL (set in main() for
exmaple).
b) URLs from the cygfile schema - currently only absolute URLs
are supported.
Here is the syntax of the URL of this schema:
<schema>:<path> i.e. cygfile:/usr/bin.
c) URLs from the FTP and HTTP schemas - currently only absolute URLs
are supported.
The syntax of the URL in these schemas is:
<schema>://<authority><path>
A typical URL from these schemas looks like:
http://someuser:sompass@somehost:someport/somepath.
One should be careful to properly specify the URLs i.e. now
absololute path in the 'file' schema is represented like this
file://drive:/dir1/dir2/file after the patch is applied it should
become file://drive/dir1/dir2. I'm doing my best to convert all
current references to the new syntax but I may fail somewhere so
when the patch is commited some testing should be done.
Comments wanted! :)