Libzypp/Media/Url/Curl

From openSUSE

MediaCurl

The access handler to media directory tree on a ftp/http server.

  • Url Scheme:
  • ftp
  • http
  • https
  • Examples:
ftp://server/relative/path/to/media/dir
ftp://server/%2fabsolute/path/to/media/dir
ftp://user:pass@server/path/to/media/dir
ftp://user:pass@server/%2f/home/user/path/to/media/dir

http://server/path/on/server
http://user:pass@server/path
https://user:pass@server/path?proxy=foo&proxyuser=me&proxypass=pw

Note: The "ftp" url scheme supports absolute and relative paths to the default ftp server directory (RFC1738, Section 3.2.2]).
To use an absolute path, you have to prepend the path with an additional slash, what results in a "/%2f" combination (second "/" encoded to "%2f") at the begin of the URL path.
This is important, especially in user authenticated ftp, where the users home is usually the default directory of the server (except when the server chroots into the users home directory).
For example, if the user "user" has a home directory "/home/user", you can use either an URL with a relative path to the home directory "ftp://user:pass@server/path/to/media" or the absolute path "ftp://user:pass@server/%2fhome/user/path/to/media" -- both URLs points to the same directory on the server.

  • Query parameters:
  • proxy: A proxy hostname or hostname and port separated by ':'.
  • proxyport: Alternative way to provide the proxy port.
  • proxyuser: The proxy username.
  • proxypass: The proxy password.
  • ssl_capath: The absolute CA directory to use, default is /etc/ssl/certs.
  • ssl_verify: Flag to modify the ssl verify behaviour. Valid values are:

yes, no and a comma separated list of host and peer flags.

  • yes: enables ssl verify, this is the default, equivalent to host,peer.
  • no: disables ssl verify
  • host:

The server is considered the intended one, when the 'Common Name' field or a 'Subject Alternate Name' field in the certificate matches the host name in the URL.

  • peer:

Verifies whether the certificate provided by the server is authentic against the chain of digital signatures found in ssl_capath.

  • timeout:

Transfer timeout in seconds between 0 and 3600, 0 disables timeout, default timeout is 180 seconds.

  • auth:

A comma separated list of http authentication method names to use: basic, digest, ntlm, negotiate, spnego, gssnego. Note, that this list depends on the list of methods supported by the curl library.

  • Authority: The authority component has to provide a hostname. Optionally also a username and password.

In case of the 'ftp' scheme, username and password defaults to 'anonymous' and 'yast2@'.

  • Path name: Mandatory URL component, that specifies the path name on the ftp/http server,

where the desired files are located.


Proxy settings: If no proxy settings are present in tha URLs query parameters, the media handler reads the system wide proxy settings from the /etc/sysconfig/proxy file. If a proxy setting was present, but the proxy password not, it attempts to read the proxy-user variable from the ~/.curlrc (/root/.curlrc) file.
If no proxy setting was present, then libzypp does not pass any proxy settings to curl, but curl fallbacks to use the http_proxy, ftp_proxy, etc environment variables.

back ...

Last edit in Trac '06/29/06 12:09:06' by 'mt'


Last edit in Trac '06/29/06 12:09:06' by 'mt'


Last edit in Trac '06/29/06 12:09:06' by 'mt'


Last edit in Trac '06/29/06 12:09:06' by 'mt'