⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lynx_url_support.html

📁 一个可用于linux下的命令行音乐播放器
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 3.0//EN"><HTML><HEAD><TITLE>URL Schemes Supported in Lynx</TITLE><LINK rev=made href="mailto:lynx-dev@sig.net"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD><BODY><blockquote><em>[</em><a href="#http_url">http, https</a> <em>|</em><a href="#telnet_url">telnet, tn3270, rlogin</a> <em>|</em><a href="#gopher_url">gopher</a> <em>|</em><a href="#file_url">file</a> <em>|</em><a href="#ftp_url">ftp</a> <em>|</em><a href="#wais_url">wais</a> <em>|</em><a href="#news_url">news, nntp, snews</a> <em>|</em><a href="#newspost_url">newspost, newsreply, snewspost, snewsreply</a> <em>|</em><a href="#mailto_url">mailto</a> <em>|</em><a href="#finger_url">finger</a> <em>|</em><a href="#cso_url">cso</a> <em>|</em><a href="#bibp_url">bibp</a> <em>|</em><a href="#exec_url">lynxexec, lynxprog</a> <em>|</em><a href="#cgi_url">lynxcgi</a><em>|</em><a href="#ncftp_url">NcFTP</a> <em>|</em><a href="#internal_url">internal</a><em>]</em></blockquote><H1><em>URL Schemes Supported in Lynx</em></H1>Lynx handles a number of URL types, that are enumerated below.  Formore details about URLs (Uniform Resource Locators) see <em>RFC1738</em>:<ul><li><a href="http://www.w3.org/Addressing/rfc1738.txt">http://www.w3.org/Addressing/rfc1738.txt</a><li><a href="ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt">ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt</a></ul><p>Lynx resolves partial or relative URLs in documents with respect tothe BASE if one was specified, otherwise with respect to the document'sabsolute URL, using the rules described in <em>RFC1808</em>:<ul><li><a href="http://www.w3.org/Addressing/rfc1808.txt">http://www.w3.org/Addressing/rfc1808.txt</a><li><a href="ftp://ftp.rfc-editor.org/in-notes/rfc1808.txt">ftp://ftp.rfc-editor.org/in-notes/rfc1808.txt</a></ul>and in subsequent drafts of the <em>IETF</em>:<ul><li><a href="http://www.ics.uci.edu/pub/ietf/uri/">Uniform Resource Identifiers (URI) Working Group</a></ul><p>When entering a URL on the command line to be used as the<em>startfile</em>, or at the prompt for a '<em>g</em>'oto entry, apartial host field can be used and the scheme field can be omitted ifthe scheme and fully qualified domain name can be constructed internallyby using the URL_DOMAIN_PREFIXES and URL_DOMAIN_SUFFIXES definitions inthe Lynx configuration file.  See the explanation of those definitionsand their use in your <em>lynx.cfg</em>.  For example, <em>wfbr</em> willbe treated as <em>http://www.wfbr.edu/</em>, and <em>wfbr/dir/lynx</em>will be treated as <em>http://www.wfbr.edu/dir/lynx</em>, but<em>gopher.wfbr.edu/11/_fileserv/_lynx</em> will be treated as<em>gopher://gopher.wfbr.edu/11/_fileserv/_lynx</em>.  For files ordirectories on the local host, a tilde (<em>~</em>) is expanded tothe path of the account's login directory, e.g., <em>~/foo</em> willbe expanded to <em>file://localhost/your/login/directory/foo</em>.The tilde expansion is done homologously on Unix and VMS. On VMS,Lynx also will expand any file or directory spec recognizable toDCL into a valid URL, e.g., <em>[]</em> will be expanded to<em>file://localhost/current/default/directory</em>.  These expansionsare <em>SOLELY</em> for <em>startfile</em> or '<em>g</em>'oto entries!Any partial or relative URLs within HTML documents are resolvedaccording to the rules specified in RFC1808 and subsequent IETF drafts.<HR><H2><a name="http_url">The <em>http</em> and <em>https</em> URLs:</a></H2>Lynx handles http URLs exactly as specified in RFC1738.  The formatis:<pre>      <em>http://host:port/path?searchpart#fragment</em></pre>where <em>:port</em> is optional and defaults to <em>:80</em>,<em>/path</em> if present is a slash-separated series of symbolicelements, and <em>?searchpart</em> if present is the query for an ISINDEXsearch or the content of a FORM with METHOD="GET".  The <em>#fragment</em>field if present indicates a location in the document to seek for display,based on a NAME-ed anchor or an ID attribute within the document, and istechnically an instruction rather than part of the URL.  Lynx will treatID attributes as NAME-ed anchors for all tags in the BODY of a documentwhich can correspond to positions in the rendering of the document.<p>The https URL has the same format, but the default port is <em>:443</em>.Patches for support of https URLs and the CONNECT procedure are availablefor qualified recipients via <ahref="http://www.subir.com/lynx.html">Lynx links</a>.  US Export lawsand associated red tape pose severe impediments to inclusion of this supportin the general distributions of freeware WWW clients such as Lynx.  Sorry.<HR><H2><a name="telnet_url">The <em>telnet</em>, <em>tn3270</em>, and <em>rlogin</em> URLs:</a></H2>A <em>telnet</em> URL generally results in Lynx spawning a telnetsession.  Lynx implements the complete telnet URL scheme, i.e.:<pre>      <em>telnet://user:password@host:port</em></pre><p>The <em>user</em> and/or <em>:password</em> fields may be omitted, andthe <em>@</em> should be omitted if neither is present.  The port defaultsto <em>:23</em> when omitted in the URL.<p>A <em>tn3270</em> or <em>rlogin</em> URL is specified equivalently,and similarly spawns a tn3270 or rlogin session.  The actual behavioris dependent on the TCP-IP software installed on the local and targethosts.<p>It is unwise to include the <em>:password</em> field except forURLs which point to anonymous or other public access accounts, andfor most TCP-IP software you will be prompted for a password whetheror not one was included in the URL.<HR><H2><a name="gopher_url">The <em>gopher</em> URL:</a></H2>The gopher URL takes the form:<pre>      <em>gopher://host:port/gopher-path</em></pre>where <em>:port</em> is optional and defaults to <em>:70</em>, and the<em>/gopher-path</em> is opaque (not fully equivalent to theslash-separated series of symbolic elements of http paths) as explainedin RFC1738.  Typically, the gopher-path consists of a<A HREF="keystrokes/gopher_types_help.html"><em>gophertype</em></A>indicating the file or service type (e.g., <em>0</em> or <em>I</em> forplain text or an image, respectively, <em>7</em> for a search, or <em>1</em>for a directory), followed by a platform-specific <em>selector</em>. Anyreserved characters in the selector should be hex escaped (<em>%hh</em>),including slashes, although hex escaping of slashes is not required by Lynxin gopher URLs.<p>Lynx does not overtly support the gopher+ protocol, and does notrepresent itself as gopher+ capable when communicating with gopherservers.  Lynx might transmit any (hex-escaped-tab-separated) extendedgopher+ fields in a URL if an author included them in a document, but islikely to mishandle what the gopher server returns in such cases, and wouldnot generate and transmit them itself.  For pre-formed URLs to submit gophersearches, it may be better to use a <em>?</em> rather than hex-escaped tab(<em>%09</em>) as the separator for the <em>searchpart</em> in the<em>selector</em>, e.g.:<BR><em>gopher://gopher.wfbr.edu/77/_shell/search.shell%20/_shell/walker?lynx*</em>Lynx will handle the <em>%09</em> if you use that instead of <em>?</em>,but other WWW clients may mishandle it.<p>For the <em>gophertype</em> which signifies HTML (<em>h</em>), if the<em>selector</em> begins with <em>GET%20/</em> Lynx will convert the gopherURL to an http URL, e.g.:<BR><pre><em>gopher://www.wfbr.edu:80/hGET%20/</em></pre>will become:<BR><pre><em>http://www.wfbr.edu/</em></pre>The port field will be retained if it is not <em>:80</em>, and will defaultto <em>:70</em> if it was defaulted originally.  These conventions wereadopted during development of the University of Minnesota gopher softwareto facilitate the offering of links to MIME-capable http servers in thelistings returned by gopher servers, but should be considered Lynxismsand UMN Gopherisms.<HR><H2><a name="file_url">The <em>file</em> URL:</a></H2>The file URL is used to retrieve files or generate a directory listingon the local host.  The host field can be <em>localhost</em> or a domainname for the local host:<BR><pre><em>file://localhost/path</em></pre>If you do not use <em>localhost</em> or a domain name for the local host,Lynx will substitute <em>ftp://</em> for <em>file://</em> and treat itas an ftp URL.<p>The <em>/path</em> is treated as originating at the root, unlessyou include a tilde (<em>~</em>), e.g.:<pre>      <em>file://localhost/~/foo</em>   will be converted to:      <em>file://localhost/your/login/directory/foo</em></pre>The latter feature is a Lynxism, is done homologously on Unix and VMS,and should be used ONLY in local documents intended for Lynx.<p>On VMS, the first element of the path, if not a tilde, is assumed tobe a device, e.g.:<pre>      <em>file://localhost/www_root/directory/filename.suffix</em></pre>should be used for: <em>www_root:[directory]filename.suffix</em><BR>If you are unsure how to specify a file URL in local documents onVMS, invoke Lynx with the desired file or directory as the<em>startfile</em> using any spec acceptable to DCL, and thenuse the <em>showinfo</em> command (<em>=</em>) to see the fileURL which Lynx created for it.<HR><H2><a name="ftp_url">The <em>ftp</em> URL:</a></H2>The ftp URL has the general format:<pre>      <em>ftp://host:port/path;type=[D,I, or A]</em>      <em>ftp://username@host:port/path;type=[D,I, or A]</em></pre><p>The default port is <em>:21</em> and the default <em>username</em>is <em>anonymous</em>.  If <em>username</em> is included,Lynx will prompt you for the password.  For anonymous ftp, Lynx uses your<em>personal_mail_address</em> (user@host) as the <em>password</em>if it has been defined via the '<em>o</em>'ptions menu.  Otherwise,Lynx uses the dummy password <em>WWWUser</em>.(A password can also be embedded in the URL, by replacing<em>username</em> with <em>username:password</em>.  This is stronglydiscouraged for 'real' passwords that must be kept secret, since URLswith the completely unencrypted <em>password</em> may show up on thescreen, in HISTORY and LIST pages etc., and may even become visible toremote sites for example through Referer headers.)Do not include the <em>@</em> if neither <em>username</em> nor<em>:password</em> is included.<p>The <em>;type=</em> parameter can be used with value <em>D</em>,<em>I</em>, or <em>A</em> to force handling of the URL as, respectively,a directory listing, binary file, or ASCII file.  The Lynx ftp gatewaynormally determines this itself, but the parameter can be used if theinternal procedure draws an incorrect inference about the nature ofthe ftp URL.<p>The <em>/path</em> is treated according to RFC1738 for VMSand VM/CMS ftp servers.  The lead slash (<em>/</em>) is treated purelyas a separator, not as a designator for the root, and the <em>path</em>string if present is treated as in or under the login directory.  ForVMS ftp servers, if you wish to have the first element treated as adevice rather than file or subdirectory name, begin it with a hex-escapedslash (<em>%2f</em>), e.g.:<BR><pre><em>ftp://user@myhost/%2fsys$common/syshlp</em></pre>can be used for a listing of sys$common:[syshlp]<BR>Also, on VM/CMS ftp servers, if the <em>path</em> string beginswith <em>vmsysu%3a</em> it receives special handling as an SFSpath, e.g.:<pre>      <em>ftp://ubvm.cc.buffalo.edu/vmsysu%3alistserv.webshare</em></pre><p>For Unix and Unix-emulation ftp servers, RFC1738 is not respectedand the lead slash is treated as the root, i.e., the <em>/path</em> ishandled equivalently to that in file URLs.  The distinction isirrelevant for anonymous ftp, but matters when using ftp fornon-anonymous accounts.  If you are using ftp with a Unix server anddo wish to get a listing of the login directory or have the <em>path</em>string treated as a file or path under the login directory, include atilde (<em>~</em>) as for <a href="#file">file</a> URLs, e.g.:<pre>      <em>ftp://user@myhost/~</em></pre><HR><H2><a name="wais_url">The <em>wais</em> URL:</a></H2>The wais URL is used to retrieve resources using the Wide Area InformationSystem protocol.  The format is:<pre>      <em>wais://host:port/database</em>      <em>wais://host:port/database?wais_query</em>      <em>wais://host:port/database/wais_type/wais_path</em></pre>where <em>:port</em> defaults to <em>:210</em><p>Direct wais support is built into Lynx for VMS, and can be compiledinto Lynx on Unix.<p>If only a <em>database</em> is indicated in the URL, Lynx returnsan ISINDEX cover page for searching that <em>database</em>, and willsubmit your search with the <em>wais_query</em> appended.  Lynx willconvert the server's reply into a hit list with URLs that include the<em>wais_type</em> and <em>wais_path</em> for retrieving items fromthe hit list.<HR><H2><a name="news_url">The <em>news</em>, <em>nntp</em>, and <em>snews</em> URLs:</a></H2>The news and nntp URLs are handled by Lynx as specified in RFC1738, butfor compatibility with other clients, Lynx allows inclusion of host andport fields in news URLs, which properly should be used <em>only</em> innntp and snews URLs.  If not included in news URLs, Lynx will use the nntpserver pointed to by the NNTPSERVER environment variable or configurationsymbol (see lynx.cfg), with default port <em>:119</em>.  A host field mustbe included in nntp URLs, and the port field is optional with the samedefault.  Patches for support of snews URLs are available to qualifiedrecipients via <a href="http://www.subir.com/lynx.html">Lynx links</a>but cannot be included in the general distribution (sorry, see <ahref="#http">http and https</a>).<p>The formats are:<BR><pre>      <em>news:newsgroup</em> (retrieves list of messages in newsgroup)      <em>news:messageID</em> (retrieves the message)      <em>news:*</em> (retrieves list of all available newsgroups)      <em>nntp://host:port/newsgroup</em>      <em>nntp://host:port/messageID</em>      <em>nntp://host:port/*</em></pre>(snews same as nntp, but the default port is <em>:563</em>)<p>The <em>messageID</em> is the message's unique identifier, consistingof an identification string and the host of origin for the message(<em>ident_string@origin_host</em>).<p>Lynx also supports wildcarding via an asterisk for listings of newshierarchies or sub-hierarchies, e.g.:<pre>      <em>news:comp.infosystems.*</em>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -