mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 20:38:22 +01:00
Updated manual timestamps and the added stuffing filters to mime.html.
This commit is contained in:
parent
613534c795
commit
eac26d2c8d
@ -118,7 +118,7 @@ message.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:46:57 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -267,7 +267,7 @@ f, e = ftp.put{
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:04 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -303,7 +303,7 @@ r, c = http.request {
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -284,7 +284,7 @@ those that have compatibility issues.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sun Aug 10 01:36:26 PDT 2003
|
Thu Jun 17 02:47:14 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -330,7 +330,7 @@ io.write(socket.try((udp:receive())))
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -415,7 +415,7 @@ Creates and returns a source that produces the contents of a
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -156,6 +156,22 @@ base64 = ltn12.filter.chain(
|
|||||||
)
|
)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<!-- stuff +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
|
||||||
|
<p class=name id="stuff">
|
||||||
|
mime.<b>stuff()</b><br>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class=description>
|
||||||
|
Creates and returns a filter that performs stuffing of SMTP messages.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class=note>
|
||||||
|
Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function
|
||||||
|
uses this filter automatically. You don't need to chain it with your
|
||||||
|
source, or apply it to your message body.
|
||||||
|
</p>
|
||||||
|
|
||||||
<!-- wrap +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
<!-- wrap +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
|
||||||
<p class=name id="wrap">
|
<p class=name id="wrap">
|
||||||
@ -232,33 +248,36 @@ print((mime.b64("diego:password")))
|
|||||||
|
|
||||||
<!-- dot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
<!-- dot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
<p class=name id="dot">
|
<p class=name id="dot">
|
||||||
A, B = mime.<b>dot(</b>C [, D]<b>)</b>
|
A, n = mime.<b>dot(</b>m [, B]<b>)</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=description>
|
||||||
Low-level filter to perform Base64 encoding.
|
Low-level filter to perform SMTP stuffing and enable transmission of
|
||||||
|
messages containing the sequence "CRLF.CRLF".
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is the encoded version of the largest prefix of
|
<tt>A</tt> is the stuffed version of <tt>B</tt>. '<tt>n</tt>' gives the
|
||||||
<tt>C..D</tt>
|
number of characters from the sequence CRLF seen in the end of <tt>B</tt>.
|
||||||
that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of
|
'<tt>m</tt>' should tell the same, but for the previous chunk.
|
||||||
<tt>C..D</tt>, <em>before</em> encoding.
|
|
||||||
If <tt>D</tt> is <tt><b>nil</b></tt>, <tt>A</tt> is padded with
|
|
||||||
the encoding of the remaining bytes of <tt>C</tt>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=note>
|
<p class=note>Note: The message body is defined to begin with
|
||||||
Note: The simplest use of this function is to encode a string into it's
|
an implicit CRLF. Therefore, to stuff a message correctly, the
|
||||||
Base64 transfer content encoding. Notice the extra parenthesis around the
|
first <tt>m</tt> should have the value 2.
|
||||||
call to <tt>mime.b64</tt>, to discard the second return value.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class=example>
|
<pre class=example>
|
||||||
print((mime.b64("diego:password")))
|
print((string.gsub(mime.dot(2, ".\r\nStuffing the message.\r\n.\r\n."), "\r\n", "\\n")))
|
||||||
--> ZGllZ286cGFzc3dvcmQ=
|
--> ..\nStuffing the message.\n..\n..
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p class=note>
|
||||||
|
Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function
|
||||||
|
uses this filter automatically. You don't need to
|
||||||
|
apply it again.
|
||||||
|
</p>
|
||||||
|
|
||||||
<!-- eol ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
<!-- eol ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
|
||||||
<p class=name id="eol">
|
<p class=name id="eol">
|
||||||
@ -273,7 +292,7 @@ context the function receives besides the chunk. An updated version of
|
|||||||
the context is returned after each new chunk.
|
the context is returned after each new chunk.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is the translated version of <tt>D</tt>. <tt>C</tt> is the
|
<tt>A</tt> is the translated version of <tt>D</tt>. <tt>C</tt> is the
|
||||||
ASCII value of the last character of the previous chunk, if it was a
|
ASCII value of the last character of the previous chunk, if it was a
|
||||||
candidate for line break, or 0 otherwise.
|
candidate for line break, or 0 otherwise.
|
||||||
@ -296,7 +315,7 @@ A, B = mime.<b>qp(</b>C [, D, marker]<b>)</b>
|
|||||||
Low-level filter to perform Quoted-Printable encoding.
|
Low-level filter to perform Quoted-Printable encoding.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is the encoded version of the largest prefix of
|
<tt>A</tt> is the encoded version of the largest prefix of
|
||||||
<tt>C..D</tt>
|
<tt>C..D</tt>
|
||||||
that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of
|
that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of
|
||||||
@ -328,7 +347,7 @@ A, m = mime.<b>qpwrp(</b>n [, B, length]<b>)</b>
|
|||||||
Low-level filter to break Quoted-Printable text into lines.
|
Low-level filter to break Quoted-Printable text into lines.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
|
<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
|
||||||
<tt>length</tt> bytes (defaults to 76).
|
<tt>length</tt> bytes (defaults to 76).
|
||||||
'<tt>n</tt>' should tell how many bytes are left for the first
|
'<tt>n</tt>' should tell how many bytes are left for the first
|
||||||
@ -352,7 +371,7 @@ A, B = mime.<b>unb64(</b>C [, D]<b>)</b>
|
|||||||
Low-level filter to perform Base64 decoding.
|
Low-level filter to perform Base64 decoding.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is the decoded version of the largest prefix of
|
<tt>A</tt> is the decoded version of the largest prefix of
|
||||||
<tt>C..D</tt>
|
<tt>C..D</tt>
|
||||||
that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of
|
that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of
|
||||||
@ -383,7 +402,7 @@ Low-level filter to remove the Quoted-Printable transfer content encoding
|
|||||||
from data.
|
from data.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is the decoded version of the largest prefix of
|
<tt>A</tt> is the decoded version of the largest prefix of
|
||||||
<tt>C..D</tt>
|
<tt>C..D</tt>
|
||||||
that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of
|
that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of
|
||||||
@ -414,7 +433,7 @@ Low-level filter to break text into lines with CRLF marker.
|
|||||||
Text is assumed to be in the <a href=#normalize><tt>normalize</tt></a> form.
|
Text is assumed to be in the <a href=#normalize><tt>normalize</tt></a> form.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class=description>
|
<p class=parameters>
|
||||||
<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
|
<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
|
||||||
<tt>length</tt> bytes (defaults to 76).
|
<tt>length</tt> bytes (defaults to 76).
|
||||||
'<tt>n</tt>' should tell how many bytes are left for the first
|
'<tt>n</tt>' should tell how many bytes are left for the first
|
||||||
@ -443,7 +462,7 @@ marker.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -107,17 +107,19 @@
|
|||||||
<a href="mime.html#normalize">normalize</a>,
|
<a href="mime.html#normalize">normalize</a>,
|
||||||
<a href="mime.html#decode">decode</a>,
|
<a href="mime.html#decode">decode</a>,
|
||||||
<a href="mime.html#encode">encode</a>,
|
<a href="mime.html#encode">encode</a>,
|
||||||
|
<a href="mime.html#stuff">stuff</a>,
|
||||||
<a href="mime.html#wrap">wrap</a>.
|
<a href="mime.html#wrap">wrap</a>.
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<a href="mime.html#low">low-level</a>:
|
<a href="mime.html#low">low-level</a>:
|
||||||
<a href="mime.html#b64">b64</a>,
|
<a href="mime.html#b64">b64</a>,
|
||||||
<a href="mime.html#unb64">unb64</a>,
|
<a href="mime.html#dot">dot</a>,
|
||||||
<a href="mime.html#eol">eol</a>,
|
<a href="mime.html#eol">eol</a>,
|
||||||
<a href="mime.html#qp">qp</a>,
|
<a href="mime.html#qp">qp</a>,
|
||||||
<a href="mime.html#unqp">unqp</a>,
|
|
||||||
<a href="mime.html#wrp">wrp</a>,
|
<a href="mime.html#wrp">wrp</a>,
|
||||||
<a href="mime.html#qpwrp">qpwrp</a>.
|
<a href="mime.html#qpwrp">qpwrp</a>.
|
||||||
|
<a href="mime.html#unb64">unb64</a>,
|
||||||
|
<a href="mime.html#unqp">unqp</a>,
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
@ -218,7 +220,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Thu Sep 27 16:18:27 EST 2001
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -347,8 +347,9 @@ source = smtp.message{
|
|||||||
[1] = {
|
[1] = {
|
||||||
body = mime.eol(0, [[
|
body = mime.eol(0, [[
|
||||||
Lines in a message body should always end with CRLF.
|
Lines in a message body should always end with CRLF.
|
||||||
The smtp module will *NOT* perform translation. It will
|
The smtp module will *NOT* perform translation. However, the
|
||||||
perform necessary stuffing or '.' characters, though.
|
send function *DOES* perform SMTP stuffing, whereas the message
|
||||||
|
function does *NOT*.
|
||||||
]])
|
]])
|
||||||
},
|
},
|
||||||
-- second part: headers describe content to be a png image,
|
-- second part: headers describe content to be a png image,
|
||||||
@ -397,7 +398,7 @@ r, e = smtp.send{
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -251,7 +251,7 @@ This constant has a string describing the current LuaSocket version.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -462,7 +462,7 @@ This function returns 1.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:47:21 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -395,7 +395,7 @@ imperative nature obvious.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:48:14 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
@ -315,7 +315,7 @@ The function returns the decoded string.
|
|||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
Last modified by Diego Nehab on <br>
|
Last modified by Diego Nehab on <br>
|
||||||
Sat Aug 9 01:00:41 PDT 2003
|
Thu Jun 17 02:48:14 EDT 2004
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</center>
|
</center>
|
||||||
|
Loading…
Reference in New Issue
Block a user