diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 07:00:43 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 07:00:43 +0000 |
commit | eac26d2c8dafab604ef2e97e504326cfaf1033cf (patch) | |
tree | a0b53ee062a46c471014b07185229daff2e0162e | |
parent | 613534c79526e313d6bfd5ffa514797b364dc185 (diff) | |
download | luasocket-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.html | 2 | ||||
-rw-r--r-- | doc/ftp.html | 2 | ||||
-rw-r--r-- | doc/http.html | 2 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/introduction.html | 2 | ||||
-rw-r--r-- | doc/ltn12.html | 2 | ||||
-rw-r--r-- | doc/mime.html | 63 | ||||
-rw-r--r-- | doc/reference.html | 8 | ||||
-rw-r--r-- | doc/smtp.html | 7 | ||||
-rw-r--r-- | doc/socket.html | 2 | ||||
-rw-r--r-- | doc/tcp.html | 2 | ||||
-rw-r--r-- | doc/udp.html | 2 | ||||
-rw-r--r-- | doc/url.html | 2 | ||||
-rw-r--r-- | test/testmesg.lua | 2 |
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> |
120 | Last modified by Diego Nehab on <br> | 120 | Last modified by Diego Nehab on <br> |
121 | Sat Aug 9 01:00:41 PDT 2003 | 121 | Thu 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> |
269 | Last modified by Diego Nehab on <br> | 269 | Last modified by Diego Nehab on <br> |
270 | Sat Aug 9 01:00:41 PDT 2003 | 270 | Thu 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> |
305 | Last modified by Diego Nehab on <br> | 305 | Last modified by Diego Nehab on <br> |
306 | Sat Aug 9 01:00:41 PDT 2003 | 306 | Thu 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> |
286 | Last modified by Diego Nehab on <br> | 286 | Last modified by Diego Nehab on <br> |
287 | Sun Aug 10 01:36:26 PDT 2003 | 287 | Thu 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> |
332 | Last modified by Diego Nehab on <br> | 332 | Last modified by Diego Nehab on <br> |
333 | Sat Aug 9 01:00:41 PDT 2003 | 333 | Thu 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> |
417 | Last modified by Diego Nehab on <br> | 417 | Last modified by Diego Nehab on <br> |
418 | Sat Aug 9 01:00:41 PDT 2003 | 418 | Thu 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"> | ||
162 | mime.<b>stuff()</b><br> | ||
163 | </p> | ||
164 | |||
165 | <p class=description> | ||
166 | Creates and returns a filter that performs stuffing of SMTP messages. | ||
167 | </p> | ||
168 | |||
169 | <p class=note> | ||
170 | Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function | ||
171 | uses this filter automatically. You don't need to chain it with your | ||
172 | source, 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"> |
235 | A, B = mime.<b>dot(</b>C [, D]<b>)</b> | 251 | A, n = mime.<b>dot(</b>m [, B]<b>)</b> |
236 | </p> | 252 | </p> |
237 | 253 | ||
238 | <p class=description> | 254 | <p class=description> |
239 | Low-level filter to perform Base64 encoding. | 255 | Low-level filter to perform SMTP stuffing and enable transmission of |
256 | messages 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> | 261 | number of characters from the sequence CRLF seen in the end of <tt>B</tt>. |
245 | that 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. | ||
247 | If <tt>D</tt> is <tt><b>nil</b></tt>, <tt>A</tt> is padded with | ||
248 | the 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 |
252 | Note: The simplest use of this function is to encode a string into it's | 266 | an implicit CRLF. Therefore, to stuff a message correctly, the |
253 | Base64 transfer content encoding. Notice the extra parenthesis around the | 267 | first <tt>m</tt> should have the value 2. |
254 | call 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> |
258 | print((mime.b64("diego:password"))) | 271 | print((string.gsub(mime.dot(2, ".\r\nStuffing the message.\r\n.\r\n."), "\r\n", "\\n"))) |
259 | --> ZGllZ286cGFzc3dvcmQ= | 272 | --> ..\nStuffing the message.\n..\n.. |
260 | </pre> | 273 | </pre> |
261 | 274 | ||
275 | <p class=note> | ||
276 | Note: The <a href=smtp.html#send><tt>smtp.send</tt></a> function | ||
277 | uses this filter automatically. You don't need to | ||
278 | apply 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 | |||
273 | the context is returned after each new chunk. | 292 | the 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 |
278 | ASCII value of the last character of the previous chunk, if it was a | 297 | ASCII value of the last character of the previous chunk, if it was a |
279 | candidate for line break, or 0 otherwise. | 298 | candidate for line break, or 0 otherwise. |
@@ -296,7 +315,7 @@ A, B = mime.<b>qp(</b>C [, D, marker]<b>)</b> | |||
296 | Low-level filter to perform Quoted-Printable encoding. | 315 | Low-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> |
302 | that can be encoded unambiguously. <tt>B</tt> has the remaining bytes of | 321 | 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> | |||
328 | Low-level filter to break Quoted-Printable text into lines. | 347 | Low-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> | |||
352 | Low-level filter to perform Base64 decoding. | 371 | Low-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> |
358 | that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of | 377 | 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 | |||
383 | from data. | 402 | from 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> |
389 | that can be decoded unambiguously. <tt>B</tt> has the remaining bytes of | 408 | 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. | |||
414 | Text is assumed to be in the <a href=#normalize><tt>normalize</tt></a> form. | 433 | Text 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> |
445 | Last modified by Diego Nehab on <br> | 464 | Last modified by Diego Nehab on <br> |
446 | Sat Aug 9 01:00:41 PDT 2003 | 465 | Thu 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> |
220 | Last modified by Diego Nehab on <br> | 222 | Last modified by Diego Nehab on <br> |
221 | Thu Sep 27 16:18:27 EST 2001 | 223 | Thu 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> |
399 | Last modified by Diego Nehab on <br> | 400 | Last modified by Diego Nehab on <br> |
400 | Sat Aug 9 01:00:41 PDT 2003 | 401 | Thu 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> |
253 | Last modified by Diego Nehab on <br> | 253 | Last modified by Diego Nehab on <br> |
254 | Sat Aug 9 01:00:41 PDT 2003 | 254 | Thu 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> |
464 | Last modified by Diego Nehab on <br> | 464 | Last modified by Diego Nehab on <br> |
465 | Sat Aug 9 01:00:41 PDT 2003 | 465 | Thu 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> |
397 | Last modified by Diego Nehab on <br> | 397 | Last modified by Diego Nehab on <br> |
398 | Sat Aug 9 01:00:41 PDT 2003 | 398 | Thu 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> |
317 | Last modified by Diego Nehab on <br> | 317 | Last modified by Diego Nehab on <br> |
318 | Sat Aug 9 01:00:41 PDT 2003 | 318 | Thu 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. |