Saving before big changes to support IPv6.
This commit is contained in:
parent
bce60be30f
commit
3a8ba90dfb
30 changed files with 948 additions and 850 deletions
|
@ -42,7 +42,7 @@
|
|||
FTP (File Transfer Protocol) is a protocol used to transfer files
|
||||
between hosts. The <tt>ftp</tt> namespace offers thorough support
|
||||
to FTP, under a simple interface. The implementation conforms to
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc0959.txt">RFC 959</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -70,8 +70,8 @@ local ftp = require("socket.ftp")
|
|||
|
||||
<p>
|
||||
URLs MUST conform to
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc1738.txt">RFC
|
||||
1738</a>, that is, an URL is a string in the form:
|
||||
<a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a>,
|
||||
that is, an URL is a string in the form:
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
|
|
|
@ -45,8 +45,7 @@ namespace offers full support for the client side of the HTTP
|
|||
protocol (i.e.,
|
||||
the facilities that would be used by a web-browser implementation). The
|
||||
implementation conforms to the HTTP/1.1 standard,
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC
|
||||
2616</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -67,8 +66,7 @@ local http = require("socket.http")
|
|||
|
||||
<p>
|
||||
URLs must conform to
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc1738.txt">RFC
|
||||
1738</a>,
|
||||
<a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a>,
|
||||
that is, an URL is a string in the form:
|
||||
</p>
|
||||
|
||||
|
@ -199,8 +197,7 @@ it usually returns a message body (a web page informing the
|
|||
URL was not found or some other useless page). To make sure the
|
||||
operation was successful, check the returned status <tt>code</tt>. For
|
||||
a list of the possible values and their meanings, refer to <a
|
||||
href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC
|
||||
2616</a>.
|
||||
href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>.
|
||||
</p>
|
||||
|
||||
<p class=description>
|
||||
|
@ -278,7 +275,7 @@ download and return status "401 Authentication Required".
|
|||
The HTTP/1.1 standard defines two authentication methods: the Basic
|
||||
Authentication Scheme and the Digest Authentication Scheme, both
|
||||
explained in detail in
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2068.txt">RFC 2068</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a>.
|
||||
</p>
|
||||
|
||||
<p class=note>The Basic Authentication Scheme sends
|
||||
|
@ -304,7 +301,7 @@ b, c, h = http.request("http://fulano:silva@www.example.com/private/index.html")
|
|||
-- the request directly.
|
||||
r, c = http.request {
|
||||
url = "http://www.example.com/private/index.html",
|
||||
headers = { authentication = "Basic " .. (mime.b64("fulano:silva")) }
|
||||
headers = { authorization = "Basic " .. (mime.b64("fulano:silva")) }
|
||||
}
|
||||
</pre>
|
||||
|
||||
|
|
|
@ -138,18 +138,22 @@ all!
|
|||
</p>
|
||||
|
||||
<ul>
|
||||
<li> Fixed: manual sample of HTTP authentication now uses correct
|
||||
"authorization" header (Alexandre Ittner);
|
||||
<li> Fixed: receive() returns immediatelly if prefix can satisfy
|
||||
bytes requested (M Joonas Pihlaja);
|
||||
<li> Fixed: multicast didn't work on Windows, or anywhere
|
||||
else for that matter (Herbert Leuwer, Adrian Sietsma)
|
||||
else for that matter (Herbert Leuwer, Adrian Sietsma);
|
||||
<li> Fixed: select() now reports an error when called with more
|
||||
sockets than FD_SETSIZE (Lorenzo Leonini)
|
||||
<li> Fixed: manual links to home.html changed to index.html (Robert Hahn)
|
||||
sockets than FD_SETSIZE (Lorenzo Leonini);
|
||||
<li> Fixed: manual links to home.html changed to index.html (Robert Hahn);
|
||||
<li> Fixed: mime.unb64() would return an empty string on results that started
|
||||
with a null character (Robert Raschke)
|
||||
<li> Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray)
|
||||
with a null character (Robert Raschke);
|
||||
<li> Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray);
|
||||
<li> Fixed: calling sleep() with negative numbers could
|
||||
block forever, wasting CPU. Now it returns immediately (MPB);
|
||||
<li> Improved: FTP commands are now sent in upper case to
|
||||
help buggy servers (Anders Eurenius)
|
||||
help buggy servers (Anders Eurenius);
|
||||
<li> Improved: known headers now sent in canonic
|
||||
capitalization to help buggy servers (Joseph Stewart);
|
||||
<li> Improved: Clarified tcp:receive() in the manual (MPB);
|
||||
|
|
|
@ -44,11 +44,11 @@ content transfer encodings, such as Base64 and Quoted-Printable.
|
|||
It also provides functions to break text into lines and change
|
||||
the end-of-line convention.
|
||||
MIME is described mainly in
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2045.txt">RFC 2045</a>,
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2046.txt">2046</a>,
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2047.txt">2047</a>,
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2047.txt">2048</a>, and
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2048.txt">2049</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
|
||||
<a href="http://www.ietf.org/rfc/rfc2046.txt">2046</a>,
|
||||
<a href="http://www.ietf.org/rfc/rfc2047.txt">2047</a>,
|
||||
<a href="http://www.ietf.org/rfc/rfc2047.txt">2048</a>, and
|
||||
<a href="http://www.ietf.org/rfc/rfc2048.txt">2049</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -48,14 +48,13 @@ control (if you bother to read the code).
|
|||
</p>
|
||||
|
||||
<p>The implementation conforms to the Simple Mail Transfer Protocol,
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2821.txt">RFC 2821</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2821.txt">RFC 2821</a>.
|
||||
Another RFC of interest is <a
|
||||
href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>,
|
||||
href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a>,
|
||||
which governs the Internet Message Format.
|
||||
Multipart messages (those that contain attachments) are part
|
||||
of the MIME standard, but described mainly
|
||||
in <a href="http://www.cs.princeton.edu/~diego/rfc/rfc2046.txt">RFC
|
||||
2046</a>
|
||||
in <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>
|
||||
|
||||
<p> In the description below, good understanding of <a
|
||||
href="http://lua-users.org/wiki/FiltersSourcesAndSinks"> LTN012, Filters
|
||||
|
@ -196,7 +195,7 @@ part of the message and will not be sent to anyone.
|
|||
</p>
|
||||
|
||||
<p class=note>
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>
|
||||
<a href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a>
|
||||
has two <em>important and short</em> sections, "3.6.3. Destination address
|
||||
fields" and "5. Security considerations", explaining the proper
|
||||
use of these headers. Here is a summary of what it says:
|
||||
|
@ -236,9 +235,9 @@ exactly what you <em>don't</em> want to happen!
|
|||
|
||||
<p class=note>
|
||||
I hope this clarifies the issue. Otherwise, please refer to
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2821.txt">RFC 2821</a>
|
||||
<a href="http://www.ietf.org/rfc/rfc2821.txt">RFC 2821</a>
|
||||
and
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a>.
|
||||
</p>
|
||||
|
||||
<pre class=example>
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
The <tt>url</tt> namespace provides functions to parse, protect,
|
||||
and build URLs, as well as functions to compose absolute URLs
|
||||
from base and relative URLs, according to
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2396.txt">RFC
|
||||
2396</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -91,7 +90,7 @@ The function returns a string with the absolute URL.
|
|||
<p class=note>
|
||||
Note: The rules that
|
||||
govern the composition are fairly complex, and are described in detail in
|
||||
<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2396.txt">RFC 2396</a>.
|
||||
<a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>.
|
||||
The example bellow should give an idea of what the rules are.
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue