[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Supported URLs

::WORK:: List supported URL types, specific RFCs, etc.

Uniform Resource Locators (URLs) are a specific form of Uniform Resource Identifiers (URI) described in RFC2396 which updates RFC1738 and RFC1808.

RFC2016 defines uniform resource agents.

URI have the form scheme:scheme-specific-part, where scheme appears in the menu below for URLs supported by Emacs/W3.

FTP, NFS, HTTP, HTTPS, rlogin, telnet, tn3270, IRC and gopher URLs all have the form scheme://[userinfo@]hostname[:port][/path] where `[' and `]' delimit optional parts. userinfo sometimes takes the form userinfo:password but you should beware of the security risks of sending cleartext passwords. hostname may be a domain name or a dotted decimal address. If the `:port' is omitted then Emacs/W3 will use the well known port for that service. With the possible exception of telnet, it is very rare for ports to be specified, and it is possible using a non-standard port may have undesired consequences if a different service is listening on that port (eg. a gopher URL specifying the SMTP port can cause mail to be sent), but See section url-bad-port-list. The meaning of the path component depends on the service.

5.1 File URLs  Local file access.
5.2 FTP URLs  Remote file access via ftp.
5.3 NFS URLs  Remote file access via NFS.
5.4 info  Access to the Emacs Info system.
5.5 http/https  HTTP/1.0 support.
5.6 mailto  Sending simple electronic mail.
5.7 mailserver  Slightly more complicated electronic mail.
5.8 news/nntp/snews  Reading and sending Usenet news.
5.9 rlogin/telnet/tn3270  Legacy host connections.
5.10 irc  Internet Relay Chat.
5.11 data  Embedding the data within the URL itself.
5.12 gopher  Gopher and Gopher+.
5.13 finger  The old favorite.
5.14 netrek  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 File URLs

This allows Emacs/W3 to read arbitary files from hosts. Compressed files are handled, but support is hard-coded so that jka-compr-compression-info-list and so on have no affect. Suffixes recognized are `.z', `.gz' and `.Z'. If the URL points to a directory, then it will try to retrieve a file named by url-directory-index-file (`index.html' by default) and parse it, otherwise you get a directory listing in `dired' mode. If the URL refers to a file on a remote host, then Emacs/W3 uses `ange-ftp' (@xref{Top, , ange-ftp}) or `efs' (@xref{Top, , efs}) to retrieve the file. ftp:// and file:// are synonymous for Emacs/W3.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 FTP URLs

For details of usage see 5.1 File URLs. In Emacs/W3 file and FTP URLs are synonymous and files on the localhost are retrieved directly rather than by FTP. Emacs/W3 relies on `ange-ftp' (@xref{Top, , ange-ftp}) or `efs' (@xref{Top, , efs}) to do the actual transfers.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.3 NFS URLs

gdj1: have I misunderstood the point of this? Since NFS is fairly transparent to the user (at least when it's working), there isn't very much to say here. An nfs URL is similar to a file URL except that it points to a file on a remote host that is handled by the automounter on the local host. The variable url-nfs-automounter-directory-spec may need to be tweaked depending on local configuration. The NFS URL is defined in RFC2224.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4 info

Info URLs are not an officially recognised URL (gdj1: is this right?), but Emacs/W3 will parse them to produce a reference to a TeXinfo node, or `Top' if one is not specified. `Info-mode' will be used to browse the document.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.5 http/https

The HyperText Transfer Protocol is the protocol used to get documents from the World Wide Web. Emacs/W3 supports HTTP version 1.0 as defined in RFC1945 -- now superseded by version 1.1 defined in RFC2068.

If url-honor-refresh-requests is nil then `Refresh' headers will not be honoured, if t then they will always be honoured, otherwise the user will be asked for each request. The default is t. url-be-anal-about-file-attributes controls whether HTTP is used to discover file attributes, or whether they're just guessed. The default is nil which means that Emacs/W3 will make educated guesses.

HTTPS is a secure version of HTTP defined in RFC2069 (gdj1: ?). Emacs/W3 requires SSL to handle this, See section D. Installing SSL.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.6 mailto

A mailto URL will send an email message to the address in the URL, for example `mailto:foo@bar.com' would compose a message to foo@bar.com. Emacs/W3 uses the command specified by the url-mail-command variable to compose the email, this is url-mail by default which uses Gnu's `message' mode (@xref{Top, Message, , message}) if available, otherwise the standard mail command. An X-Url-From header field containing the URL of the document that contained the mailto URL is added, as is an X-Mailer header field containing the version of Emacs/W3 being used.

RFC2368 extends the definition of mailto URLs in RFC1738. The form of a mailto URL is `mailto:mailbox[?header=contents[&header=contents]]' where an arbitary number of headers can be added. If the header is `body', then contents is put in the body otherwise a header header field is created with contents as its contents. Note that Emacs/W3 does not consider any headers as `dangerous' so you should check them before sending the message.

Email messages are defined in RFC822.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.7 mailserver

A mailserver URL allows you to send an email to a person, but this URL optionally specifies a subject and a body. The basic format is `mailserver:[mailbox/subject[/body]'. Thus, `mailserver:foo@bar.com/wibble/flibble' will compose a message to foo@bar.com with subject as the subject and body already in the body of the email. Note that both the subject and the body are hexed, but the subject cannot contain newlines.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.8 news/nntp/snews

If the URL doesn't specify a host, then the host in url-news-server will be used, and unless the URL has a port the news port as defined in url-default-ports (119) will be used. The username and password specified in the URL will be used if present. The URL may contain a message-id, in which case that article is displayed; it may contain a newsgroup in which case Gnus is used to display the newsgroup; or it may by empty in which case Gnus is called with no arguments. Emacs/W3 requires Gnus v5.x or Red, Quassia or Pterodactyl Gnus, See section `Top' in Gnus. The variable url-news-use-article-mode controls the displaying of news articles; if non-nil then articles are displayed in Gnus article mode, otherwise they are turned into HTML and rendered by Emacs/W3.

An NNTP URL is the same as a news URL, except that the URL may specify an article by its number.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.9 rlogin/telnet/tn3270

To handle rlogin, telnet and tn3270 URLs, Emacs/W3 runs an rlogin, telnet or tn3270 session (the program names and arguments are hardcoded) in a terminal-emulator buffer. Well-known ports are used if the URL does not specify a port.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.10 irc

Internet Relay Chat (IRC) is handled by handing off the IRC session to a function named in url-irc-function. This function must take five argumenst, host, port, channel, user and password. The channel argument specifies the channel to join immediately, this can be nil. By default this is url-irc-zenirc which processes the arguments and lets zenirc handle the session.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.11 data

Data URLs contain MIME data in the URL itself, by default the data is 8bit encoded `text/plain', but the URL can specify either or both the content-type and the encoding. Emacs/W3 will parse the URL's data as MIME and display it appropriately. See section 6. MIME Support.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.12 gopher

Gopher (Go for) was in someways the precurser to the world wide web and is becoming rarer as the web becomes more powerful. Nevertheless, there are still many gopher sites around and Emacs/W3 supports this protocol (of course). The variable url-gopher-labels maps gopher types to something else (gdj: ?) for displaying the gopher menus. url-gopher-icons maps gopher types to pictures. url-gopher-to-mime maps gopher types to MIME types. If url-use-hypertext-gopher is non-nil, then gopher pages will be turned into HTML for Emacs/W3 to parse and display normally, otherwise Emacs/W3 will let `gopher.el' handle all gopher requests which will lose gopher+ support and inlined searching. This is t by default.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.13 finger

Finger URLs will finger a given user at a given host, or `localhost' if no host is specified, processing the results to create an HTML page for Emacs/W3 to display.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.14 netrek

This is unsupported at present.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html