delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/05/07/06:32:01

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Date: Tue, 7 May 2002 12:31:20 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
Reply-To: Pavel Tsekov <ptsekov AT syntrex DOT com>
Organization: Syntrex, Inc.
X-Priority: 3 (Normal)
Message-ID: <2312725147.20020507123120@syntrex.com>
To: cygwin-apps AT cygwin DOT com
Subject: URL paths in setup.exe
In-Reply-To: <3C1DB30F.8F419A90@syntrex.com>
References: <3C1DB30F DOT 8F419A90 AT syntrex DOT com>
MIME-Version: 1.0

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 AT 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! :)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019