aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 07:00:43 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 07:00:43 +0000
commiteac26d2c8dafab604ef2e97e504326cfaf1033cf (patch)
treea0b53ee062a46c471014b07185229daff2e0162e
parent613534c79526e313d6bfd5ffa514797b364dc185 (diff)
downloadluasocket-eac26d2c8dafab604ef2e97e504326cfaf1033cf.tar.gz
luasocket-eac26d2c8dafab604ef2e97e504326cfaf1033cf.tar.bz2
luasocket-eac26d2c8dafab604ef2e97e504326cfaf1033cf.zip
Updated manual timestamps and the added stuffing filters to mime.html.
-rw-r--r--doc/dns.html2
-rw-r--r--doc/ftp.html2
-rw-r--r--doc/http.html2
-rw-r--r--doc/index.html2
-rw-r--r--doc/introduction.html2
-rw-r--r--doc/ltn12.html2
-rw-r--r--doc/mime.html63
-rw-r--r--doc/reference.html8
-rw-r--r--doc/smtp.html7
-rw-r--r--doc/socket.html2
-rw-r--r--doc/tcp.html2
-rw-r--r--doc/udp.html2
-rw-r--r--doc/url.html2
-rw-r--r--test/testmesg.lua2
14 files changed, 61 insertions, 39 deletions
diff --git a/doc/dns.html b/doc/dns.html
index fa4c230..67b24ca 100644
--- a/doc/dns.html
+++ b/doc/dns.html
@@ -118,7 +118,7 @@ message.
118<p> 118<p>
119<small> 119<small>
120Last modified by Diego Nehab on <br> 120Last modified by Diego Nehab on <br>
121Sat Aug 9 01:00:41 PDT 2003 121Thu Jun 17 02:46:57 EDT 2004
122</small> 122</small>
123</p> 123</p>
124</center> 124</center>
diff --git a/doc/ftp.html b/doc/ftp.html
index 7ad5e4d..14a3601 100644
--- a/doc/ftp.html
+++ b/doc/ftp.html
@@ -267,7 +267,7 @@ f, e = ftp.put{
267<p> 267<p>
268<small> 268<small>
269Last modified by Diego Nehab on <br> 269Last modified by Diego Nehab on <br>
270Sat Aug 9 01:00:41 PDT 2003 270Thu Jun 17 02:47:04 EDT 2004
271</small> 271</small>
272</p> 272</p>
273</center> 273</center>
diff --git a/doc/http.html b/doc/http.html
index 9125df7..a98915c 100644
--- a/doc/http.html
+++ b/doc/http.html
@@ -303,7 +303,7 @@ r, c = http.request {
303<p> 303<p>
304<small> 304<small>
305Last modified by Diego Nehab on <br> 305Last modified by Diego Nehab on <br>
306Sat Aug 9 01:00:41 PDT 2003 306Thu Jun 17 02:47:21 EDT 2004
307</small> 307</small>
308</p> 308</p>
309</center> 309</center>
diff --git a/doc/index.html b/doc/index.html
index f6d37ac..b96385e 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -284,7 +284,7 @@ those that have compatibility issues.
284<p> 284<p>
285<small> 285<small>
286Last modified by Diego Nehab on <br> 286Last modified by Diego Nehab on <br>
287Sun Aug 10 01:36:26 PDT 2003 287Thu Jun 17 02:47:14 EDT 2004
288</small> 288</small>
289</p> 289</p>
290</center> 290</center>
diff --git a/doc/introduction.html b/doc/introduction.html
index 63a7d84..8706c83 100644
--- a/doc/introduction.html
+++ b/doc/introduction.html
@@ -330,7 +330,7 @@ io.write(socket.try((udp:receive())))
330<p> 330<p>
331<small> 331<small>
332Last modified by Diego Nehab on <br> 332Last modified by Diego Nehab on <br>
333Sat Aug 9 01:00:41 PDT 2003 333Thu Jun 17 02:47:21 EDT 2004
334</small> 334</small>
335</p> 335</p>
336</center> 336</center>
diff --git a/doc/ltn12.html b/doc/ltn12.html
index 9029b9c..23b9ff8 100644
--- a/doc/ltn12.html
+++ b/doc/ltn12.html
@@ -415,7 +415,7 @@ Creates and returns a source that produces the contents of a
415<p> 415<p>
416<small> 416<small>
417Last modified by Diego Nehab on <br> 417Last modified by Diego Nehab on <br>
418Sat Aug 9 01:00:41 PDT 2003 418Thu Jun 17 02:47:21 EDT 2004
419</small> 419</small>
420</p> 420</p>
421</center> 421</center>
diff --git a/doc/mime.html b/doc/mime.html
index fe15df3..520c8ff 100644
--- a/doc/mime.html
+++ b/doc/mime.html
@@ -156,6 +156,22 @@ base64 = ltn12.filter.chain(
156) 156)
157</pre> 157</pre>
158 158
159<!-- stuff +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
160
161<p class=name id="stuff">
162mime.<b>stuff()</b><br>
163</p>
164
165<p class=description>
166Creates and returns a filter that performs stuffing of SMTP messages.
167</p>
168
169<p class=note>
170Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function
171uses this filter automatically. You don't need to chain it with your
172source, or apply it to your message body.
173</p>
174
159<!-- wrap +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 175<!-- wrap +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
160 176
161<p class=name id="wrap"> 177<p class=name id="wrap">
@@ -232,33 +248,36 @@ print((mime.b64("diego:password")))
232 248
233<!-- dot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 249<!-- dot +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
234<p class=name id="dot"> 250<p class=name id="dot">
235A, B = mime.<b>dot(</b>C [, D]<b>)</b> 251A, n = mime.<b>dot(</b>m [, B]<b>)</b>
236</p> 252</p>
237 253
238<p class=description> 254<p class=description>
239Low-level filter to perform Base64 encoding. 255Low-level filter to perform SMTP stuffing and enable transmission of
256messages containing the sequence "CRLF.CRLF".
240</p> 257</p>
241 258
242<p class=description> 259<p class=parameters>
243<tt>A</tt> is the encoded version of the largest prefix of 260<tt>A</tt> is the stuffed version of <tt>B</tt>. '<tt>n</tt>' gives the
244<tt>C..D</tt> 261number of characters from the sequence CRLF seen in the end of <tt>B</tt>.
245that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of 262'<tt>m</tt>' should tell the same, but for the previous chunk.
246<tt>C..D</tt>, <em>before</em> encoding.
247If <tt>D</tt> is <tt><b>nil</b></tt>, <tt>A</tt> is padded with
248the encoding of the remaining bytes of <tt>C</tt>.
249</p> 263</p>
250 264
251<p class=note> 265<p class=note>Note: The message body is defined to begin with
252Note: The simplest use of this function is to encode a string into it's 266an implicit CRLF. Therefore, to stuff a message correctly, the
253Base64 transfer content encoding. Notice the extra parenthesis around the 267first <tt>m</tt> should have the value 2.
254call to <tt>mime.b64</tt>, to discard the second return value.
255</p> 268</p>
256 269
257<pre class=example> 270<pre class=example>
258print((mime.b64("diego:password"))) 271print((string.gsub(mime.dot(2, ".\r\nStuffing the message.\r\n.\r\n."), "\r\n", "\\n")))
259--&gt; ZGllZ286cGFzc3dvcmQ= 272--&gt; ..\nStuffing the message.\n..\n..
260</pre> 273</pre>
261 274
275<p class=note>
276Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function
277uses this filter automatically. You don't need to
278apply it again.
279</p>
280
262<!-- eol ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 281<!-- eol ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
263 282
264<p class=name id="eol"> 283<p class=name id="eol">
@@ -273,7 +292,7 @@ context the function receives besides the chunk. An updated version of
273the context is returned after each new chunk. 292the context is returned after each new chunk.
274</p> 293</p>
275 294
276<p class=description> 295<p class=parameters>
277<tt>A</tt> is the translated version of <tt>D</tt>. <tt>C</tt> is the 296<tt>A</tt> is the translated version of <tt>D</tt>. <tt>C</tt> is the
278ASCII value of the last character of the previous chunk, if it was a 297ASCII value of the last character of the previous chunk, if it was a
279candidate for line break, or 0 otherwise. 298candidate for line break, or 0 otherwise.
@@ -296,7 +315,7 @@ A, B = mime.<b>qp(</b>C [, D, marker]<b>)</b>
296Low-level filter to perform Quoted-Printable encoding. 315Low-level filter to perform Quoted-Printable encoding.
297</p> 316</p>
298 317
299<p class=description> 318<p class=parameters>
300<tt>A</tt> is the encoded version of the largest prefix of 319<tt>A</tt> is the encoded version of the largest prefix of
301<tt>C..D</tt> 320<tt>C..D</tt>
302that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of 321that 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>
328Low-level filter to break Quoted-Printable text into lines. 347Low-level filter to break Quoted-Printable text into lines.
329</p> 348</p>
330 349
331<p class=description> 350<p class=parameters>
332<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most 351<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
333<tt>length</tt> bytes (defaults to 76). 352<tt>length</tt> bytes (defaults to 76).
334'<tt>n</tt>' should tell how many bytes are left for the first 353'<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>
352Low-level filter to perform Base64 decoding. 371Low-level filter to perform Base64 decoding.
353</p> 372</p>
354 373
355<p class=description> 374<p class=parameters>
356<tt>A</tt> is the decoded version of the largest prefix of 375<tt>A</tt> is the decoded version of the largest prefix of
357<tt>C..D</tt> 376<tt>C..D</tt>
358that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of 377that 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
383from data. 402from data.
384</p> 403</p>
385 404
386<p class=description> 405<p class=parameters>
387<tt>A</tt> is the decoded version of the largest prefix of 406<tt>A</tt> is the decoded version of the largest prefix of
388<tt>C..D</tt> 407<tt>C..D</tt>
389that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of 408that 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.
414Text is assumed to be in the <a href=#normalize><tt>normalize</tt></a> form. 433Text is assumed to be in the <a href=#normalize><tt>normalize</tt></a> form.
415</p> 434</p>
416 435
417<p class=description> 436<p class=parameters>
418<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most 437<tt>A</tt> is a copy of <tt>B</tt>, broken into lines of at most
419<tt>length</tt> bytes (defaults to 76). 438<tt>length</tt> bytes (defaults to 76).
420'<tt>n</tt>' should tell how many bytes are left for the first 439'<tt>n</tt>' should tell how many bytes are left for the first
@@ -443,7 +462,7 @@ marker.
443<p> 462<p>
444<small> 463<small>
445Last modified by Diego Nehab on <br> 464Last modified by Diego Nehab on <br>
446Sat Aug 9 01:00:41 PDT 2003 465Thu Jun 17 02:47:21 EDT 2004
447</small> 466</small>
448</p> 467</p>
449</center> 468</center>
diff --git a/doc/reference.html b/doc/reference.html
index 9ff6004..607958b 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -107,17 +107,19 @@
107<a href="mime.html#normalize">normalize</a>, 107<a href="mime.html#normalize">normalize</a>,
108<a href="mime.html#decode">decode</a>, 108<a href="mime.html#decode">decode</a>,
109<a href="mime.html#encode">encode</a>, 109<a href="mime.html#encode">encode</a>,
110<a href="mime.html#stuff">stuff</a>,
110<a href="mime.html#wrap">wrap</a>. 111<a href="mime.html#wrap">wrap</a>.
111</blockquote> 112</blockquote>
112<blockquote> 113<blockquote>
113<a href="mime.html#low">low-level</a>: 114<a href="mime.html#low">low-level</a>:
114<a href="mime.html#b64">b64</a>, 115<a href="mime.html#b64">b64</a>,
115<a href="mime.html#unb64">unb64</a>, 116<a href="mime.html#dot">dot</a>,
116<a href="mime.html#eol">eol</a>, 117<a href="mime.html#eol">eol</a>,
117<a href="mime.html#qp">qp</a>, 118<a href="mime.html#qp">qp</a>,
118<a href="mime.html#unqp">unqp</a>,
119<a href="mime.html#wrp">wrp</a>, 119<a href="mime.html#wrp">wrp</a>,
120<a href="mime.html#qpwrp">qpwrp</a>. 120<a href="mime.html#qpwrp">qpwrp</a>.
121<a href="mime.html#unb64">unb64</a>,
122<a href="mime.html#unqp">unqp</a>,
121</blockquote> 123</blockquote>
122</blockquote> 124</blockquote>
123 125
@@ -218,7 +220,7 @@
218<p> 220<p>
219<small> 221<small>
220Last modified by Diego Nehab on <br> 222Last modified by Diego Nehab on <br>
221Thu Sep 27 16:18:27 EST 2001 223Thu Jun 17 02:47:21 EDT 2004
222</small> 224</small>
223</p> 225</p>
224</center> 226</center>
diff --git a/doc/smtp.html b/doc/smtp.html
index 6b348e0..89f4757 100644
--- a/doc/smtp.html
+++ b/doc/smtp.html
@@ -347,8 +347,9 @@ source = smtp.message{
347 [1] = { 347 [1] = {
348 body = mime.eol(0, [[ 348 body = mime.eol(0, [[
349 Lines in a message body should always end with CRLF. 349 Lines in a message body should always end with CRLF.
350 The smtp module will *NOT* perform translation. It will 350 The smtp module will *NOT* perform translation. However, the
351 perform necessary stuffing or '.' characters, though. 351 send function *DOES* perform SMTP stuffing, whereas the message
352 function does *NOT*.
352 ]]) 353 ]])
353 }, 354 },
354 -- second part: headers describe content to be a png image, 355 -- second part: headers describe content to be a png image,
@@ -397,7 +398,7 @@ r, e = smtp.send{
397<p> 398<p>
398<small> 399<small>
399Last modified by Diego Nehab on <br> 400Last modified by Diego Nehab on <br>
400Sat Aug 9 01:00:41 PDT 2003 401Thu Jun 17 02:47:21 EDT 2004
401</small> 402</small>
402</p> 403</p>
403</center> 404</center>
diff --git a/doc/socket.html b/doc/socket.html
index cf65704..d7739f8 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -251,7 +251,7 @@ This constant has a string describing the current LuaSocket version.
251<p> 251<p>
252<small> 252<small>
253Last modified by Diego Nehab on <br> 253Last modified by Diego Nehab on <br>
254Sat Aug 9 01:00:41 PDT 2003 254Thu Jun 17 02:47:21 EDT 2004
255</small> 255</small>
256</p> 256</p>
257</center> 257</center>
diff --git a/doc/tcp.html b/doc/tcp.html
index 7a49660..781ec6f 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -462,7 +462,7 @@ This function returns 1.
462<p> 462<p>
463<small> 463<small>
464Last modified by Diego Nehab on <br> 464Last modified by Diego Nehab on <br>
465Sat Aug 9 01:00:41 PDT 2003 465Thu Jun 17 02:47:21 EDT 2004
466</small> 466</small>
467</p> 467</p>
468</center> 468</center>
diff --git a/doc/udp.html b/doc/udp.html
index 5ae0a89..6f2e607 100644
--- a/doc/udp.html
+++ b/doc/udp.html
@@ -395,7 +395,7 @@ imperative nature obvious.
395<p> 395<p>
396<small> 396<small>
397Last modified by Diego Nehab on <br> 397Last modified by Diego Nehab on <br>
398Sat Aug 9 01:00:41 PDT 2003 398Thu Jun 17 02:48:14 EDT 2004
399</small> 399</small>
400</p> 400</p>
401</center> 401</center>
diff --git a/doc/url.html b/doc/url.html
index 1dbee52..46e6e09 100644
--- a/doc/url.html
+++ b/doc/url.html
@@ -315,7 +315,7 @@ The function returns the decoded string.
315<p> 315<p>
316<small> 316<small>
317Last modified by Diego Nehab on <br> 317Last modified by Diego Nehab on <br>
318Sat Aug 9 01:00:41 PDT 2003 318Thu Jun 17 02:48:14 EDT 2004
319</small> 319</small>
320</p> 320</p>
321</center> 321</center>
diff --git a/test/testmesg.lua b/test/testmesg.lua
index 3e4c28f..d43c189 100644
--- a/test/testmesg.lua
+++ b/test/testmesg.lua
@@ -23,7 +23,7 @@ source = smtp.message{
23 Lines in a message body should always end with CRLF. 23 Lines in a message body should always end with CRLF.
24 The smtp module will *NOT* perform translation. It will 24 The smtp module will *NOT* perform translation. It will
25 perform necessary stuffing, though. 25 perform necessary stuffing, though.
26 ]]) 26 ]])
27 }, 27 },
28 -- second part: Headers describe content the to be an image, 28 -- second part: Headers describe content the to be an image,
29 -- sent under the base64 transfer content encoding. 29 -- sent under the base64 transfer content encoding.