### Files

diff -up luasocket-2.0.2/doc/dns.html.21 luasocket-2.0.2/doc/dns.html
--- luasocket-2.0.2/doc/dns.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/dns.html	2013-05-10 13:49:50.353679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -39,12 +39,16 @@
<h2 id=dns>DNS</h2>

<p>
-Name resolution functions return <em>all</em> information obtained from the
-resolver in a table of the form:
+IPv4 name resolution functions
+<a href=#toip><tt>dns.toip</tt></a>
+and
+<a href=#tohostname><tt>dns.tohostname</tt></a>
+return <em>all</em> information obtained from
+the resolver in a table of the form:
</p>

<blockquote><tt>
-resolved = {<br>
+resolved4 = {<br>
&nbsp;&nbsp;name = <i>canonic-name</i>,<br>
&nbsp;&nbsp;alias = <i>alias-list</i>,<br>
@@ -55,6 +59,53 @@ resolved = {<br>
Note that the <tt>alias</tt> list can be empty.
</p>

+<p>
+The more general name resolution function
+supports both IPv6 and IPv4,
+returns <em>all</em> information obtained from
+the resolver in a table of the form:
+</p>
+
+<blockquote><tt>
+resolved6 = {<br>
+&nbsp;&nbsp;[1] = {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;family = <i>family-name-1</i>,<br>
+&nbsp;&nbsp;},<br>
+&nbsp;&nbsp;...<br>
+&nbsp;&nbsp;[n] = {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;family = <i>family-name-n</i>,<br>
+&nbsp;&nbsp;}<br>
+}
+</tt> </blockquote>
+
+<p>
+Here, <tt>family</tt> contains the string <tt>"inet"</tt> for IPv4
+</p>
+
+
+</p>
+
+<p class=description>
+Converts from host name to address.
+</p>
+
+<p class=parameters>
+</p>
+
+<p class=return>
+The function returns a table with  all  information returned  by
+the  resolver.  In  case of error, the function returns <b><tt>nil</tt></b>
+followed by an error message.
+</p>
+
<!-- gethostname ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=gethostname>
</p>

<p class=description>
-Converts from IP address to host name.
+Converts from IPv4 address to host name.
</p>

<p class=parameters>
</p>

<p class=description>
-Converts from host name to IP address.
+Converts from host name to IPv4 address.
</p>

<p class=parameters>
@@ -113,8 +164,8 @@ message.
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/ftp.html.21 luasocket-2.0.2/doc/ftp.html
--- luasocket-2.0.2/doc/ftp.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/ftp.html	2013-05-10 13:49:50.353679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -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>
@@ -270,8 +270,8 @@ f, e = ftp.put{
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/http.html.21 luasocket-2.0.2/doc/http.html
--- luasocket-2.0.2/doc/http.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/http.html	2013-05-10 13:49:50.354679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -36,7 +36,7 @@

<!-- http +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<h2 id=http>HTTP</h2>
+<h2 id="http">HTTP</h2>

<p>
HTTP (Hyper Text  Transfer Protocol) is the protocol  used to exchange
@@ -45,8 +45,7 @@ namespace offers  full support for the c
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>

@@ -97,8 +95,9 @@ headers = {<br>
</blockquote>

<p>
-Field names are case insensitive (as  specified by the standard) and all
-functions  work with  lowercase field names.
+Field names are case insensitive (as specified by the standard) and all
+functions work with lowercase field names (but see
Field values are left unmodified.
</p>

@@ -119,9 +118,10 @@ the HTTP module:
<li> <tt>USERAGENT</tt>: default user agent reported to server.
</ul>

+
<!-- http.request ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=request>
+<p class=name id="request">
http.<b>request(</b>url [, body]<b>)</b><br>
http.<b>request{</b><br>
&nbsp;&nbsp;url = <i>string</i>,<br>
@@ -199,8 +199,7 @@ it usually returns a message body (a web
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>
@@ -259,7 +258,7 @@ r, c, h = http.request {
-- }
</pre>

-<p class=note id=post>
+<p class=note id="post">
Note: When sending a POST request, simple interface adds a
"<tt>Content-type: application/x-www-form-urlencoded</tt>"
header to the request. This is the type used by
@@ -267,7 +266,7 @@ HTML forms. If you need another type, us
interface.
</p>

-<p class=note id=authentication>
+<p class=note id="authentication">
Note: Some URLs are protected by their
some  sort of  authentication along  with the  request or  it will  deny
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 +303,7 @@ b, c, h = http.request("http://fulano:si
-- 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>

@@ -314,8 +313,8 @@ r, c = http.request {
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/index.html.21 luasocket-2.0.2/doc/index.html
--- luasocket-2.0.2/doc/index.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/index.html	2013-05-10 13:49:50.354679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -78,8 +78,8 @@ LuaSocket.
</p>

<p>
-Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a>
+Author: <A href="http://www.impa.br/~diego">Diego Nehab</a>
</p>

@@ -87,25 +87,18 @@ Author: <A href="http://www.cs.princeton

<p>
-compatible with  Lua&nbsp;5.1, and has
+It is compatible with  Lua&nbsp;5.1 and 5.2, and has
been tested on Windows&nbsp;XP, Linux, and Mac OS X. Chances
are it works well on most UNIX distributions and Windows flavors.
</p>

<p>
-<a href=http://luaforge.net/projects/luasocket/>LuaSocket
-project page</a> at LuaForge.
-Besides the full C and Lua source code for the library, the distribution
-contains several examples, this user's manual and basic test procedures.
-</p>
-
-<p>
-Danilo Tuler is maintaining Win32 binaries for LuaSocket, which are also
-available from LuaForge.  These are compatible with the
-<a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a>,
-also available from LuaForge.
+project page</a> at GitHub. Besides the full C and Lua source code
+for the library, the distribution contains several examples,
+this user's manual and basic test procedures.
</p>

<p> Take a look at the <a
@@ -118,14 +111,13 @@ manual to find out how to properly insta
<h2 id=thanks>Special thanks</h2>

<p>
-Throughout LuaSocket's history, many people gave suggestions that helped
-improve it. For that, I thank the Lua community.
-Special thanks go to
-David Burgess, who has helped push the library to a new level of quality and
-from whom I have learned a lot of stuff that doesn't show up in RFCs.
-Special thanks also to Carlos Cassino, who played a big part in the
-extensible design seen in the C core of LuaSocket 2.0. Mike Pall
-has been helping a lot too! Thanks to you all!
+This marks the first release of LuaSocket that
+wholeheartedly embraces the open-source development
+philosophy. After a long hiatus, Matthew Wild finally
+convinced me it was time for a release including IPv6
+and Lua 5.2 support. Special thanks to Sam Roberts, Florian
+Zeitz, and Paul Aurich, Liam Devine, and everybody else that
+has helped bring this library back to life.
</p>

<!-- whatsnew +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -133,44 +125,30 @@ has been helping a lot too! Thanks to yo
<h2 id=new>What's New</h2>

<p>
-2.0.2 is just a bug-fix/update release.
+Main changes for LuaSocket&nbsp;2.1-rc1 are IPv6 support
+and Lua&nbsp;5.2 compatibility.
</p>

<ul>
-<li> Improved: http.request() now supports deprecated
-HTTP/0.9 servers (Florian Berger);
-<li> Fixed: could return "timedout" instead of "timeout" (Leo Leo);
-<li> Fixed: crash when reading '*a' on closed socket (Paul Ducklin);
-<li> Fixed: return values are consistent when reading from closed sockets;
-<li> Fixed: case sensitivity in headers of multipart
-messages in smtp.message() (Graham Henstridge);
-<li> Fixed a couple instances of error() being called instead of
-base.error(). These would cause an error when an error was
-reported :)  (Ketmar Dark);
-<li> Fixed: test script now uses pairs() iterator instead
-of the old Lua syntax (Robert Dodier).
-</ul>
-
-<p>
-2.0.1 is just a bug-fix/update release.
-</p>
-
+<li> Added: Compatible with Lua&nbsp;5.2 (using <tt>LUA_COMPAT_MODULE</tt>);
<ul>
-<li> Updated: now using <tt>compat-5.1r5</tt>;
-<li> Improved: <tt>http.request</tt> is more robust to
-<li> Improved: the simple <tt>http.request</tt> interface sends a
-"<tt>Content-type: application/x-www-form-urlencoded</tt>"
-<li> Improved: <tt>http.request</tt> is robust to evil
-servers that send inappropriate 100-continue messages
-(David Burgess);
-<li> Fixed: <tt>http.request</tt> was using the old host header during
-redirects (Florian Berger);
-<li> Fixed: sample <tt>unix.c</tt> had fallen through the
-cracks during development (Matthew Percival);
-<li> Fixed: error code was not being propagated correctly in
-ftp.lua (David Burgess).
+<li> <tt>Socket.connect</tt> and <tt>socket.bind</tt> support IPv6 addresses;
+<li> <tt>Getpeername</tt> and <tt>getsockname</tt> support
+IPv6 addresses, and return the socket family as a third value;
+<li> URL module updated to support IPv6 host names;
+<li> New <tt>socket.tcp6</tt> and <tt>socket.udp6</tt> functions;
+</ul>
+<li> Fixed: <tt>url.unescape</tt> was returning additional values;
+<li> Fixed: <tt>mime.qp</tt>, <tt>mime.unqp</tt>,
+    <tt>mime.b64</tt>, and <tt>mime.unb64</tt> could
+    mistaking their own stack slots for functions arguments;
+<li> Fixed: Receiving zero-length datagram is now possible;
+<li> Improved: Hidden all internal library symbols;
+<li> Improved: Better error messages;
+<li> Improved: Better documentation of socket options.
</ul>

<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -179,7 +157,7 @@ ftp.lua (David Burgess).

<p>
-href="http://www.cs.princeton.edu/~diego/professional/luasocket/old">
+href="http://www.impa.br/~diego/software/luasocket/old">
here</a>. Although these  versions are  no longer  supported, they  are
still available for those that have compatibility issues.
</p>
@@ -190,7 +168,7 @@ still available for those that have comp
<hr>
<center>
<p class=bar>
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -198,7 +176,7 @@ still available for those that have comp
<p>
<small>
-Wed Oct 3 02:07:59 BRT 2007
+Mon Apr 16 21:58:56 HKT 2012
</small>
</p>
</center>
diff -up luasocket-2.0.2/doc/installation.html.21 luasocket-2.0.2/doc/installation.html
--- luasocket-2.0.2/doc/installation.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/installation.html	2013-05-10 13:49:50.354679160 -0400
@@ -25,8 +25,8 @@ Installation">
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -39,24 +39,16 @@ Installation">

<h2>Installation</h2>

-<p> LuaSocket 2.0.2 uses the new package system for Lua 5.1.
-All Lua library developers are encouraged to update their libraries so that
-all libraries can coexist peacefully and users can benefit from the
-standardization and flexibility of the standard.
-</p>
-
-<p>
-Those stuck with Lua 5.0 will need the
-<a href=http://www.keplerproject.org/compat/>compat-5.1</a>
-module. It is maintained by
-<a href=http://www.keplerproject.org/>The Kepler
-Project</a>'s team, and implements the Lua 5.1 package proposal
-on top of Lua 5.0. </p>
-
-<p> Here we will only describe the standard distribution.
-If the standard doesn't meet your needs, we refer you to the
-Lua discussion list, where any question about the package
+<p> LuaSocket 2.1-rc still uses Lua&nbsp;5.1's package
+Lua&nbsp;5.2 should leave the default
+<tt>LUA_COMPAT_MODULE</tt> defined when compiling their Lua
+distribution for compatibility with LuaSocket. </p>
+
+<p> Here we describe the standard distribution.  If the
+standard doesn't meet your needs, we refer you to the Lua
+discussion list, where any question about the package scheme

<h3>Directory structure</h3>

@@ -64,14 +56,19 @@ scheme will likely already have been ans
directories, one for system dependent files, and another for system
independent files. Let's call these directories <tt>&lt;CDIR&gt;</tt>
and <tt>&lt;LDIR&gt;</tt>, respectively.
-For instance, in my laptop, I use '<tt>/usr/local/lib/lua/5.0</tt>' for
-<tt>&lt;CDIR&gt;</tt> and '<tt>/usr/local/share/lua/5.0</tt>' for
-<tt>&lt;LDIR&gt;</tt>. On Windows, sometimes only one directory is used, say
-'<tt>c:\program files\lua\5.0</tt>'. Here is the standard LuaSocket
+For example, in my laptp, Lua&nbsp;5.1 is configured to
+use '<tt>/usr/local/lib/lua/5.1</tt>' for
+<tt>&lt;CDIR&gt;</tt> and '<tt>/usr/local/share/lua/5.1</tt>' for
+<tt>&lt;LDIR&gt;</tt>. On Windows, <tt>&lt;CDIR&gt;</tt>
+usually points to the directory where the Lua executable is
+found, and <tt>&lt;LDIR&gt;</tt> points to a
+<tt>lua/</tt> directory inside <tt>&lt;CDIR&gt;</tt>. (These
+settings can be overridden by environment variables
+<tt>LUA_PATH</tt> and <tt>LUA_CPATH</tt>. See the Lua
+documentation for details.) Here is the standard LuaSocket
distribution directory structure:</p>

<pre class=example>
-&lt;LDIR&gt;/compat-5.1.lua
&lt;LDIR&gt;/ltn12.lua
&lt;LDIR&gt;/socket.lua
&lt;CDIR&gt;/socket/core.dll
@@ -88,33 +85,6 @@ distribution directory structure:</p>
would be replaced by <tt>core.so</tt>.
</p>

-<p> In order for the interpreter to find all LuaSocket components, three
-environment variables need to be set. The first environment variable tells
-the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p>
-
-<pre class=example>
-LUA_INIT=@&lt;LDIR&gt;/compat-5.1.lua
-</pre>
-
-<p>
-This is only need for Lua&nbsp;5.0! Lua&nbsp;5.1 comes with
-the package system built in, of course.
-</p>
-
-<p>
-The other two environment variables instruct the compatibility module to
-look for dynamic libraries and extension modules in the appropriate
-directories and with the appropriate filename extensions.
-</p>
-
-<pre class=example>
-LUA_PATH=&lt;LDIR&gt;/?.lua;?.lua
-LUA_CPATH=&lt;CDIR&gt;/?.dll;?.dll
-</pre>
-
-<p> Again, naturally, on Unix systems the shared library extension would be
-
<h3>Using LuaSocket</h3>

<p> With the above setup, and an interpreter with shared library support,
@@ -122,19 +92,19 @@ it should be easy to use LuaSocket. Just

<pre class=example>
-Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
+Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
&gt; socket = require("socket")
&gt; print(socket._VERSION)
---&gt; LuaSocket 2.0.2
+--&gt; LuaSocket 2.1-rc1
</pre>

<p> Each module loads their dependencies automatically, so you only need to
load the modules you directly depend upon: </p>

<pre class=example>
-Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
+Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
&gt; http = require("socket.http")
-&gt; print(http.request("http://www.cs.princeton.edu/~diego/professional/luasocket"))
+&gt; print(http.request("http://www.impa.br/~diego/software/luasocket"))
--&gt; homepage gets dumped to terminal
</pre>

@@ -144,8 +114,8 @@ Lua 5.1.2  Copyright (C) 1994-2007 Lua.o
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -153,7 +123,7 @@ Lua 5.1.2  Copyright (C) 1994-2007 Lua.o
<p>
<small>
-Thu Apr 20 00:25:30 EDT 2006
+Mon Apr 16 21:01:42 HKT 2012
</small>
</p>
</center>
diff -up luasocket-2.0.2/doc/introduction.html.21 luasocket-2.0.2/doc/introduction.html
--- luasocket-2.0.2/doc/introduction.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/introduction.html	2013-05-10 13:49:50.354679160 -0400
@@ -25,8 +25,8 @@ Library, Support">
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -314,8 +314,8 @@ and many others are covered by the <a hr
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/ltn12.html.21 luasocket-2.0.2/doc/ltn12.html
--- luasocket-2.0.2/doc/ltn12.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/ltn12.html	2013-05-10 13:49:50.354679160 -0400
@@ -25,8 +25,8 @@ Pump, Support, Library">
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -411,8 +411,8 @@ Creates and returns a source that produc
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/mime.html.21 luasocket-2.0.2/doc/mime.html
--- luasocket-2.0.2/doc/mime.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/mime.html	2013-05-10 13:49:50.354679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -44,11 +44,11 @@ content transfer encodings, such as Base
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>
@@ -457,8 +457,8 @@ marker.
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/reference.html.21 luasocket-2.0.2/doc/reference.html
--- luasocket-2.0.2/doc/reference.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/reference.html	2013-05-10 13:49:50.354679160 -0400
@@ -25,8 +25,8 @@ Support, Manual">
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -42,9 +42,10 @@ Support, Manual">
<blockquote>
<a href="dns.html">DNS (in socket)</a>
<blockquote>
-<a href="dns.html#toip">toip</a>,
+<a href="dns.html#gethostname">gethostname</a>,
<a href="dns.html#tohostname">tohostname</a>,
-<a href="dns.html#gethostname">gethostname</a>.
+<a href="dns.html#toip">toip</a>.
</blockquote>
</blockquote>

@@ -108,9 +109,9 @@ Support, Manual">
<a href="mime.html">MIME</a>
<blockquote>
<a href="mime.html#high">high-level</a>:
-<a href="mime.html#normalize">normalize</a>,
<a href="mime.html#decode">decode</a>,
<a href="mime.html#encode">encode</a>,
+<a href="mime.html#normalize">normalize</a>,
<a href="mime.html#stuff">stuff</a>,
<a href="mime.html#wrap">wrap</a>.
</blockquote>
@@ -120,10 +121,10 @@ Support, Manual">
<a href="mime.html#dot">dot</a>,
<a href="mime.html#eol">eol</a>,
<a href="mime.html#qp">qp</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>,
+<a href="mime.html#wrp">wrp</a>.
</blockquote>
</blockquote>

@@ -142,19 +143,27 @@ Support, Manual">
<blockquote>
<a href="socket.html">Socket</a>
<blockquote>
+<a href="socket.html#bind">bind</a>,
+<a href="socket.html#connect">connect</a>,
+<a href="socket.html#connect">connect4</a>,
+<a href="socket.html#connect">connect6</a>,
<a href="socket.html#debug">_DEBUG</a>,
<a href="dns.html#dns">dns</a>,
<a href="socket.html#gettime">gettime</a>,
<a href="socket.html#newtry">newtry</a>,
<a href="socket.html#protect">protect</a>,
<a href="socket.html#select">select</a>,
<a href="socket.html#sink">sink</a>,
<a href="socket.html#skip">skip</a>,
<a href="socket.html#sleep">sleep</a>,
+<a href="socket.html#setsize">_SETSIZE</a>,
<a href="socket.html#source">source</a>,
-<a href="tcp.html#tcp">tcp</a>,
+<a href="tcp.html#socket.tcp">tcp</a>,
+<a href="tcp.html#socket.tcp6">tcp6</a>,
<a href="socket.html#try">try</a>,
-<a href="udp.html#udp">udp</a>,
+<a href="udp.html#socket.udp">udp</a>,
+<a href="udp.html#socket.udp6">udp6</a>,
<a href="socket.html#version">_VERSION</a>.
</blockquote>
</blockquote>
@@ -168,11 +177,16 @@ Support, Manual">
<a href="tcp.html#bind">bind</a>,
<a href="tcp.html#close">close</a>,
<a href="tcp.html#connect">connect</a>,
+<a href="tcp.html#dirty">dirty</a>,
+<a href="tcp.html#getfd">getfd</a>,
+<a href="tcp.html#getoption">getoption</a>,
<a href="tcp.html#getpeername">getpeername</a>,
<a href="tcp.html#getsockname">getsockname</a>,
<a href="tcp.html#getstats">getstats</a>,
+<a href="tcp.html#listen">listen</a>,
<a href="tcp.html#send">send</a>,
+<a href="tcp.html#setfd">setfd</a>,
<a href="tcp.html#setoption">setoption</a>,
<a href="tcp.html#setstats">setstats</a>,
<a href="tcp.html#settimeout">settimeout</a>,
@@ -186,6 +200,7 @@ Support, Manual">
<a href="udp.html">UDP (in socket)</a>
<blockquote>
<a href="udp.html#close">close</a>,
+<a href="udp.html#getoption">getoption</a>,
<a href="udp.html#getpeername">getpeername</a>,
<a href="udp.html#getsockname">getsockname</a>,
@@ -220,8 +235,8 @@ Support, Manual">
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/smtp.html.21 luasocket-2.0.2/doc/smtp.html
--- luasocket-2.0.2/doc/smtp.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/smtp.html	2013-05-10 13:49:50.355679160 -0400
@@ -25,8 +25,8 @@ Library, Support">
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -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
@@ -91,8 +90,9 @@ headers = {<br>
</blockquote>

<p>
-Field names are case insensitive (as  specified by the standard) and all
-functions  work with  lowercase field names.
+Field names are case insensitive (as specified by the standard) and all
+functions work with lowercase field names (but see
Field values are left unmodified.
</p>

@@ -196,7 +196,7 @@ part of the message and will not be sent
</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 +236,9 @@ exactly what you <em>don't</em> want to

<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>
@@ -398,8 +398,8 @@ r, e = smtp.send{
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/socket.html.21 luasocket-2.0.2/doc/socket.html
--- luasocket-2.0.2/doc/socket.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/socket.html	2013-05-10 13:49:50.355679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -73,14 +73,19 @@ set to <tt><b>true</b></tt>.
<!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=connect>
</p>

<p class=description>
This function is a shortcut that creates and returns a TCP client object
-connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally,
+connected to a remote <tt>address</tt> at a given <tt>port</tt>. Optionally,
the user can also specify the local address and port to bind
+(<tt>locaddr</tt> and <tt>locport</tt>), or restrict the socket family
+to "<tt>inet</tt>" or "<tt>inet6</tt>".
+Without specifying <tt>family</tt> to <tt>connect</tt>, whether a tcp or tcp6
+connection is created depends on your system configuration. Two variations
+of connect are defined as simple helper functions that restrict the
+<tt>family</tt>, <tt>socket.connect4</tt> and <tt>socket.connect6</tt>.
</p>

<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -94,6 +99,47 @@ This constant is set to <tt><b>true</b><
with debug support.
</p>

+<!-- get time +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id=gettime>
+socket.<b>gettime()</b>
+</p>
+
+<p class=description>
+Returns the time in seconds, relative to the origin of the
+universe. You should subtract the values returned by this function
+to get meaningful values.
+</p>
+
+<pre class=example>
+t = socket.gettime()
+-- do stuff
+print(socket.gettime() - t .. " seconds elapsed")
+</pre>
+
+
+
+is used by the HTTP and SMTP modules to translate from
+lowercase field names back into their canonic
+capitalization. When a lowercase field name exists as a key
+in this table, the associated value is substituted in
+whenever the field name is sent out.
+</p>
+
+<p>
+You can obtain the <tt>headers</tt> namespace if case run-time
+modifications are required by running:
+</p>
+
+<pre class=example>
+</pre>
+
<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=newtry>
@@ -200,6 +246,15 @@ changed status.
</p>

<p class=note>
+<b>Note: </b>: <tt>select</tt> can monitor a limited number
+of sockets, as defined by the constant <tt>socket._SETSIZE</tt>. This
+number may be as high as 1024 or as low as 64 by default,
+depending on the system. It is usually possible to change this
+at compile time. Invoking <tt>select</tt> with a larger
+number of sockets will raise an error.
+</p>
+
+<p class=note>
<b>Important note</b>: a known bug in WinSock causes <tt>select</tt> to fail
on non-blocking TCP sockets. The function may return a socket as
writable even though the socket is <em>not</em> ready for sending.
@@ -217,6 +272,10 @@ method or <tt>accept</tt> might block fo
it to <tt>select</tt>, it will be ignored.
</p>

+<p class=note>
+<b>Using select with non-socket objects</b>: Any object that implements <tt>getfd</tt> and <tt>dirty</tt> can be used with <tt>select</tt>, allowing objects from other libraries to be used within a <tt>socket.select</tt> driven loop.
+</p>
+
<!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=sink>
@@ -288,7 +347,8 @@ Freezes the program execution during a g
</p>

<p class=parameters>
-<tt>Time</tt> is the number of seconds to sleep for.
+<tt>Time</tt> is the number of seconds to sleep for. If
+<tt>time</tt> is negative, the function returns immediately.
</p>

<!-- source +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -323,24 +383,17 @@ side closes the connection.
The function returns a source with the appropriate behavior.
</p>

-<!-- time ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=gettime>
-socket.<b>gettime()</b>
+<p class=name id=setsize>
+socket.<b>_SETSIZE</b>
</p>

<p class=description>
-Returns the time in seconds, relative to the origin of the
-universe. You should subtract the values returned by this function
-to get meaningful values.
+The maximum number of sockets that the <a
+href=#select><tt>select</tt></a> function can handle.
</p>

-<pre class=example>
-t = socket.gettime()
--- do stuff
-print(socket.gettime() - t .. " seconds elapsed")
-</pre>
-
<!-- try ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=try>
@@ -385,8 +438,8 @@ This constant has a string describing th
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/tcp.html.21 luasocket-2.0.2/doc/tcp.html
--- luasocket-2.0.2/doc/tcp.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/tcp.html	2013-05-10 13:49:50.355679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -36,16 +36,16 @@

<!-- tcp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<h2 id=tcp>TCP</h2>
+<h2 id="tcp">TCP</h2>

<!-- socket.tcp +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=socket.tcp>
+<p class=name id="socket.tcp">
socket.<b>tcp()</b>
</p>

<p class=description>
-Creates and returns a TCP master object. A master object can
+Creates and returns an IPv4 TCP master object. A master object can
be transformed into a server object with the method
<a href=#listen><tt>listen</tt></a> (after a call to <a
href=#bind><tt>bind</tt></a>) or into a client object with
@@ -58,9 +58,34 @@ In case of success, a new master object
<b><tt>nil</tt></b> is returned, followed by an error message.
</p>

+<!-- socket.tcp6 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="socket.tcp6">
+socket.<b>tcp6()</b>
+</p>
+
+<p class=description>
+Creates and returns an IPv6 TCP master object. A master object can
+be transformed into a server object with the method
+<a href=#listen><tt>listen</tt></a> (after a call to <a
+href=#bind><tt>bind</tt></a>) or into a client object with
+the method <a href=#connect><tt>connect</tt></a>. The only other
+method supported by a master object is the
+<a href=#close><tt>close</tt></a> method.</p>
+
+<p class=return>
+In case of success, a new master object is returned. In case of error,
+<b><tt>nil</tt></b> is returned, followed by an error message.
+</p>
+
+<p class=note>
+Note: The TCP object returned will have the option
+"<tt>ipv6-v6only</tt>" set to <tt><b>true</b></tt>.
+</p>
+
<!-- accept +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=accept>
+<p class=name id="accept">
server:<b>accept()</b>
</p>

@@ -87,7 +112,7 @@ might block until <em>another</em> clien

<!-- bind +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=bind>
+<p class=name id="bind">
</p>

@@ -100,7 +125,9 @@ local host.
<tt>Port</tt> must be an integer number in the range [0..64K).
is '<tt>*</tt>', the system binds to all local interfaces
-using the <tt>INADDR_ANY</tt> constant. If <tt>port</tt> is 0, the system automatically
+If <tt>port</tt> is 0, the system automatically
chooses an ephemeral port.
</p>

@@ -116,7 +143,7 @@ is available and is a shortcut for the c

<!-- close ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=close>
+<p class=name id="close">
master:<b>close()</b><br>
client:<b>close()</b><br>
server:<b>close()</b>
@@ -139,7 +166,7 @@ automatically closed before destruction,

<!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=connect>
+<p class=name id="connect">
</p>

@@ -180,9 +207,18 @@ href=socket.html#select><tt>socket.selec
established.
</p>

+<p class=note>
+Note: Starting with LuaSocket 2.1, the host name resolution
+depends on whether the socket was created by <a
+href=#socket.tcp><tt>socket.tcp</tt></a> or <a
+the appropriate family are tried in succession until the
+first success or until the last failure.
+</p>
+
<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=getpeername>
+<p class=name id="getpeername">
client:<b>getpeername()</b>
</p>

@@ -191,8 +227,9 @@ Returns information about the remote sid
</p>

<p class=return>
-Returns a string with the IP address of the peer, followed by the
-port number that peer is using for the connection.
+Returns a string with the IP address of the peer, the
+port number that peer is using for the connection,
+and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>").
In case of error, the method returns <b><tt>nil</tt></b>.
</p>

@@ -202,7 +239,7 @@ Note: It makes no sense to call this met

<!-- getsockname ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=getsockname>
+<p class=name id="getsockname">
master:<b>getsockname()</b><br>
client:<b>getsockname()</b><br>
server:<b>getsockname()</b>
@@ -213,13 +250,15 @@ Returns the local address information as
</p>

<p class=return>
-The method returns a string with local IP address and a number with
-the port. In case of error, the method returns <b><tt>nil</tt></b>.
+The method returns a string with local IP address, a number with
+the local port,
+and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>").
+In case of error, the method returns <b><tt>nil</tt></b>.
</p>

<!-- getstats +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=getstats>
+<p class=name id="getstats">
master:<b>getstats()</b><br>
client:<b>getstats()</b><br>
server:<b>getstats()</b><br>
@@ -237,7 +276,7 @@ and the age of the socket object in seco

<!-- listen ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=listen>
+<p class=name id="listen">
master:<b>listen(</b>backlog<b>)</b>
</p>

@@ -265,7 +304,7 @@ method returns <b><tt>nil</tt></b> follo

</p>

@@ -297,12 +336,12 @@ of any received data before return.

<p class=return>
If successful, the method returns the received pattern. In case of error,
-the method returns <tt><b>nil</b></tt> followed by an error message which
-can be the string '<tt>closed</tt>'  in   case  the  connection  was
+the method returns <tt><b>nil</b></tt> followed by an error
+message, followed by a (possibly empty) string containing
+the partial that was received. The error message can be
+the string '<tt>closed</tt>'  in   case  the  connection  was
closed  before  the transmission  was completed  or  the string
'<tt>timeout</tt>' in  case there was a timeout during  the operation.
-Also, after the error message, the function returns the partial result of
-the transmission.
</p>

<p class=note>
@@ -316,7 +355,7 @@ too.

<!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=send>
+<p class=name id="send">
client:<b>send(</b>data [, i [, j]]<b>)</b>
</p>

@@ -354,7 +393,7 @@ instead of calling the method several ti

<!-- setoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=setoption>
+<p class=name id="setoption">
client:<b>setoption(</b>option [, value]<b>)</b><br>
server:<b>setoption(</b>option [, value]<b>)</b>
</p>
@@ -392,21 +431,53 @@ used in validating addresses supplied in
<a href=#bind><tt>bind</tt></a> should allow reuse of local addresses;

<li> '<tt>tcp-nodelay</tt>': Setting this option to <tt>true</tt>
-disables the Nagle's algorithm for the connection.
+disables the Nagle's algorithm for the connection;

+<li> '<tt>ipv6-v6only</tt>':
+Setting this option to <tt>true</tt> restricts an <tt>inet6</tt> socket to
+sending and receiving only IPv6 packets.
</ul>

<p class=return>
-The method returns 1 in case of success, or <b><tt>nil</tt></b> otherwise.
+The method returns 1 in case of success, or <b><tt>nil</tt></b>
+followed by an error message otherwise.
</p>

<p class=note>
Note: The descriptions above come from the man pages.
</p>

+<!-- getoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="getoption">
+client:<b>getoption(</b>option)</b><br>
+server:<b>getoption(</b>option)</b>
+</p>
+
+<p class=description>
+Gets options for the TCP object.
+See <a href=#setoption><tt>setoption</tt></a> for description of the
+option names and values.
+</p>
+
+<p class=parameters>
+<tt>Option</tt> is a string with the option name.
+<ul>
+
+<li> '<tt>keepalive</tt>'
+<li> '<tt>linger</tt>'
+<li> '<tt>tcp-nodelay</tt>'
+</ul>
+
+<p class=return>
+The method returns the option <tt>value</tt> in case of success, or
+<b><tt>nil</tt></b> followed by an error message otherwise.
+</p>
+
<!-- setstats +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=setstats>
+<p class=name id="setstats">
@@ -429,7 +500,7 @@ The method returns 1 in case of success

<!-- settimeout +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=settimeout>
+<p class=name id="settimeout">
master:<b>settimeout(</b>value [, mode]<b>)</b><br>
client:<b>settimeout(</b>value [, mode]<b>)</b><br>
server:<b>settimeout(</b>value [, mode]<b>)</b>
@@ -486,7 +557,7 @@ contained verbs making their imperative

<!-- shutdown +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=shutdown>
+<p class=name id="shutdown">
client:<b>shutdown(</b>mode<b>)</b><br>
</p>

@@ -508,14 +579,74 @@ This is the default mode;
This function returns 1.
</p>

+<!-- dirty +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="dirty">
+master:<b>dirty()</b><br>
+client:<b>dirty()</b><br>
+server:<b>dirty()</b>
+</p>
+
+<p class=description>
+</p>
+
+<p class=return>
+Returns <tt>true</tt> if there is any data in the read buffer, <tt>false</tt> otherwise.
+</p>
+
+<p class=note>
+Note: <b>This is an internal method, any use is unlikely to be portable.</b>
+</p>
+
+<!-- getfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="getfd">
+master:<b>getfd()</b><br>
+client:<b>getfd()</b><br>
+server:<b>getfd()</b>
+</p>
+
+<p class=description>
+Returns the underling socket descriptor or handle associated to the object.
+</p>
+
+<p class=return>
+The descriptor or handle. In case the object has been closed, the return will be -1.
+</p>
+
+<p class=note>
+Note: <b>This is an internal method, any use is unlikely to be portable.</b>
+</p>
+
+<!-- setfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="setfd">
+master:<b>setfd(</b>fd<b>)</b><br>
+client:<b>setfd(</b>fd<b>)</b><br>
+server:<b>setfd(</b>fd<b>)</b>
+</p>
+
+<p class=description>
+Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made.
+</p>
+
+<p class=return>
+No return value.
+</p>
+
+<p class=note>
+Note: <b>This is an internal method, any use is unlikely to be portable.</b>
+</p>
+
<!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<div class=footer>
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/udp.html.21 luasocket-2.0.2/doc/udp.html
--- luasocket-2.0.2/doc/udp.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/udp.html	2013-05-10 13:49:50.355679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -37,7 +37,7 @@

<!-- udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<h2 id=udp>UDP</h2>
+<h2 id="udp">UDP</h2>

<!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

@@ -46,10 +46,12 @@ socket.<b>udp()</b>
</p>

<p class="description">
-Creates and returns an unconnected UDP object. Unconnected objects support the
+Creates and returns an unconnected IPv4 UDP object.
+Unconnected objects support the
<a href="#sendto"><tt>sendto</tt></a>,
+<a href="#getoption"><tt>getoption</tt></a>,
<a href="#getsockname"><tt>getsockname</tt></a>,
<a href="#setoption"><tt>setoption</tt></a>,
<a href="#settimeout"><tt>settimeout</tt></a>,
@@ -66,6 +68,44 @@ returned. In case of error, <b><tt>nil</
an error message.
</p>

+<!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class="name" id="socket.udp6">
+socket.<b>udp6()</b>
+</p>
+
+<p class="description">
+Creates and returns an unconnected IPv6 UDP object.
+Unconnected objects support the
+<a href="#sendto"><tt>sendto</tt></a>,
+<a href="#getoption"><tt>getoption</tt></a>,
+<a href="#getsockname"><tt>getsockname</tt></a>,
+<a href="#setoption"><tt>setoption</tt></a>,
+<a href="#settimeout"><tt>settimeout</tt></a>,
+<a href="#setpeername"><tt>setpeername</tt></a>,
+<a href="#setsockname"><tt>setsockname</tt></a>, and
+<a href="#close"><tt>close</tt></a>.
+The <a href="#setpeername"><tt>setpeername</tt></a>
+is used to connect the object.
+</p>
+
+<p class="return">
+In case of success, a new unconnected UDP object
+returned. In case of error, <b><tt>nil</tt></b> is returned, followed by
+an error message.
+</p>
+
+<p class=note>
+Note: The TCP object returned will have the option
+"<tt>ipv6-v6only</tt>" set to <tt><b>true</b></tt>.
+</p>
+
+
+
+<!-- close +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
<!-- close +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class="name" id="close">
@@ -100,8 +140,12 @@ Retrieves information about the peer
associated with a connected UDP object.
</p>

-<p class="return">
-Returns the IP address and port number of the peer.
+
+<p class=return>
+Returns a string with the IP address of the peer, the
+port number that peer is using for the connection,
+and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>").
+In case of error, the method returns <b><tt>nil</tt></b>.
</p>

<p class="note">
@@ -119,10 +163,12 @@ unconnected:<b>getsockname()</b>
Returns the local address information associated to the object.
</p>

-<p class="return">
-The method returns a string with local IP
-address and a number with the port. In case of error, the method
-returns <b><tt>nil</tt></b>.
+
+<p class=return>
+The method returns a string with local IP address, a number with
+the local port,
+and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>").
+In case of error, the method returns <b><tt>nil</tt></b>.
</p>

<p class="note">
@@ -177,6 +223,40 @@ address and port as extra return values
efficient).
</p>

+<!-- getoption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class="name" id="getoption">
+connected:<b>getoption()</b><br>
+unconnected:<b>getoption()</b>
+</p>
+
+<p class="description">
+Gets an option value from the UDP object.
+See <a href=#setoption><tt>setoption</tt></a> for
+description of the option names and values.
+</p>
+
+<p class="parameters"><tt>Option</tt> is a string with the option name.
+<ul>
+<li> '<tt>dontroute</tt>'
+<li> '<tt>reuseport</tt>'
+<li> '<tt>ip-multicast-loop</tt>'
+<li> '<tt>ipv6-v6only</tt>'
+<li> '<tt>ip-multicast-if</tt>'
+<li> '<tt>ip-multicast-ttl</tt>'
+<li> '<tt>ip-drop-membership</tt>'
+</ul>
+</p>
+
+<p class=return>
+The method returns the option <tt>value</tt> in case of
+success, or
+<b><tt>nil</tt></b> followed by an error message otherwise.
+</p>
+
<!-- send ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class="name" id="send">
@@ -284,6 +364,15 @@ is recommended when the same peer is use
and can result in up to 30% performance gains.
</p>

+<p class=note>
+Note: Starting with LuaSocket 2.1, the host name resolution
+depends on whether the socket was created by <a
+href=#socket.udp><tt>socket.udp</tt></a> or <a
+the appropriate family are tried in succession until the
+first success or until the last failure.
+</p>
+
<!-- setsockname +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class="name" id="setsockname">
@@ -332,23 +421,57 @@ only modify an option if you are sure yo
name, and <tt>value</tt> depends on the option being set:
</p>

-<ul>
-<li>'<tt>dontroute</tt>': Setting this option to <tt>true</tt>
-indicates that outgoing messages should bypass the standard routing
-facilities;</li>
-<li>'<tt>broadcast</tt>': Setting this option to <tt>true</tt>
-requests permission to send broadcast datagrams on the
-socket.</li>
-</ul>
+<ul>
+<li> '<tt>dontroute</tt>': Indicates that outgoing
+messages should bypass the standard routing facilities.
+<li> '<tt>broadcast</tt>': Requests permission to send
+<li> '<tt>reuseaddr</tt>': Indicates that the rules used in
+validating addresses supplied in a <tt>bind()</tt> call
+should allow reuse of local addresses.
+<li> '<tt>reuseport</tt>': Allows completely duplicate
+bindings by multiple processes if they all set
+'<tt>reuseport</tt>' before binding the port.
+<li> '<tt>ip-multicast-loop</tt>':
+Specifies whether or not a copy of an outgoing multicast
+datagram is delivered to the sending host as long as it is a
+member of the multicast group.
+<li> '<tt>ipv6-v6only</tt>':
+Specifies whether to restrict <tt>inet6</tt> sockets to
+sending and receiving only IPv6 packets.
+<li> '<tt>ip-multicast-if</tt>':
+Sets the interface over which outgoing multicast datagrams
+are sent.
+<li> '<tt>ip-multicast-ttl</tt>':
+Sets the Time To Live in the IP header for outgoing
+multicast datagrams.
+Joins the multicast group specified.
+<tt>multiaddr</tt> and <tt>interface</tt>, each containing an
+<li> '<tt>ip-drop-membership</tt>': Leaves the multicast
+group specified.
+<tt>multiaddr</tt> and <tt>interface</tt>, each containing an
+</ul>

<p class="return">
The method returns 1 in case of success, or
<b><tt>nil</tt></b> followed by an error message otherwise.
</p>

-<p class="note">
-Note: The descriptions above come from the man
-pages.
+<p class=note>
+Note: The descriptions above come from the man pages.
</p>

<!-- settimeout +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -397,8 +520,8 @@ imperative nature obvious.
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/doc/url.html.21 luasocket-2.0.2/doc/url.html
--- luasocket-2.0.2/doc/url.html.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/doc/url.html	2013-05-10 13:49:50.355679160 -0400
@@ -24,8 +24,8 @@
</td></tr>
</table>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
@@ -36,14 +36,13 @@

<!-- url ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<h2 id=url>URL</h2>
+<h2 id="url">URL</h2>

<p>
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>
@@ -70,7 +69,7 @@ An URL is defined by the following gramm

<!-- absolute +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=absolute>
+<p class=name id="absolute">
url.<b>absolute(</b>base, relative<b>)</b>
</p>

@@ -91,7 +90,7 @@ The function returns a string with the a
<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>

@@ -126,7 +125,7 @@ g;x?y#s  =  http://a/b/c/g;x?y#s

<!-- build ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=build>
+<p class=name id="build">
url.<b>build(</b>parsed_url<b>)</b>
</p>

@@ -147,7 +146,7 @@ The function returns a string with the b

<!-- build_path +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=build_path>
+<p class=name id="build_path">
url.<b>build_path(</b>segments, unsafe<b>)</b>
</p>

@@ -201,7 +200,7 @@ code = url.escape("/#?;")

<!-- parse ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=parse>
+<p class=name id="parse">
url.<b>parse(</b>url, default<b>)</b>
</p>

@@ -266,7 +265,7 @@ parsed_url = url.parse("ftp://root:passw

<!-- parse_path +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

-<p class=name id=parse_path>
+<p class=name id="parse_path">
url.<b>parse_path(</b>path<b>)</b>
</p>

@@ -310,8 +309,8 @@ The function returns the decoded string.
<hr>
<center>
<p class=bar>
-<a href="home.html">home</a> &middot;
+<a href="index.html">home</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
diff -up luasocket-2.0.2/etc/b64.lua.21 luasocket-2.0.2/etc/b64.lua
--- luasocket-2.0.2/etc/b64.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/b64.lua	2013-05-10 13:49:50.355679160 -0400
@@ -2,7 +2,6 @@
-- Little program to convert to and from Base64
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: b64.lua,v 1.8 2004/06/16 04:28:21 diego Exp$
-----------------------------------------------------------------------------
local ltn12 = require("ltn12")
local mime = require("mime")
@@ -3,7 +3,6 @@
-- non-blocking I/O via the dispatcher module.
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $$----------------------------------------------------------------------------- local url = require("socket.url") local dispatch = require("dispatch") @@ -12,7 +11,7 @@ dispatch.TIMEOUT = 10 -- make sure the user knows how to invoke us arg = arg or {} -if table.getn(arg) < 1 then +if #arg < 1 then print("Usage:\n luasocket check-links.lua [-n] {<url>}") exit() end diff -up luasocket-2.0.2/etc/cookie.lua.21 luasocket-2.0.2/etc/cookie.lua --- luasocket-2.0.2/etc/cookie.lua.21 2013-05-10 13:49:50.356679160 -0400 +++ luasocket-2.0.2/etc/cookie.lua 2013-05-10 13:49:50.356679160 -0400 @@ -0,0 +1,88 @@ +local socket = require"socket" +local http = require"socket.http" +local url = require"socket.url" +local ltn12 = require"ltn12" + +local token_class = '[^%c%s%(%)%<%>%@%,%;%:%\\%"%/%[%]%?%=%{%}]' + +local function unquote(t, quoted) + local n = string.match(t, "%(%d+)") + if n then n = tonumber(n) end + if quoted[n] then return quoted[n] + else return t end +end + +local function parse_set_cookie(c, quoted, cookie_table) + c = c .. ";last=last;" + local _, __, n, v, i = string.find(c, "(" .. token_class .. + "+)%s*=%s*(.-)%s*;%s*()") + local cookie = { + name = n, + value = unquote(v, quoted), + attributes = {} + } + while 1 do + _, __, n, v, i = string.find(c, "(" .. token_class .. + "+)%s*=?%s*(.-)%s*;%s*()", i) + if not n or n == "last" then break end + cookie.attributes[#cookie.attributes+1] = { + name = n, + value = unquote(v, quoted) + } + end + cookie_table[#cookie_table+1] = cookie +end + +local function split_set_cookie(s, cookie_table) + cookie_table = cookie_table or {} + -- remove quoted strings from cookie list + local quoted = {} + s = string.gsub(s, '"(.-)"', function(q) + quoted[#quoted+1] = q + return "" .. #quoted + end) + -- add sentinel + s = s .. ",last=" + -- split into individual cookies + i = 1 + while 1 do + local _, __, cookie, next_token + _, __, cookie, i, next_token = string.find(s, "(.-)%s*%,%s*()(" .. + token_class .. "+)%s*=", i) + if not next_token then break end + parse_set_cookie(cookie, quoted, cookie_table) + if next_token == "last" then break end + end + return cookie_table +end + +local function quote(s) + if string.find(s, "[ %,%;]") then return '"' .. s .. '"' + else return s end +end + +local _empty = {} +local function build_cookies(cookies) + s = "" + for i,v in ipairs(cookies or _empty) do + if v.name then + s = s .. v.name + if v.value and v.value ~= "" then + s = s .. '=' .. quote(v.value) + end + end + if v.name and #(v.attributes or _empty) > 0 then s = s .. "; " end + for j,u in ipairs(v.attributes or _empty) do + if u.name then + s = s .. u.name + if u.value and u.value ~= "" then + s = s .. '=' .. quote(u.value) + end + end + if j < #v.attributes then s = s .. "; " end + end + if i < #cookies then s = s .. ", " end + end + return s +end + diff -up luasocket-2.0.2/etc/dict.lua.21 luasocket-2.0.2/etc/dict.lua --- luasocket-2.0.2/etc/dict.lua.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/etc/dict.lua 2013-05-10 13:49:50.356679160 -0400 @@ -2,7 +2,6 @@ -- Little program to download DICT word definitions -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID: Id: dict.lua,v 1.22 2005/11/22 08:33:29 diego Exp  ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- @@ -44,48 +43,48 @@ function metat.__index:check(ok) end function metat.__index:getdef() - local line = socket.try(self.tp:receive()) - local def = {} - while line ~= "." do - table.insert(def, line) - line = socket.try(self.tp:receive()) - end - return table.concat(def, "\n") + local line = socket.try(self.tp:receive()) + local def = {} + while line ~= "." do + table.insert(def, line) + line = socket.try(self.tp:receive()) + end + return table.concat(def, "\n") end function metat.__index:define(database, word) database = database or "!" - socket.try(self.tp:command("DEFINE", database .. " " .. word)) + socket.try(self.tp:command("DEFINE", database .. " " .. word)) local code, count = self:check(150) - local defs = {} - for i = 1, count do - self:check(151) - table.insert(defs, self:getdef()) - end - self:check(250) + local defs = {} + for i = 1, count do + self:check(151) + table.insert(defs, self:getdef()) + end + self:check(250) return defs end function metat.__index:match(database, strat, word) database = database or "!" strat = strat or "." - socket.try(self.tp:command("MATCH", database .." ".. strat .." ".. word)) + socket.try(self.tp:command("MATCH", database .." ".. strat .." ".. word)) self:check(152) - local mat = {} - local line = socket.try(self.tp:receive()) + local mat = {} + local line = socket.try(self.tp:receive()) while line ~= '.' do database, word = socket.skip(2, string.find(line, "(%S+) (.*)")) if not mat[database] then mat[database] = {} end table.insert(mat[database], word) - line = socket.try(self.tp:receive()) - end - self:check(250) + line = socket.try(self.tp:receive()) + end + self:check(250) return mat end function metat.__index:quit() - self.tp:command("QUIT") - return self:check(221) + self.tp:command("QUIT") + return self:check(221) end function metat.__index:close() diff -up luasocket-2.0.2/etc/dispatch.lua.21 luasocket-2.0.2/etc/dispatch.lua --- luasocket-2.0.2/etc/dispatch.lua.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/etc/dispatch.lua 2013-05-10 13:49:50.356679160 -0400 @@ -2,7 +2,6 @@ -- A hacked dispatcher module -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID:$$
-----------------------------------------------------------------------------
local base = _G
local table = require("table")
@@ -51,10 +50,10 @@ function socket.protect(f)
return function(...)
local co = coroutine.create(f)
while true do
-      local results = {coroutine.resume(co, base.unpack(arg))}
+      local results = {coroutine.resume(co, ...)}
local status = table.remove(results, 1)
if not status then
-        if type(results[1]) == 'table' then
+        if base.type(results[1]) == 'table' then
return nil, results[1][1]
else base.error(results[1]) end
end
@@ -77,7 +76,7 @@ local function newset()
insert = function(set, value)
if not reverse[value] then
table.insert(set, value)
-                reverse[value] = table.getn(set)
+                reverse[value] = #set
end
end,
remove = function(set, value)
@@ -105,8 +104,7 @@ local function cowrap(dispatcher, tcp, e
-- don't override explicitly.
local metat = { __index = function(table, key)
table[key] = function(...)
-            arg[1] = tcp
-            return tcp[key](base.unpack(arg))
+            return tcp[key](tcp,select(2,...))
end
return table[key]
end}
diff -up luasocket-2.0.2/etc/eol.lua.21 luasocket-2.0.2/etc/eol.lua
--- luasocket-2.0.2/etc/eol.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/eol.lua	2013-05-10 13:49:50.356679160 -0400
@@ -2,7 +2,6 @@
-- Little program to adjust end of line markers.
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: eol.lua,v 1.8 2005/11/22 08:33:29 diego Exp$
-----------------------------------------------------------------------------
local mime = require("mime")
local ltn12 = require("ltn12")
diff -up luasocket-2.0.2/etc/forward.lua.21 luasocket-2.0.2/etc/forward.lua
--- luasocket-2.0.2/etc/forward.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/forward.lua	2013-05-10 13:49:50.356679160 -0400
@@ -3,7 +3,7 @@ local dispatch = require("dispatch")
local handler = dispatch.newhandler()

-- make sure the user knows how to invoke us
-if table.getn(arg) < 1 then
+if #arg < 1 then
print("Usage")
print("    lua forward.lua <iport:ohost:oport> ...")
os.exit(1)
diff -up luasocket-2.0.2/etc/get.lua.21 luasocket-2.0.2/etc/get.lua
--- luasocket-2.0.2/etc/get.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/get.lua	2013-05-10 13:49:50.356679160 -0400
@@ -2,7 +2,6 @@
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: get.lua,v 1.25 2007/03/12 04:08:40 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
local http = require("socket.http")
@@ -12,53 +11,53 @@ local ltn12 = require("ltn12")

-- formats a number of seconds into human readable form
function nicetime(s)
-	local l = "s"
-	if s > 60 then
-		s = s / 60
-		l = "m"
-		if s > 60 then
-			s = s / 60
-			l = "h"
-			if s > 24 then
-				s = s / 24
-				l = "d" -- hmmm
-			end
-		end
-	end
-	if l == "s" then return string.format("%5.0f%s", s, l)
-	else return string.format("%5.2f%s", s, l) end
+    local l = "s"
+    if s > 60 then
+        s = s / 60
+        l = "m"
+        if s > 60 then
+            s = s / 60
+            l = "h"
+            if s > 24 then
+                s = s / 24
+                l = "d" -- hmmm
+            end
+        end
+    end
+    if l == "s" then return string.format("%5.0f%s", s, l)
+    else return string.format("%5.2f%s", s, l) end
end

-- formats a number of bytes into human readable form
function nicesize(b)
-	local l = "B"
-	if b > 1024 then
-		b = b / 1024
-		l = "KB"
-		if b > 1024 then
-			b = b / 1024
-			l = "MB"
-			if b > 1024 then
-				b = b / 1024
-				l = "GB" -- hmmm
-			end
-		end
-	end
-	return string.format("%7.2f%2s", b, l)
+    local l = "B"
+    if b > 1024 then
+        b = b / 1024
+        l = "KB"
+        if b > 1024 then
+            b = b / 1024
+            l = "MB"
+            if b > 1024 then
+                b = b / 1024
+                l = "GB" -- hmmm
+            end
+        end
+    end
+    return string.format("%7.2f%2s", b, l)
end

local remaining_s = "%s received, %s/s throughput, %2.0f%% done, %s remaining"
local elapsed_s =   "%s received, %s/s throughput, %s elapsed                "
function gauge(got, delta, size)
-	local rate = got / delta
-	if size and size >= 1 then
-		return string.format(remaining_s, nicesize(got),  nicesize(rate),
-			100*got/size, nicetime((size-got)/rate))
-	else
-		return string.format(elapsed_s, nicesize(got),
-			nicesize(rate), nicetime(delta))
-	end
+    local rate = got / delta
+    if size and size >= 1 then
+        return string.format(remaining_s, nicesize(got),  nicesize(rate),
+            100*got/size, nicetime((size-got)/rate))
+    else
+        return string.format(elapsed_s, nicesize(got),
+            nicesize(rate), nicetime(delta))
+    end
end

-- creates a new instance of a receive_cb that saves to disk
@@ -89,10 +88,10 @@ end

-- determines the size of a http file
function gethttpsize(u)
-	local r, c, h = http.request {method = "HEAD", url = u}
-	if c == 200 then
-	end
+    local r, c, h = http.request {method = "HEAD", url = u}
+    if c == 200 then
+    end
end

@@ -101,7 +100,7 @@ function getbyhttp(u, file)
-- only print feedback if output is not stdout
if file then save = ltn12.sink.chain(stats(gethttpsize(u)), save) end
local r, c, h, s = http.request {url = u, sink = save }
-	if c ~= 200 then io.stderr:write(s or c, "\n") end
+    if c ~= 200 then io.stderr:write(s or c, "\n") end
end

@@ -114,29 +113,29 @@ function getbyftp(u, file)
gett.sink = save
gett.type = "i"
local ret, err = ftp.get(gett)
-	if err then print(err) end
+    if err then print(err) end
end

-- determines the scheme
function getscheme(u)
-	-- this is an heuristic to solve a common invalid url poblem
-	if not string.find(u, "//") then u = "//" .. u end
-	local parsed = url.parse(u, {scheme = "http"})
-	return parsed.scheme
+    -- this is an heuristic to solve a common invalid url poblem
+    if not string.find(u, "//") then u = "//" .. u end
+    local parsed = url.parse(u, {scheme = "http"})
+    return parsed.scheme
end

-- gets a file either by http or ftp, saving as <name>
function get(u, name)
local fout = name and io.open(name, "wb")
-	local scheme = getscheme(u)
-	if scheme == "ftp" then getbyftp(u, fout)
-	elseif scheme == "http" then getbyhttp(u, fout)
-	else print("unknown scheme" .. scheme) end
+    local scheme = getscheme(u)
+    if scheme == "ftp" then getbyftp(u, fout)
+    elseif scheme == "http" then getbyhttp(u, fout)
+    else print("unknown scheme" .. scheme) end
end

-- main program
arg = arg or {}
-if table.getn(arg) < 1 then
-	io.write("Usage:\n  lua get.lua <remote-url> [<local-file>]\n")
-	os.exit(1)
+if #arg < 1 then
+    io.write("Usage:\n  lua get.lua <remote-url> [<local-file>]\n")
+    os.exit(1)
else get(arg[1], arg[2]) end
@@ -0,0 +1,17 @@
+<a href="http://www.cs.princeton.edu"> bla </a>
+<a href="http://www.princeton.edu"> bla </a>
+<a href="http://www.tecgraf.puc-rio.br"> bla </a>
+<a href="http://www.inf.puc-rio.br"> bla </a>
+<a href="http://www.puc-rio.br"> bla </a>
+<a href="http://www.impa.br"> bla </a>
+<a href="http://www.lua.org"> bla </a>
+<a href="http://www.lua-users.org"> bla </a>
+<a href="http://www.amazon.com"> bla </a>
+<a href="http://www.nytimes.com"> bla </a>
+<a href="http://www.bbc.co.uk"> bla </a>
+<a href="http://oglobo.globo.com"> bla </a>
+<a href="http://slate.msn.com"> bla </a>
+<a href="http://www.apple.com"> bla </a>
+<a href="http://www.microsoft.com"> bla </a>
+<a href="http://www.nasa.gov"> bla </a>
diff -up luasocket-2.0.2/etc/lp.lua.21 luasocket-2.0.2/etc/lp.lua
--- luasocket-2.0.2/etc/lp.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/lp.lua	2013-05-10 13:49:50.356679160 -0400
@@ -3,7 +3,6 @@
-- LuaSocket toolkit.
-- Author: David Burgess
-- Modified by Diego Nehab, but David is in charge
--- RCS ID: $Id: lp.lua,v 1.14 2005/11/21 07:04:44 diego Exp$
-----------------------------------------------------------------------------
--[[
if you have any questions: RFC 1179
@@ -268,11 +267,11 @@ send = socket.protect(function(option)
local class = string.sub(option.class or localip or localhost,1,31)
local _,_,ctlfn = string.find(file,".*[%/%\\](.*)")
ctlfn = string.sub(ctlfn  or file,1,131)
-	local cfile =
-	  string.format("H%-s\nC%-s\nJ%-s\nP%-s\n%.1s%-s\nU%-s\nN%-s\n",
-	  localhost,
+    local cfile =
+      string.format("H%-s\nC%-s\nJ%-s\nP%-s\n%.1s%-s\nU%-s\nN%-s\n",
+      localhost,
class,
-	  option.job or "LuaSocket",
+      option.job or "LuaSocket",
user,
fmt, lpfile,
lpfile,
diff -up luasocket-2.0.2/etc/qp.lua.21 luasocket-2.0.2/etc/qp.lua
--- luasocket-2.0.2/etc/qp.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/qp.lua	2013-05-10 13:49:50.356679160 -0400
@@ -2,7 +2,6 @@
-- Little program to convert to and from Quoted-Printable
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: qp.lua,v 1.5 2004/06/17 21:46:22 diego Exp$
-----------------------------------------------------------------------------
local ltn12 = require("ltn12")
local mime = require("mime")
diff -up luasocket-2.0.2/etc/tftp.lua.21 luasocket-2.0.2/etc/tftp.lua
--- luasocket-2.0.2/etc/tftp.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/etc/tftp.lua	2013-05-10 13:49:50.357679160 -0400
@@ -2,7 +2,6 @@
-- TFTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: tftp.lua,v 1.16 2005/11/22 08:33:29 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -35,18 +34,18 @@ local OP_INV = {"RRQ", "WRQ", "DATA", "A
-- Packet creation functions
-----------------------------------------------------------------------------
local function RRQ(source, mode)
-	return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0)
+    return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0)
end

local function WRQ(source, mode)
-	return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0)
+    return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0)
end

local function ACK(block)
-	local low, high
-	low = math.mod(block, 256)
-	high = (block - low)/256
-	return char(0, OP_ACK, high, low)
+    local low, high
+    low = math.mod(block, 256)
+    high = (block - low)/256
+    return char(0, OP_ACK, high, low)
end

local function get_OP(dgram)
@@ -58,16 +57,16 @@ end
-- Packet analysis functions
-----------------------------------------------------------------------------
local function split_DATA(dgram)
-	local block = byte(dgram, 3)*256 + byte(dgram, 4)
-	local data = string.sub(dgram, 5)
-	return block, data
+    local block = byte(dgram, 3)*256 + byte(dgram, 4)
+    local data = string.sub(dgram, 5)
+    return block, data
end

local function get_ERROR(dgram)
-	local code = byte(dgram, 3)*256 + byte(dgram, 4)
-	local msg
-	_,_, msg = string.find(dgram, "(.*)\000", 5)
-	return string.format("error code %d: %s", code, msg)
+    local code = byte(dgram, 3)*256 + byte(dgram, 4)
+    local msg
+    _,_, msg = string.find(dgram, "(.*)\000", 5)
+    return string.format("error code %d: %s", code, msg)
end

-----------------------------------------------------------------------------
@@ -77,40 +76,40 @@ local function tget(gett)
local retries, dgram, sent, datahost, dataport, code
local last = 0
socket.try(gett.host, "missing host")
-	local con = socket.try(socket.udp())
+    local con = socket.try(socket.udp())
local try = socket.newtry(function() con:close() end)
-- convert from name to ip if needed
-	gett.host = try(socket.dns.toip(gett.host))
-	con:settimeout(1)
+    gett.host = try(socket.dns.toip(gett.host))
+    con:settimeout(1)
-- first packet gives data host/port to be used for data transfers
local path = string.gsub(gett.path or "", "^/", "")
path = url.unescape(path)
retries = 0
-	repeat
-		sent = try(con:sendto(RRQ(path, "octet"), gett.host, gett.port))
-		dgram, datahost, dataport = con:receivefrom()
+    repeat
+        sent = try(con:sendto(RRQ(path, "octet"), gett.host, gett.port))
+        dgram, datahost, dataport = con:receivefrom()
retries = retries + 1
-	until dgram or datahost ~= "timeout" or retries > 5
-	try(dgram, datahost)
+    until dgram or datahost ~= "timeout" or retries > 5
+    try(dgram, datahost)
-- associate socket with data host/port
-	try(con:setpeername(datahost, dataport))
+    try(con:setpeername(datahost, dataport))
-- default sink
local sink = gett.sink or ltn12.sink.null()
-- process all data packets
-	while 1 do
+    while 1 do
-- decode packet
-		code = get_OP(dgram)
-		try(code ~= OP_ERROR, get_ERROR(dgram))
+        code = get_OP(dgram)
+        try(code ~= OP_ERROR, get_ERROR(dgram))
try(code == OP_DATA, "unhandled opcode " .. code)
-- get data packet parts
-		local block, data = split_DATA(dgram)
+        local block, data = split_DATA(dgram)
-- if not repeated, write
if block == last+1 then
-		    try(sink(data))
+            try(sink(data))
last = block
end
-- last packet brings less than 512 bytes of data
-		if string.len(data) < 512 then
+        if string.len(data) < 512 then
try(con:send(ACK(block)))
try(con:close())
try(sink(nil))
@@ -118,13 +117,13 @@ local function tget(gett)
end
-- get the next packet
retries = 0
-		repeat
-			sent = try(con:send(ACK(last)))
+        repeat
+            sent = try(con:send(ACK(last)))
retries = retries + 1
-		until dgram or err ~= "timeout" or retries > 5
-		try(dgram, err)
-	end
+        until dgram or err ~= "timeout" or retries > 5
+        try(dgram, err)
+    end
end

local default = {
diff -up luasocket-2.0.2/FIX.21 luasocket-2.0.2/FIX
--- luasocket-2.0.2/FIX.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/FIX	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+http was preserving old host header during redirects
+fix smtp.send hang on source error
+add create field to FTP and SMTP and fix HTTP ugliness
+clean timeout argument to open functions in SMTP, HTTP and FTP
+eliminate globals from namespaces created by module().
+url.absolute was not working when base_url was already parsed
+http.request was redirecting even when the location header was empty
+tcp{client}:shutdown() was checking for group instead of class.
+tcp{client}:send() now returns i+sent-1...
+get rid of a = socket.try() in the manual, except for protected cases. replace it with assert.
+get rid of "base." kludge in package.loaded
+check all "require("http")" etc in the manual.
+make sure sock_gethostname.*  only return success if the hp is not null!
+change 'l' prefix in C libraries to 'c' to avoid clash with LHF libraries
+    don't forget the declarations in luasocket.h and mime.h!!!
+setpeername was using udp{unconnected}
+fixed a bug in http.lua that caused some requests to fail (Florian Berger)
+fixed a bug in select.c that prevented sockets with descriptor 0 from working (Renato Maia)
+fixed a "bug" that caused dns.toip to crash under uLinux
+fixed a "bug" that caused a crash in gethostbyname under VMS
+DEBUG and VERSION became _DEBUG and _VERSION
+send returns the right value if input is "". Alexander Marinov
diff -up luasocket-2.0.2/gem/ex10.lua.21 luasocket-2.0.2/gem/ex10.lua
--- luasocket-2.0.2/gem/ex10.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex10.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,17 @@
+function pump.step(src, snk)
+  local chunk, src_err = src()
+  local ret, snk_err = snk(chunk, src_err)
+  if chunk and ret then return 1
+  else return nil, src_err or snk_err end
+end
+
+function pump.all(src, snk, step)
+    step = step or pump.step
+    while true do
+        local ret, err = step(src, snk)
+        if not ret then
+            if err then return nil, err
+            else return 1 end
+        end
+    end
+end
diff -up luasocket-2.0.2/gem/ex11.lua.21 luasocket-2.0.2/gem/ex11.lua
--- luasocket-2.0.2/gem/ex11.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex11.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,7 @@
+local input = source.chain(
+  source.file(io.open("input.bin", "rb")),
+  encode("base64"))
+local output = sink.chain(
+  wrap(76),
+  sink.file(io.open("output.b64", "w")))
+pump.all(input, output)
diff -up luasocket-2.0.2/gem/ex12.lua.21 luasocket-2.0.2/gem/ex12.lua
--- luasocket-2.0.2/gem/ex12.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex12.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,34 @@
+local smtp = require"socket.smtp"
+local mime = require"mime"
+local ltn12 = require"ltn12"
+
+CRLF = "\013\010"
+
+local message = smtp.message{
+    from = "Sicrano <sicrano@example.com>",
+    to = "Fulano <fulano@example.com>",
+    subject = "A message with an attachment"},
+  body = {
+    preamble = "Hope you can see the attachment" .. CRLF,
+    [1] = {
+      body = "Here is our logo" .. CRLF},
+    [2] = {
+        ["content-type"] = 'image/png; name="luasocket.png"',
+        ["content-disposition"] =
+          'attachment; filename="luasocket.png"',
+        ["content-description"] = 'LuaSocket logo',
+        ["content-transfer-encoding"] = "BASE64"},
+      body = ltn12.source.chain(
+        ltn12.source.file(io.open("luasocket.png", "rb")),
+        ltn12.filter.chain(
+          mime.encode("base64"),
+          mime.wrap()))}}}
+
+assert(smtp.send{
+  rcpt = "<diego@cs.princeton.edu>",
+  from = "<diego@cs.princeton.edu>",
+  server = "localhost",
+  port = 2525,
+  source = message})
diff -up luasocket-2.0.2/gem/ex1.lua.21 luasocket-2.0.2/gem/ex1.lua
--- luasocket-2.0.2/gem/ex1.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex1.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,4 @@
+local CRLF = "\013\010"
+local input = source.chain(source.file(io.stdin), normalize(CRLF))
+local output = sink.file(io.stdout)
+pump.all(input, output)
diff -up luasocket-2.0.2/gem/ex2.lua.21 luasocket-2.0.2/gem/ex2.lua
--- luasocket-2.0.2/gem/ex2.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex2.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,11 @@
+function filter.cycle(lowlevel, context, extra)
+  return function(chunk)
+    local ret
+    ret, context = lowlevel(context, chunk, extra)
+    return ret
+  end
+end
+
+function normalize(marker)
+  return filter.cycle(eol, 0, marker)
+end
diff -up luasocket-2.0.2/gem/ex3.lua.21 luasocket-2.0.2/gem/ex3.lua
--- luasocket-2.0.2/gem/ex3.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex3.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,15 @@
+local function chainpair(f1, f2)
+  return function(chunk)
+    local ret = f2(f1(chunk))
+    if chunk then return ret
+    else return (ret or "") .. (f2() or "") end
+  end
+end
+
+function filter.chain(...)
+  local f = select(1, ...)
+  for i = 2, select('#', ...) do
+    f = chainpair(f, select(i, ...))
+  end
+  return f
+end
diff -up luasocket-2.0.2/gem/ex4.lua.21 luasocket-2.0.2/gem/ex4.lua
--- luasocket-2.0.2/gem/ex4.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex4.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,5 @@
+local qp = filter.chain(normalize(CRLF), encode("quoted-printable"),
+  wrap("quoted-printable"))
+local input = source.chain(source.file(io.stdin), qp)
+local output = sink.file(io.stdout)
+pump.all(input, output)
diff -up luasocket-2.0.2/gem/ex5.lua.21 luasocket-2.0.2/gem/ex5.lua
--- luasocket-2.0.2/gem/ex5.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex5.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,15 @@
+function source.empty(err)
+  return function()
+    return nil, err
+  end
+end
+
+function source.file(handle, io_err)
+  if handle then
+    return function()
+      if not chunk then handle:close() end
+      return chunk
+    end
+  else return source.empty(io_err or "unable to open file") end
+end
diff -up luasocket-2.0.2/gem/ex6.lua.21 luasocket-2.0.2/gem/ex6.lua
--- luasocket-2.0.2/gem/ex6.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex6.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,14 @@
+function source.chain(src, f)
+  return function()
+    if not src then
+      return nil
+    end
+    local chunk, err = src()
+    if not chunk then
+      src = nil
+      return f(nil)
+    else
+      return f(chunk)
+    end
+  end
+end
diff -up luasocket-2.0.2/gem/ex7.lua.21 luasocket-2.0.2/gem/ex7.lua
--- luasocket-2.0.2/gem/ex7.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex7.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,16 @@
+function sink.table(t)
+  t = t or {}
+  local f = function(chunk, err)
+    if chunk then table.insert(t, chunk) end
+    return 1
+  end
+  return f, t
+end
+
+local function null()
+  return 1
+end
+
+function sink.null()
+  return null
+end
diff -up luasocket-2.0.2/gem/ex8.lua.21 luasocket-2.0.2/gem/ex8.lua
--- luasocket-2.0.2/gem/ex8.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex8.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,5 @@
+local input = source.file(io.stdin)
+local output, t = sink.table()
+output = sink.chain(normalize(CRLF), output)
+pump.all(input, output)
+io.write(table.concat(t))
diff -up luasocket-2.0.2/gem/ex9.lua.21 luasocket-2.0.2/gem/ex9.lua
--- luasocket-2.0.2/gem/ex9.lua.21	2013-05-10 13:49:50.357679160 -0400
+++ luasocket-2.0.2/gem/ex9.lua	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,3 @@
+for chunk in source.file(io.stdin) do
+  io.write(chunk)
+end
diff -up luasocket-2.0.2/gem/gem.c.21 luasocket-2.0.2/gem/gem.c
--- luasocket-2.0.2/gem/gem.c.21	2013-05-10 13:49:50.358679160 -0400
+++ luasocket-2.0.2/gem/gem.c	2013-05-10 13:49:50.357679160 -0400
@@ -0,0 +1,54 @@
+#include "lua.h"
+#include "lauxlib.h"
+
+#define CR '\xD'
+#define LF '\xA'
+#define CRLF "\xD\xA"
+
+#define candidate(c) (c == CR || c == LF)
+static int pushchar(int c, int last, const char *marker,
+    luaL_Buffer *buffer) {
+  if (candidate(c)) {
+    if (candidate(last)) {
+      if (c == last)
+      return 0;
+    } else {
+      return c;
+    }
+  } else {
+    luaL_putchar(buffer, c);
+    return 0;
+  }
+}
+
+static int eol(lua_State *L) {
+  int context = luaL_checkint(L, 1);
+  size_t isize = 0;
+  const char *input = luaL_optlstring(L, 2, NULL, &isize);
+  const char *last = input + isize;
+  const char *marker = luaL_optstring(L, 3, CRLF);
+  luaL_Buffer buffer;
+  luaL_buffinit(L, &buffer);
+  if (!input) {
+    lua_pushnil(L);
+    lua_pushnumber(L, 0);
+    return 2;
+  }
+  while (input < last)
+    context = pushchar(*input++, context, marker, &buffer);
+  luaL_pushresult(&buffer);
+  lua_pushnumber(L, context);
+  return 2;
+}
+
+static luaL_reg func[] = {
+    { "eol", eol },
+    { NULL, NULL }
+};
+
+int luaopen_gem(lua_State *L) {
+    luaL_openlib(L, "gem", func, 0);
+	return 0;
+}
diff -up luasocket-2.0.2/gem/gt.b64.21 luasocket-2.0.2/gem/gt.b64
--- luasocket-2.0.2/gem/gt.b64.21	2013-05-10 13:49:50.358679160 -0400
+++ luasocket-2.0.2/gem/gt.b64	2013-05-10 13:49:50.358679160 -0400
@@ -0,0 +1,206 @@
+iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAtU0lEQVR42u19eXRURdb4rarXa5LO
+RshKEshC2MLOBIjsCoMLGJhRPnUEcUGZEX7j4Iw6zqd+zjkzzowL6gzKMOoBRHAAPyQKUZQlxLAk
+EIEkQkhCyEoISegs3f1eVf3+qPTj0Z3udEJImN/Pe/rkdF6/V6/q3qp7b92tEOccfoT+A9zfHfj/
+HX4kQD/DjwToZ/iRAP0MPxKgn+FHAvQz/EiAfgapvzvQQ3DfviCE+rtTPYH/AAKouEYIcc4ForUX
+tXeKexhj6k8IIe2DvdUl0SYAcN7RGYQ63oAQ4hx8fBu6BXfC6vBcsHyDeNRi7cYboZQjBIRgl/lB
+waBtQUsD34mqRT0hHc/abEpNjbWlxYEQCgw0RET463QEABjjjHFfyND/LEg737XsQpblhoaGioqK
+CxcunD9/fv78+ampqepgZFk2mUwBAQEYY6PRSAhRG7Tb7cXFxXa73W63W63Wn/zkJ4sXL1YfVHGB
+7ffbClCnoYoFFRFiIufn53/88cfBwcERERERERHjxo2LjIz0ZbaqFLXb7ZcuXZIkKSoqShAYY7xn
+FEoZQsgLDfqTAFqWIstyRUVFXFycJEniJ6vV2tTUFBUVRQhxkb0q2TTS7xr9tNxG/bdjtAjl5eXl
+5ubW1dUhhJKTkzMyMkwmk0p4AMAYq91Tv1DKCMENDW0PPLBj797vEdJjrAfgjF2HP+d8B8YcAMry
+5VP//vf5Oh3h3OM66P8V0NTU9N133+Xl5SmKsnr16qCgIBc8MsbE5HXXgjqdU9oRie8YY5c2W1tb
+CwsLS0tLFy5cqEoILWnFI84rHGNUXW29/fYPCwsvSpI/pQLxntYNxxhjDIpinTNn1K5d/2Uy6Zwd
+cNWO+o4A7mjFGOfk5OzcuTMsLGzixInjxo2zWCwqIlSpAL2k47tMc+18FN8vXLgAAHFxce4Cqa1N
+njlzw9GjZZLkryiK6KP3twEgnY7I8tWf/WzCtm33McZVJVV7H3nppZf6BvXaL+rAFEVJSEhYvHjx
+ANQV9jvIwxiTJOPp0xdCQgLS0gZRyjF2Hc5NXwEu866lpUWv1+v1enVBqFsnwWS0dLrZ4K7dlpSU
+ZGZmVlVVpaen33PPPYL1HzlSOXnyewCk+6gSo2OhocaCgl9GR1vEOtCO7qbbglQsY4yPHj366quv
+nj59GjScWtBGq0f2mVHBZbVxzhMSElatWvXzn//cORUAANau/Y5zB8YYoLsUQJxzQqSGhqb1648D
+gFClXO+4eSNUZ9alS5e2b99eXl4+d+7cqVOnCrl361hvOt2LCNWlttY6bNjbTU22Hk9WhBDnjhEj
+IgoKVoqdc1+vAFmW//WvfymK8uyzz86aNUvlP72HPrjBWaR2RkgIoXeJ2ZqbW9nUdBVj0uPGOecA
+ujNn6s+cuQRui6CXd8JaJUedSsJUEBoaqtfrtdd9p4HQ3rTGL9UE1ik2BZ/trmnMRePinAFAQUEt
+AMMYuXMP34EQRKnjzJlLqakRLr3uTQJoJarLzigyMpIxJiStVr/0pTXOQdgAMEaEYACOEPb+tKCU
+UOEVhYq9qKCKTwYyzW0XL169cUaNEAJglZVXwc2Q3msE0GKfEFJYWGg2m+Pj41UtyMeJr8W7olCB
+dFVS2mxKZeXVqqqrFRXN9fVtDQ1tbW2yw0EBQK8nJpNuwABTWJjfoEGB0dEBMTEWk0mHEBYPU8oY
+Y04S+roEbTalt1Bkt1P3i728AjjnhJCjR49u3rw5IyNDEACcvBW8ajgqRhSFCUsvQhghVF/fmptb
+efjwxWPHqs6da6iutlLqAFA86yQIQCJEHxkZkJQUMnFi9JQpg9LSYsLD/THusCtw3mHR7JIMfn66
+3sKP2dxJU70sAzDGBw4c2Llz5/333z958mRVqfD+lBb1GCNhxa2oaP788x8++6z4yJFKq9UKQAGI
++CCkw1jvqVkhPylllZVXKivrv/22EID4+wdMmhS9YEHKggVD4+KCxAqjlHkig9DfASA+PkismO7r
+oNeAMQ6A4+ODwG0K9o4aqtoajx07tnnz5mXLlo0ePVplO12iXhjZMUYYI1mme/aUrF+f/9VXJTZb
+CwAG0GFMhDHLxfjlHQTTF/KTMQogAzCDwW/27ITHHhs/f36SXk+8GO4VhUkSzsoqmTv3XxgbbkQI
+A3BJQmfO/DI5eYAQhL1JAK0l68qVK1euXElMTOyS6av6EqViI4bb2+WNGwveeCO3uLgSAAAMhBCA
+Dh/TjQMhCABRSgHsAJCUFL16ddrDD4/289OrfQDNahBGiKYm2/Dha2tqrAj1YCcMAIAxYsw+aVLs
+kSMr3G2IN7QPcOqFXJ3IISEhCQkJvmBfaIeKIqQifPDBiREj3n3iiW3FxTUYmwgxCWT1FvYBgFJO
+KQVAhJgwNp07V7ty5afDh7+7fn0e50AIVhTGmNZiCIrCgoKMixYNB7D3aCcMTvalPPjgGNEHl597
+vgI8Gd8FL/JkLnaf+IcPV6xatScv7zxCEsYGdQd0k6HDvs2Yg3PH6NFD3npr3vTp8Wqv1D0Hxqik
+5MrYse+0tFCn48X3LSTHGDMmJySEnDjxy4AAfa+tAK1yWVpampubqxJDMLhOub9W2BKC29uVX/7y
+i/T09/LyygjxQ0hPKe0T7AMAYoxTShGSCPEvKKiYMWP9E0/sbm11iKXgHAIoCktMDHnxxVkAbTpd
+t9DFnahW/vSneQEBHYzOBS09IYA62THGra2tmzZtOnfunO9PCeF25Ejl+PHr3n13PyE6jI1O1Pex
+dQgxBpRSjA2E6N9//+DYseuysyskCVPKBTsiBDHGn302ffHiCbJs1ekkJ3K7GC5CSKfDlFrXrJm1
+ePFwShnGnYyuJwTQ+vk2bdrk5+e3ZMkS9Scv2GeMU8p1OvLOO0enTn3v7Nk6QvwpFQbRfjTMIcYY
+pZwQ/9LS+mnT3n/99e8kCQtmKNYB53zTpkV33jlGlpslSWzIPZFBhKUQjLksW596auZrr92hYt8d
+Pz1cAQKhmZmZpaWlS5culSRJsKNOJYrWqY0xeuKJz3/1q38DYIz1lIrNYT9gHyFXAxGlFGM9xtIz
+z+xctuwzYUESXnXOQacj//u/S3796zsUxU6pDSGQJEKIsHB0fAhBkkQQ4pS2Ygyvv77o3XfvFNjv
+zagIVZLs27cvMDBwwoQJqpHHE98Xno3WVvlnP9v65ZcFkhSgKKybAu0GgQMgse2iVIQviIFjjDHG
+YnvccZskYUWxzp49cseO+y0Wg+i82DFIEj58uOL55/cdPFgKYHfuDcUoGAAFYISY77572B//OGv4
+rIcOB5GgQcukSQlffPGL0FCTGIJgSmI65+VV79xZnJNzsby8UQ3MSkgImT49PiNjWHJyqBrC5d3u
+1A0CuHstvOv7KufBGFmtjnnzPsrJKZEkP0WhfTnxnV1t0+mMs2YlLVyYMnFiVHS0xWzWUcqammzn
+zl359tuyf/+7sKSkGiEJIT1jFAAkiShK68SJg7OylgYFGcVAAECrqiKEZJm2tysIgdmsc14EWRY2
+FY/q+A0RQG3Re2yIerMsszvv3Pj114WS5N/n2McACufKz38+/uWXZ6SkDHDvs4rH7duLXnjh69LS
+GkLMlHIALmgwbVry3r0PGwwd4T3gNDcJkqiUUC8SgjEWPoyuba6+CmFtAMH+/ftra2s7COjVuim0
+iEcf/axfsI8x5twRGGjYufPhrVsXJyeHUsrEdlf7oZTLMiUE33//yFOnVj7yyBRK2wgBAKQoVJL8
+Dh78YenSHerqV13cOl2HhUr1DmGMdDpSX3/p22/3C1+3FnU3RAC1obNnz+7atau9vd1L007WzwnB
+r756YOPGI/0y9xmTo6IsBw8+vnBhiixT4dIRWNN+CEE6HRF7LoOBbNiw4JVX5lNqwxg5aeC/deux
+F1/cRwimVJV/AM79ppAK6opvb2/ftWtXSUlJl9iHbsUFiXds2rQpOTl52rRpnoydzoAfJkk4M/Ps
+Y4/twNjotIH0ndQFYP7+ur17l40ZEyHLVJKwpy26+q/Q7hWFzZw5uKVFyck5R4gwjQDGhgMHzqam
+Ro8YMVBs472YuYKDg69cuVJQUJCWlubi5nQHn1aAuu5OnDhRU1MzZ84c7/cLda2mpuWJJz4DQJx3
+8Yrbb7+9trY2Ly9Pxd4NEUCFc+fOTZgwYeDAgWL6u9+g2kcB4Omnd1dVNRCi57wvN7rC/mWbNWvo
+8uXjKWU6He5SErrQQAjb116bCyAJAwnnjBBdXV3jr36122WY7sAYCwsLGz9+vOBCXbzURy3Iydap
+oijafIfr7+kw4UoS3rLl1H/912ZCTJT2tZkBIcS5PTNz6fz5yaIzvicMqWillEsSzsjYsnNnASEm
+oRQRgilt+/DD+x9+eKyzZe6GhA7M2O12Qoga7O3pdb6yIPEXY+w1qodzziUJNzXZXnghC0ByKgJ9
+fbq8wH36g9Ph8Ne/ZpeV1fU581HRp8ycOVinI6pVuQftCH1/6tTYoCALY1SIUs45IfrKyvo///mQ
+kx6uyHVHTqc49JUA2na1Ar2zUXHOQZJweXnTO+/kAhj7nvmoMG5c9I08rlpABw70T0oKBVCc4xV+
+JNM//nHk3LkGwdw6fVz7txc2YoyxrVu3lpaWImecs4fbOACsXftdc7OVEOlGwgh6DJwDAImNDdTi
+omcghhMTYwFg2glNCGltbX3jjRzoLNhWizSEUHl5+datW51G307AGwFU/amqqur48eOSJHm9EyQJ
+V1Vd/fDDEwCG/jLxc84BkNEoAXRD8HpoCgDAZNJdP5PEIjBs2lRQXt4kFoEXFi9J0vHjxysrK8GD
+PurTCvj+++9jYmJiY2O9CHQxFz766ERjYxMh0s1OO/AEIoDH4VBUDN4g2GyK20zihEhW69UPPsgD
+z4tACIOYmJiYmBgRkd8pdEEAsXssKioaOnQoeBAj4pokYYeDbtpUAKDrD+eiOmwAoCIKE3ywBHgd
+OwKAqqqrAC68XvBh/ebN37e3y5KEPWOGA0BycnJRURFowgOve0uX/bBarYqiCAJ4gI44hm++KS0q
+qkVI31/TX2AHAPLza26kCTU5oKGhraTkCgBxGRHngLHu/PlLWVkl0FmwiRaGDx8uy3JTU1Onv3at
+hgYEBKxevTo2NhY8y3TRvU8/PQ1ARZbnTcaytw4DSPv3lzHGvMxN39qB3NyLDQ3NGEvubYjYrU8/
+PeOpBRVXMTExq1evDgwM7PQ2bwRQce2Siu4OkoStVntW1vn+5T8AwBhHSHfqVPWBAxfAq5biCdSg
+MQDYvPl7pwrE3V8EoP/669LGxnZP+qgAQojJZPLkG/BIAHXiMK/bWTWO6tixqsrKKwjp+rv2hBgk
+FEDpNPSlbwExxhEyff756W3bTksSVhSP4RpuA7mWmgAAzz2XJcs2LxGJgtL79p33gjoXBLpDFwRo
+bGwsLi7W1gXopAmMACAn56K7sOonEGUbpJUrPz93rkGnI7JMVX+Wx2ec2JdlJkn4j3888OWXZwgx
+ednQcM4ByHffXVSR4OEeYIz98MMPjY2N3SCAQHphYeG2bdu8+h0BY9TY2H7mzCUA7+o/BwBJwuKD
+8Q1F3HsFYVWWLl+23nXXxoqKZkED1UnrptJ0/KsojFKu15O///3Y73+/F2NTp8zn+gelwsLLly61
+hrHh7NlLU6a8n51dIXwyAsXOND+uutFlmQonEsbouee+XrlyB8Z6sey9vINzQAg3NbWWlDQAeHMP
+IIQiIyMvXboE18cVgpcMGTHrm5qagoKCwHMqj2iqqOgygEyI5FkjRgA0JMT/oYemMMbNZik7u+Lw
+4dKbKbQ7aFBV1Txjxvqnnpry/PO3RUT4u3gyEOpYxAihb74pW7MmKz+/lBATpeCLFw9jRKlcVHR5
+ypRY7wMJCQnpdCvQBQFqampGjRrllQAcAM6fvwLAvOTxYIwYYxER/m++OU+WqU5H/vzn7MOHfyDE
+IIzGN48GCOk452+/vf/DD/MXLhy+cGHK2LER4eH+BgNhjLe0OMrKmg4evLBly+mjR0sBgBA/Sn2N
+GxNDPn/+CnheAeK62WwWDjIXNHZBgGnTpkVFRUFX4ebl5U2+ONc45yIwRKcjvZh54R1FnDPOESF+
+Vqt948bcjRuP6HTmsDA/k0lijDc12RsbW0SQIcZGABBJHD5uZYTtr7y8CTy4SVS8DR8+XPASn1iQ
+2sqUKVPUnAsPdwIA1Na2+DhfCMGS1FHWrk8IAKJjlFIATIiZc5BlWl3d6JzjCIBIkr8QBt0NHhDR
+QLW1LeDZ9C2iZuPi4uLj413Q65EAmjypTqrruOAUABobbW4Wq1sN1KhCBIAQujZwkSmlva27LTc2
+2gDAwxS9LoPapRwXdOkPgK58GkL/bWlx9GuAfzeQ5RyaWu/gWnC5Om7fmxMsqLXVIaLYfbv/OvDG
+grR830vrjHFZ7gPvu8hX6ZhBIkyhM6q73MY830Mo5ZxTkQ/sXBmYENJVRTJXbMkyY4x7spZ5R6a3
+fUBLS8uWLVvq6+vBqzlFNQfdzG2wCM6hYg9BaZsT+7yz2xTnbe2aeobqDYKjUkVp4dxuNOojI4Ni
+YkIiIgJNJj3nsqK0cE67lRPp3RAkfrpy5cqWLVuam5tdEOUtU16W5ZMnT6alpYWFhXnxhWGMhOHX
+R5NLDwAhxLmSmDhw6dIxisIaG9vffvuou5EAIcS5nJoac999IxWFVVdffe+945p7OIDI226LjBzw
+4INjfvrTxKSk0MBAA8ZI5AqUlFzZu/f8Bx/k1dZewdjkm2OVq3GPngiAEGptbT1x4oQIKtQi0xsB
+JEkym83ecSra0uvJTfUBYIwoVZKSQl54YRoAlJc3/f3vx9yttOK21NTw55+/DQAKCmrfe++YBoMI
+IWDM9sQT6X/961x/f9cAJ4vFEBUVMH16/G9/O3X58s+2by/A2OidBsJwrdcTX5Q6s9ks/Oq+pqmK
+ux0Oh1cCdHS9D5wwKsZFioTnLl2z7WgvY4w4t/2f/zNt3bq7jUZJWEnb2uTy8qZz5xpqaqxCkDoc
+1GIxbNt23223JTDmS342t1gMahKcJ7DZbACg07nW6/C2AvR6vUhE7Wq0KDTUBNC9ALQegLrKnUmK
+tLXJZrPu/vs/3bPnBMZ+jImodKWwsOrxxz9ubZVXr04DgPHjowIC/K1WG0Letzg8OtqiosIdBOqS
+kpIef/xx99CeLvwB4eHhQgx42oWJ9e6s6dLfaO4KxoyJBACzWXfgQNmePWckKciZ44gAMCEGAOMn
+n5wUN1ssBn9/PYA3didsQaIOjXcsmUymiIgI9xsk762L8nVqRpj78+JKSkooAOmrKgM9AcY6nPWt
+rQ4AyM4uBxD7gA59X5hFAXBbm+K7QUIUAkpJGQDXMwltipxKg04R6G0jxjVlNzyB2AkPHTqAEEM/
+Yt6iDcUKsFqtfn5+nuISRVNxcUFxcUGlpZcRkm5VixAC4BgbCUGEYIdDobTdyV4wgC4gwBgVFTB9
++k9efHG6ry0i4JzGxAQPHhwMzrmoTSRV+YdLQrX2YhcEqK+vX7du3YoVK8LDwz3xOEqZwSCNHRtR
+WlqLsa6v7Mw9Ac5BURRZtpnNAWPHJo0eHT506IDBg4NiYizh4f4DBpj1euKJV7iD2HaMGRMhSj6p
+GawIIVGhua2tbefOnQ888IBIquCaepLqsujCHxAYGMg5r62tDQ8PBw9iQEz5GTPit28/0d8Y9oZ8
+hDDnsr+/Yc2a2cuXj42OtrjkPAuk1NW1DhhgliRfeCkC4NOnx6tI4M6ikQcPHszOzo6MjLRarcXF
+WfbsWTpq1EBhvUEItbfLVVXWysqrZWWNZ8827N9fTik7cuQx8MG0RSkD0M+cORg6WLHgchgApkyZ
+Eh8fn5WVxRj7/PPPbTabxWKJiopKTEwMDAz8+OOPn3zySXEgiDcCCGIOGjSouLgYPAgl9YyUUaPC
+H8Yco0ZFjh0bKf510gA45xaLJSgoqLq6OiIiYuTIkefPn7948eKFCxf279/f0NCQkpISGRkJLn6J
+zpArVMyU9vZ2tR5Kp3dSyiUJ3XNPSl5eGUJGgJu7DrwkmwLwyEg/l6uEIErtkycPmTcvyeGgRqP0
+t79995vf7EKIca5T62ASgh0Ouyj02hWIIgjyXXcNxRiJkihOSndwaUrpnDlzBMYSEhKGDBkixHJj
+Y6PZbAY199UL9gVPTEpKSk5O9u6cEZczMob/z/8cuHkZ8S6ntbj/DsABsJiSLmMBoGlpMQCg15Pq
+auvLL2cBSJKkUxQm3DLCNwDABUftCkSahnHx4hHunXGWLcCHDh3Ky8tDCA0aNGjq1KkiwCc0NFSV
+85zzLjxiWsekp4Q/5KzNOXJk+OzZgwEcvgQoIoQAsBqn5eXj3CJdA6NRMplc3B8dWbQDBwbOnDmk
+09GEh/uLb+XlV6xWGWNJRGupN0gSAXAMGxaqGbtHCzyAfcaM+HHjotQCNi5427VrV2ZmZnJycmJi
+Yk5OjsPhOHnypOpcUbUgn6xa2mM/PBn9Bd9/9NEJaje8E4BzGaBFUVrVUC1PH84V56JmAKAoLDzc
+f9y4CACbXt9R+EGSCCEYoPU3v7ltwACzqCbtAlZrh1k3IiJAr8ecc0lSH0eSRByOlvDw0Fdeud05
+duHkwm7hNuI7f/TR8eAWgC12r3V1dceOHVuxYsX8+fMTEhLi4uIGDRqUm5u7bds2uD5+ouvSxej6
+2kyeQDDBBQuGjRoVfepUDcZ6T6JYrI/x4wc98sjtAQEGr1l/YDJJu3efLS6uA5AqKpplmYrH//Sn
+eXPm1FitzSK0i3PKOaxcOXvNmnS1sI8WKQD4++9rAcDhoEOGhDz2WNq77+5jTM8YEtoj5zBpUuLG
+jfeKoiqEYEIwxgqAnXOjtmAlQpgxx9ChkYsWjQC38A6BpbKystDQUBEGcezYsYSEBAC4995733nn
+ncrKypiYGLXUQBcEUGNSDh482NzcfPfdd3dapAA5yyHqdHjVqsmPProNIYO7KBaF6MUsnjVryJw5
+uLHgrruSQ0PN6pZQxPLv23e+pKQhMTFUlunatT/9yU+it207U1fXoteThISQBQtS7rwzyWCQGhvb
+0uIwGCRZpoMHB61dOz87+5EjRx7bvHnRHXckAMBf/5rzyiv7goONoIlY5hwwJm1tbatXfymyORnj
+Dz00eteuJUeOPJ6dvfzDDxcuXJhiMEj5+TXp6RvKyhoRQna7smpVWlXVMw8/PAbARggSyg+l9pSU
+qGXLxrlMf62eMmzYMKPRuHXr1ry8vIEDB0ZHRwPA6dOnKaXiu08uSe1948aNy8rKOnny5G233ebJ
+LCoWgV5P/vCHmYsXb3KZzgCorU0+dOiC78YixlhgoLG2tgUAKwrD2HD8+IVZsz745z8XpqaGq3HO
+oj/Nze0vv3zgzTe/iY+PPHSowmzWnTp1SdsUxsbMzNNz5360bt09Q4YEO+cQF1HTly+3vv320ddf
+P9Ta2rxhw4m//W2uWoxAOFydwQ3AOX3xxZkmk+v0V3l1W1ub2Wx+5JFHNm7cKPhPTk5OTU1Nbm5u
+RkaGwWDQchGf4gkFF9q9e/fJkyefe+457dmCbljukEJ33bUxM/MMIWZnpJ/qrunBeQgEAKsBDYzZ
+JUmaPj1xxoy4uLggnY5cvtyan1+7e/cP9fUNGJsZY863IAA1XxyphVSMRuOcOUnp6bExMRaEUG2t
+4osFCxbodDpZlk+dOnXq1Kn6+nqz2Zyeni7OI9VObp8IIO6ur6/funXrkiVLhCbrKVZXBBsXFdVP
+nPiP1lbFibsOGvTAaaNWkxT/OQ9BsQOoQZxC2OjV8Gz1LW7hPeJxUT6ROTmw+rhOhOUihDi3qSH1
+HS1ipChs2LCwV16ZA2BzMQyIXU+3Pi7dYYxxDoQYJcmfEDMhJvEFIaI66zXPos4eR86nTNc/TtXH
+CTGpjSMkidgTgPY//GHW6NERatF3AfX19QL7lNLg4OCwsDCRGAwaxb2trU1dKNpJ373kKRfC+MaI
+ThPi52RE/6HACSGUtt1+e0pW1jXmI5Bgs9lef/31gICABQsWDBo0CCH0zTffHDlyJCUlpbGx0Waz
+FEPT8pPa2tq9e/eeOXNm6NChCxcuBIC33norPDw8MDDQZDL5+fkZDIbU1NROmUf3YtmcWZy0tbU1
+wYLk5GRtbdtO0dW9mnGilYKCgrffflsEunRKvw5nm4QVhU2bFrdhwyIAu6hZeMvGrXQ6XBHKyLn9
+/ffvnT17iKi+6C5UBURHR69YsWLFihX19fXV1dUHDhxoaWkRKoOQLp1O1m4fZ4sQCgkJOXz4cFNT
+0/Dhw9UW3TNDOOeEYEWhY8dG+vub9+49TYj+epXmVgYOgCQJUdr6xz/euWpVmkjs6TQHpr29/bPP
+PtuxY0dRUdGkSZOmTZsWExNTVFSUlZVlt9tjY2NFPFanWUbdI4DQeXU6XVhY2K5duxISEgRf8xCa
+isQ5RpTy9PRYQvTffHNGkv4jaNCBfUVpfeGFef/93zO0ey4XwwNj7P33329sbExPT9fr9YmJiQI/
+aWlpFoslPz9/xIgRJpMJPOjg3ZYB4NRwPv7448rKymeffRa8pvAh5ylVkoT/9Kfs5577nBAjY7jv
+y8n5PkqEMMac0vaXX57/hz9M91SCXjipjh07lpWVtWbNGrWcoSzLe/bsSU9PDw4OppS6HMbuAt07
+yE3b0J133nnlirfsQO39hICi0N/9Lj0kxLRixQ7OMSG6W1I35RgTzmVK6TvvLF65cqIn7KuGkKqq
+qoiICL1eL8syxlhUNTlx4oSiKPfee2+X7+v5ESYWi2Xw4MEuEqlTd42TBliW6eOPj//yy0eCg42U
+tkuScKrcImJZJPITxtoDAgyff7505cqJskxdsK8OkznPlIuKiqqoqGhtbRWRz4qi6HS66dOni6TU
+Ls9w7DYBtL1Rjy1xiezw9IgkYVmmc+cmHD/+1MSJgxWlhRDo6flcvYx9jDEhoCgtY8bEHj/+5F13
+JQudx9MACSFiso8dO9ZsNn/44YeiUqu48/Lly2qCu/cXd1sLguvLMoovly5dUhTFZDJ5OstE02+s
+KCwkxLRs2Vi7nWRnn+dcIUTv9Oj2PUfqyBdjzME5Xb165iefLB440F/oPNrxav2INpvt8OHDR48e
+tVqt0dHRI0eOzM7OPnjwoF6vlyQpNzf38OHD9913X1BQkJcM347GbySpSDWUbtiwwWq1Pv300ypt
+vItlcWCLOI9lxYrdp0+XI2TEWHKu674hA3dGSimc21JSYtetu+v6s9w6hgiaEAWEUGNj4/r16yml
+AwcOLCsrE5bnkJCQL7/8sqCgQJZlPz+/u+++e8SIEVor6U0hgIrQq1evvvHGG3FxcUuXLgXPSpH2
+EVU1stuVd9459uqr+5uaGvuKDNeh3mIJfP756atWpQkPl/ASg5PBqtNfDeh8//33CSHLly8HgLa2
+to8//ri0tHTVqlXh4eF2u729vT0gIEA1gnYZ5dgTFnQdARFijBmNxmHDhu3Zs+fixYujR4/2/mIt
+OxJG3alTY5ctGwugP3WqzmazAiCMJe8FYHqGdwDkFKoK5+1+fuaVK9O3bFk8b16SKJWrMn2xshlj
+Fy9erK2t9fPz0+v1CKGmpqY9e/YsWrQoKCiIUmowGMaNG1dcXHzmzJlJkyYRQoxGI3Kecuc9lkfA
+jZ4nrHY0PDx8+fLl3377rcPhMBgM4HUdqNNKnISgKCwszO8vf7n9179Oe++9vPXr86qr6wEAQC8E
+XbdOse3sdcI9KU4HdQBARMSARx8dt2LFhOhoC2PcRdcUgyopKdm5c6fVahWCbfHixampqeJXNW1L
+WPx/+tOfrl+/vq6uLjw8XCj+XmoL9DIBtNSOj49ftmyZOgzBSbyXOVBrjgosRET4v/TSjDVrpmRm
+nvvoo5P795e1tVkBAEAHIKk4UvPcPaFbcA6V0XGuUKoAcJMpYNq05IcfHn333UNFlqTgOcLCIxoU
+6M7Pz//kk09mzJiRnp5OCMnMzBTFZgIDA+Pi4r766qvhw4cTQhRFAYCgoCBCiN1uB429wUffU68d
+6KyuXK28cr/i4XEQfFk9XlkMoLraundvyZ49JTk5FysrmwDEKWDCQyk+1zXpNHIw50ds9PRRUUFT
+pgyaNy9x7tzEmJiOoGj1CGn3GOnGxsa//OUv99xzT1pamjYmU8yn+vr6N998MyEh4cEHH9TpdAih
+L7/88uTJk7/97W99n/i9TACVDNfaRSgvLy8iIiI6OrrL7bg7ISnlCF07q6u9Xf7hh4a8vOrvv68r
+LKyvrLx66VKr1eqQZVlzJh4CwDqd5O+vHzjQLybGMmxYWGpq+PjxUcOGDTCZdFoFzNP5aoKlZGdn
+Hzhw4He/+506lxFCLS0ttbW1JpMpOjq6srLygw8+UBRlxIgRjY2NFy9efOSRR4YMGeLLIeIu0Jtn
+yrsYab///vtt27YtW7YsJSVFXQq+tAAA6lmaooSM0SiNGRMxenQ4dIh93txsa262NzfbbDZFVKrQ
+6bDRKAUGGi0WQ1CQ0WVqi7P7xKmFWut8px0wGAytra1NTU2hoaGKopSXlx85cqS4uNhms1FKp0yZ
+snjx4meeeSY3N/f8+fMhISH33nvvwIEDuQ8ZXZ0MuRdXgArq8L744ouvvvrqjjvumD17ttejNzy1
+I8JAROHBDtYv+IYXh6jTRX7tLFRN8lAXJdWdC679jTfeYIwlJiaWl5c3NDRERUVNmDBhyJAhZWVl
+27dv/8UvfjF27NgunS39QwAt98cYnzlzZvPmzUuWLBk1apSWn/asu2pvPVVkVaN3tP92t32EUHV1
+dWZmZnNzc0JCwsSJE0U0lfhp3bp1gYGBS5YsURRF3eX2gPvfLAK406ClpcVgMOh0Og361KolXWvK
+fQlaa4/LF+HVkiTp7bffjo6OzsjIELLtBvvfwyPNvYM6u4Uyqk2yFIYUdffgyX7Xl6BqONq9K3cm
+1MmyzJ1nF0qSdOjQocrKysmTJ4NTON/g7OlNIawFtVtaHU5c+eijjzDGGRkZAwYM8FE43yTQmnVB
+M+XVBVpXV/fBBx/Mnj07NTX16tWr+/bty8vLe+CBByIjIz2dpNZtRPXZ7FOXc2lp6RdffFFRUTF2
+7NhZs2aJBNjr+tQj8dDdzqjTXFWRtdtGZ2CHsmvXrtzcXJPJpChKWFhYRkZGbGyslwOsuwt9vfxV
+Mpw9e3bHjh1JSUmLFi1y2eyoJtxep4SLyFH/LS8vz8zMHD16dHp6urtuc+nSpbq6uuDg4KioKME5
+u9xa3ooEUMejVmJUFEVRFJEuK8Zjs9lUY1ZH/9yQ1bP3goa0Ku7sdntOTk5+fn59fX1CQsIdd9wR
+FxenfbX7svDdyuYj3CwZ4A7qNk0MQARTqmfNAYDNZlu7dq3FYpkwYUJSUpI4ckKrh2hnnIvBw9O7
+tPeD2ykuIm8rMTHxoYceEjsp7SMuEkIVxb27KPtHA3HX9gTDPXv27MmTJ8+fP2+1WtPS0jIyMnqw
+uXdRIgU0NzdXVlYWFhaOHz8+ISFBZXoqu+uyQupNgr5bAVpwd2oCgCRJw4YNGz58uKIo586dcxED
+R44cqampGTRoUGBgoMViCQ4OFhsLLaIZY4qiUEpFjSN1J7hjxw5ZlgkhgYGBqampLj1RVaA+EP6d
+ubq6uqioaMiQIZGRkULegJvZqh93grcEAQRop7N2q6xlVoyx1tZWq9U6YMAAbSDU8ePHEULiANOg
+oKDY2FithHCRFv0y0z3BLUQAT6C6d7TaIfiAR5c9bZcBA/0C/wEEEKDtZ6duHy1a3Wtk37LwH0OA
+/1fhphjjfgTf4f8C4VLHz/5KLxoAAAA8dEVYdGNvbW1lbnQAIEltYWdlIGdlbmVyYXRlZCBieSBH
+TlUgR2hvc3RzY3JpcHQgKGRldmljZT1wbm1yYXcpCvqLFvMAAAAASUVORK5CYII=
diff -up luasocket-2.0.2/gem/ltn012.tex.21 luasocket-2.0.2/gem/ltn012.tex
--- luasocket-2.0.2/gem/ltn012.tex.21	2013-05-10 13:49:50.358679160 -0400
+++ luasocket-2.0.2/gem/ltn012.tex	2013-05-10 13:49:50.358679160 -0400
@@ -0,0 +1,695 @@
+\documentclass[10pt]{article}
+\usepackage{fancyvrb}
+\usepackage{url}
+\DefineVerbatimEnvironment{lua}{Verbatim}{fontsize=\small,commandchars=\@\#\%}
+\DefineVerbatimEnvironment{C}{Verbatim}{fontsize=\small,commandchars=\@\#\%}
+
+case "x$1" in +"x-no_opt") do_opt=0 ; shift ;; +esac + +case "x$1" in
+"x-best") best=1 ; shift ;;
+esac
+
+case "x$1" in +"x-rot") rot=1 ; shift ;; +esac + +case "x$1" in
+"x-a4") a4=1 ; shift ;;
+esac
+
+case "x$1" in +"x-eps") eps=1 ; shift ;; +esac + +case$# in
+2) ifilename=$1 ; ofilename=$2 ;;
+1) ifilename=$1 + if echo$1 | grep -i '\.e*ps$' > /dev/null + then + ofilename=echo$1 | sed 's/\..*$/.pdf/' + else + echo "$usage" 1>&2
+      exit 1
+   fi ;;
+*) echo "$usage" 1>&2 ; exit 1 ;; +esac + +if [$best == 1 ]
+then
+	options="-dPDFSETTINGS=/prepress \
+	-r1200 \
+	-dMonoImageResolution=1200 \
+	-dGrayImageResolution=1200 \
+	-dColorImageResolution=1200 \
+	-dDownsampleMonoImages=false \
+	-dDownsampleGrayImages=false \
+	-dDownsampleColorImages=false \
+	-dAutoFilterMonoImages=false \
+	-dAutoFilterGrayImages=false \
+	-dAutoFilterColorImages=false \
+	-dMonoImageFilter=/FlateEncode \
+	-dGrayImageFilter=/FlateEncode \
+	-dColorImageFilter=/FlateEncode"
+else
+	options="-dPDFSETTINGS=/prepress \
+	-r600 \
+	-dDownsampleMonoImages=true \
+	-dDownsampleGrayImages=true \
+	-dDownsampleColorImages=true \
+	-dMonoImageDownsampleThreshold=2.0 \
+	-dGrayImageDownsampleThreshold=1.5 \
+	-dColorImageDownsampleThreshold=1.5 \
+	-dMonoImageResolution=600 \
+	-dGrayImageResolution=600 \
+	-dColorImageResolution=600 \
+	-dAutoFilterMonoImages=false \
+	-dMonoImageFilter=/FlateEncode \
+	-dAutoFilterGrayImages=true \
+	-dAutoFilterColorImages=true"
+fi
+
+if [ $rot == 1 ] +then + options="$options -dAutoRotatePages=/PageByPage"
+fi
+
+if [ $eps == 1 ] +then + options="$options -dEPSCrop"
+fi
+
+set -x
+
+if [ $a4 == 1 ] +then + # Resize from A4 to letter size + psresize -Pa4 -pletter "$ifilename" myps2pdf.temp.ps
+	ifilename=myps2pdf.temp.ps
+fi
+
+gs -q -dSAFER -dNOPAUSE -dBATCH  \
+	-sDEVICE=pdfwrite -sPAPERSIZE=letter -sOutputFile=myps2pdf.temp.pdf \
+	-dCompatibilityLevel=1.3 \
+	$options \ + -dMaxSubsetPct=100 \ + -dSubsetFonts=true \ + -dEmbedAllFonts=true \ + -dColorConversionStrategy=/LeaveColorUnchanged \ + -dDoThumbnails=true \ + -dPreserveEPSInfo=true \ + -c .setpdfwrite -f "$ifilename"
+
+if [ $do_opt == 1 ] +then + pdfopt myps2pdf.temp.pdf$ofilename
+else
+	mv myps2pdf.temp.pdf $ofilename +fi +rm -f myps2pdf.temp.pdf myps2pdf.temp.ps diff -up luasocket-2.0.2/gem/t1lf.txt.21 luasocket-2.0.2/gem/t1lf.txt --- luasocket-2.0.2/gem/t1lf.txt.21 2013-05-10 13:49:50.358679160 -0400 +++ luasocket-2.0.2/gem/t1lf.txt 2013-05-10 13:49:50.358679160 -0400 @@ -0,0 +1,5 @@ +this is a test file +it should have been saved as lf eol +but t1.lua will convert it to crlf eol +otherwise it is broken! + diff -up luasocket-2.0.2/gem/t1.lua.21 luasocket-2.0.2/gem/t1.lua --- luasocket-2.0.2/gem/t1.lua.21 2013-05-10 13:49:50.358679160 -0400 +++ luasocket-2.0.2/gem/t1.lua 2013-05-10 13:49:50.358679160 -0400 @@ -0,0 +1,25 @@ +source = {} +sink = {} +pump = {} +filter = {} + +-- source.chain +dofile("ex6.lua") + +-- source.file +dofile("ex5.lua") + +-- normalize +require"gem" +eol = gem.eol +dofile("ex2.lua") + +-- sink.file +require"ltn12" +sink.file = ltn12.sink.file + +-- pump.all +dofile("ex10.lua") + +-- run test +dofile("ex1.lua") diff -up luasocket-2.0.2/gem/t2gt.qp.21 luasocket-2.0.2/gem/t2gt.qp --- luasocket-2.0.2/gem/t2gt.qp.21 2013-05-10 13:49:50.358679160 -0400 +++ luasocket-2.0.2/gem/t2gt.qp 2013-05-10 13:49:50.358679160 -0400 @@ -0,0 +1,5 @@ +esse =E9 um texto com acentos +quoted-printable tem que quebrar linhas longas, com mais que 76 linhas de t= +exto +fora que as quebras de linhas t=EAm que ser normalizadas +vamos ver o que d=E1 isso aqui diff -up luasocket-2.0.2/gem/t2.lua.21 luasocket-2.0.2/gem/t2.lua --- luasocket-2.0.2/gem/t2.lua.21 2013-05-10 13:49:50.358679160 -0400 +++ luasocket-2.0.2/gem/t2.lua 2013-05-10 13:49:50.358679160 -0400 @@ -0,0 +1,36 @@ +source = {} +sink = {} +pump = {} +filter = {} + +-- filter.chain +dofile("ex3.lua") + +-- normalize +require"gem" +eol = gem.eol +dofile("ex2.lua") + +-- encode +require"mime" +encode = mime.encode + +-- wrap +wrap = mime.wrap + +-- source.chain +dofile("ex6.lua") + +-- source.file +dofile("ex5.lua") + +-- sink.file +require"ltn12" +sink.file = ltn12.sink.file + +-- pump.all +dofile("ex10.lua") + +-- run test +CRLF = "\013\010" +dofile("ex4.lua") diff -up luasocket-2.0.2/gem/t2.txt.21 luasocket-2.0.2/gem/t2.txt --- luasocket-2.0.2/gem/t2.txt.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/gem/t2.txt 2013-05-10 13:49:50.358679160 -0400 @@ -0,0 +1,4 @@ +esse ж um texto com acentos +quoted-printable tem que quebrar linhas longas, com mais que 76 linhas de texto +fora que as quebras de linhas tЖm que ser normalizadas +vamos ver o que dр isso aqui diff -up luasocket-2.0.2/gem/t3.lua.21 luasocket-2.0.2/gem/t3.lua --- luasocket-2.0.2/gem/t3.lua.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/gem/t3.lua 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,25 @@ +source = {} +sink = {} +pump = {} +filter = {} + +-- source.file +dofile("ex5.lua") + +-- sink.table +dofile("ex7.lua") + +-- sink.chain +require"ltn12" +sink.chain = ltn12.sink.chain + +-- normalize +require"gem" +eol = gem.eol +dofile("ex2.lua") + +-- pump.all +dofile("ex10.lua") + +-- run test +dofile("ex8.lua") diff -up luasocket-2.0.2/gem/t4.lua.21 luasocket-2.0.2/gem/t4.lua --- luasocket-2.0.2/gem/t4.lua.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/gem/t4.lua 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,10 @@ +source = {} +sink = {} +pump = {} +filter = {} + +-- source.file +dofile("ex5.lua") + +-- run test +dofile("ex9.lua") diff -up luasocket-2.0.2/gem/t5.lua.21 luasocket-2.0.2/gem/t5.lua --- luasocket-2.0.2/gem/t5.lua.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/gem/t5.lua 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,30 @@ +source = {} +sink = {} +pump = {} +filter = {} + +-- source.chain +dofile("ex6.lua") + +-- source.file +dofile("ex5.lua") + +-- encode +require"mime" +encode = mime.encode + +-- sink.chain +require"ltn12" +sink.chain = ltn12.sink.chain + +-- wrap +wrap = mime.wrap + +-- sink.file +sink.file = ltn12.sink.file + +-- pump.all +dofile("ex10.lua") + +-- run test +dofile("ex11.lua") diff -up luasocket-2.0.2/gem/test.lua.21 luasocket-2.0.2/gem/test.lua --- luasocket-2.0.2/gem/test.lua.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/gem/test.lua 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,46 @@ +function readfile(n) + local f = io.open(n, "rb") + local s = f:read("*a") + f:close() + return s +end + +lf = readfile("t1lf.txt") +os.remove("t1crlf.txt") +os.execute("lua t1.lua < t1lf.txt > t1crlf.txt") +crlf = readfile("t1crlf.txt") +assert(crlf == string.gsub(lf, "\010", "\013\010"), "broken") + +gt = readfile("t2gt.qp") +os.remove("t2.qp") +os.execute("lua t2.lua < t2.txt > t2.qp") +t2 = readfile("t2.qp") +assert(gt == t2, "broken") + +os.remove("t1crlf.txt") +os.execute("lua t3.lua < t1lf.txt > t1crlf.txt") +crlf = readfile("t1crlf.txt") +assert(crlf == string.gsub(lf, "\010", "\013\010"), "broken") + +t = readfile("test.lua") +os.execute("lua t4.lua < test.lua > t") +t2 = readfile("t") +assert(t == t2, "broken") + +os.remove("output.b64") +gt = readfile("gt.b64") +os.execute("lua t5.lua") +t5 = readfile("output.b64") +assert(gt == t5, "failed") + +print("1 2 5 6 10 passed") +print("2 3 4 5 6 10 passed") +print("2 5 6 7 8 10 passed") +print("5 9 passed") +print("5 6 10 11 passed") + +os.remove("t") +os.remove("t2.qp") +os.remove("t1crlf.txt") +os.remove("t11.b64") +os.remove("output.b64") diff -up luasocket-2.0.2/LICENSE.21 luasocket-2.0.2/LICENSE --- luasocket-2.0.2/LICENSE.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/LICENSE 2013-05-10 13:49:50.359679160 -0400 @@ -1,5 +1,5 @@ -LuaSocket 2.0.2 license -Copyright Е 2004-2007 Diego Nehab +LuaSocket 2.1 license +Copyright Е 2004-2012 Diego Nehab Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff -up luasocket-2.0.2/logo.ps.21 luasocket-2.0.2/logo.ps --- luasocket-2.0.2/logo.ps.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/logo.ps 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,210 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: Lua logo +%%Creator: lua@tecgraf.puc-rio.br +%%CreationDate: Wed Nov 29 19:04:04 EDT 2000 +%%BoundingBox: -45 0 1035 1080 +%%Pages: 1 +%%EndComments +%%EndProlog + +%------------------------------------------------------------------------------ +% +% Copyright (C) 1998-2000. All rights reserved. +% Graphic design by Alexandre Nakonechny (nako@openlink.com.br). +% PostScript programming by the Lua team (lua@tecgraf.puc-rio.br). +% +% Permission is hereby granted, without written agreement and without license +% or royalty fees, to use, copy, and distribute this logo for any purpose, +% including commercial applications, subject to the following conditions: +% +% * The origin of this logo must not be misrepresented; you must not +% claim that you drew the original logo. We recommend that you give credit +% to the graphics designer in all printed matter that includes the logo. +% +% * The only modification you can make is to adapt the orbiting text to +% your product name. +% +% * The logo can be used in any scale as long as the relative proportions +% of its elements are maintained. +% +%------------------------------------------------------------------------------ + +/LABEL (tekcoS) def + +%-- DO NOT CHANGE ANYTHING BELOW THIS LINE ------------------------------------ + +/PLANETCOLOR {0 0 0.5 setrgbcolor} bind def +/HOLECOLOR {1.0 setgray} bind def +/ORBITCOLOR {0.5 setgray} bind def +/LOGOFONT {/Helvetica 0.90} def +/LABELFONT {/Helvetica 0.36} def + +%------------------------------------------------------------------------------ + +/MOONCOLOR {PLANETCOLOR} bind def +/LOGOCOLOR {HOLECOLOR} bind def +/LABELCOLOR {ORBITCOLOR} bind def + +/LABELANGLE 325 def +/LOGO (Lua) def + +/DASHANGLE 10 def +/HALFDASHANGLE DASHANGLE 2 div def + +% moon radius. planet radius is 1. +/r 1 2 sqrt 2 div sub def + +/D {0 360 arc fill} bind def +/F {exch findfont exch scalefont setfont} bind def + +% place it nicely on the paper +/RESOLUTION 1024 def +RESOLUTION 2 div dup translate +RESOLUTION 2 div 2 sqrt div dup scale + +%-------------------------------------------------------------------- planet -- +PLANETCOLOR +0 0 1 D + +%---------------------------------------------------------------------- hole -- +HOLECOLOR +1 2 r mul sub dup r D + +%---------------------------------------------------------------------- moon -- +MOONCOLOR +1 1 r D + +%---------------------------------------------------------------------- logo -- +LOGOCOLOR +LOGOFONT +F +LOGO stringwidth pop 2 div neg +-0.5 moveto +LOGO show + +%------------------------------------------------------------------------------ +% based on code from Blue Book Program 10, on pages 167--169 +% available at ftp://ftp.adobe.com/pub/adobe/displaypostscript/bluebook.shar + +% str ptsize centerangle radius outsidecircletext -- +/outsidecircletext { + circtextdict begin + /radius exch def + /centerangle exch def + /ptsize exch def + /str exch def + + gsave + str radius ptsize findhalfangle + centerangle + add rotate + str + { /charcode exch def + ( ) dup 0 charcode put outsideplacechar + } forall + + grestore + end +} def + +% string radius ptsize findhalfangle halfangle +/findhalfangle { + 4 div add + exch + stringwidth pop 2 div + exch + 2 mul 3.1415926535 mul div 360 mul +} def + +/circtextdict 16 dict def +circtextdict begin + + /outsideplacechar { + /char exch def + /halfangle char radius ptsize findhalfangle def + gsave + halfangle neg rotate + 1.4 0 translate + 90 rotate + char stringwidth pop 2 div neg 0 moveto + char show + grestore + halfangle 2 mul neg rotate + } def + +end + +%--------------------------------------------------------------------- label -- +LABELFONT +F + +/LABELSIZE LABELFONT exch pop def +/LABELRADIUS LABELSIZE 3 div 1 r add sub neg 1.02 mul def + + +/HALFANGLE + LABEL LABELRADIUS LABELSIZE findhalfangle + HALFDASHANGLE div ceiling HALFDASHANGLE mul +def + +/LABELANGLE + 60 LABELANGLE HALFANGLE sub + lt + { + HALFANGLE + HALFANGLE DASHANGLE div floor DASHANGLE mul + eq + {LABELANGLE DASHANGLE div ceiling DASHANGLE mul} + {LABELANGLE HALFDASHANGLE sub DASHANGLE div round DASHANGLE mul HALFDASHANGLE add} + ifelse + } + {HALFANGLE 60 add} + ifelse +def + +LABELCOLOR +LABEL +LABELSIZE +LABELANGLE +LABELRADIUS +outsidecircletext + +%--------------------------------------------------------------------- orbit -- +ORBITCOLOR +0.03 setlinewidth +[1 r add 3.1415926535 180 div HALFDASHANGLE mul mul] 0 setdash +newpath +0 0 +1 r add +3 copy +30 +LABELANGLE HALFANGLE add +arcn +stroke +60 +LABELANGLE HALFANGLE sub +2 copy +lt {arc stroke} {4 {pop} repeat} ifelse + +%------------------------------------------------------------------ copyright -- +/COPYRIGHT +(Graphic design by A. Nakonechny. Copyright (c) 1998, All rights reserved.) +def + +LABELCOLOR +LOGOFONT +32 div +F +2 sqrt 0.99 mul +dup +neg +moveto +COPYRIGHT +90 rotate +%show + +%---------------------------------------------------------------------- done -- +showpage + +%%Trailer +%%EOF diff -up luasocket-2.0.2/ltn012.wiki.21 luasocket-2.0.2/ltn012.wiki --- luasocket-2.0.2/ltn012.wiki.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/ltn012.wiki 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,393 @@ +===Filters, sources and sinks: design, motivation and examples=== +==or Functional programming for the rest of us== +by DiegoNehab + +{{{ + +}}} + +===Abstract=== +Certain operations can be implemented in the form of filters. A filter is a function that processes data received in consecutive function calls, returning partial results chunk by chunk. Examples of operations that can be implemented as filters include the end-of-line normalization for text, Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and there are many others. Filters become even more powerful when we allow them to be chained together to create composite filters. Filters can be seen as middle nodes in a chain of data transformations. Sources an sinks are the corresponding end points of these chains. A source is a function that produces data, chunk by chunk, and a sink is a function that takes data, chunk by chunk. In this technical note, we define an elegant interface for filters, sources, sinks and chaining. We evolve our interface progressively, until we reach a high degree of generality. We discuss difficulties that arise during the implementation of this interface and we provide solutions and examples. + +===Introduction=== + +Applications sometimes have too much information to process to fit in memory and are thus forced to process data in smaller parts. Even when there is enough memory, processing all the data atomically may take long enough to frustrate a user that wants to interact with the application. Furthermore, complex transformations can often be defined as series of simpler operations. Several different complex transformations might share the same simpler operations, so that an uniform interface to combine them is desirable. The following concepts constitute our solution to these problems. + +''Filters'' are functions that accept successive chunks of input, and produce successive chunks of output. Furthermore, the result of concatenating all the output data is the same as the result of applying the filter over the concatenation of the input data. As a consequence, boundaries are irrelevant: filters have to handle input data split arbitrarily by the user. + +A ''chain'' is a function that combines the effect of two (or more) other functions, but whose interface is indistinguishable from the interface of one of its components. Thus, a chained filter can be used wherever an atomic filter can be used. However, its effect on data is the combined effect of its component filters. Note that, as a consequence, chains can be chained themselves to create arbitrarily complex operations that can be used just like atomic operations. + +Filters can be seen as internal nodes in a network through which data flows, potentially being transformed along its way. Chains connect these nodes together. To complete the picture, we need ''sources'' and ''sinks'' as initial and final nodes of the network, respectively. Less abstractly, a source is a function that produces new data every time it is called. On the other hand, sinks are functions that give a final destination to the data they receive. Naturally, sources and sinks can be chained with filters. + +Finally, filters, chains, sources, and sinks are all passive entities: they need to be repeatedly called in order for something to happen. ''Pumps'' provide the driving force that pushes data through the network, from a source to a sink. + + Hopefully, these concepts will become clear with examples. In the following sections, we start with simplified interfaces, which we improve several times until we can find no obvious shortcomings. The evolution we present is not contrived: it follows the steps we followed ourselves as we consolidated our understanding of these concepts. + +== A concrete example == + +Some data transformations are easier to implement as filters than others. Examples of operations that can be implemented as filters include the end-of-line normalization for text, the Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and many others. Let's use the end-of-line normalization as an example to define our initial filter interface. We later discuss why the implementation might not be trivial. + +Assume we are given text in an unknown end-of-line convention (including possibly mixed conventions) out of the commonly found Unix (LF), Mac OS (CR), and DOS (CRLF) conventions. We would like to be able to write code like the following: + {{{ +input = source.chain(source.file(io.stdin), normalize("\r\n")) +output = sink.file(io.stdout) +pump(input, output) +}}} + +This program should read data from the standard input stream and normalize the end-of-line markers to the canonic CRLF marker defined by the MIME standard, finally sending the results to the standard output stream. For that, we use a ''file source'' to produce data from standard input, and chain it with a filter that normalizes the data. The pump then repeatedly gets data from the source, and moves it to the ''file sink'' that sends it to standard output. + +To make the discussion even more concrete, we start by discussing the implementation of the normalization filter. The {{normalize}} ''factory'' is a function that creates such a filter. Our initial filter interface is as follows: the filter receives a chunk of input data, and returns a chunk of processed data. When there is no more input data, the user notifies the filter by invoking it with a {{nil}} chunk. The filter then returns the final chunk of processed data. + +Although the interface is extremely simple, the implementation doesn't seem so obvious. Any filter respecting this interface needs to keep some kind of context between calls. This is because chunks can be broken between the CR and LF characters marking the end of a line. This need for context storage is what motivates the use of factories: each time the factory is called, it returns a filter with its own context so that we can have several independent filters being used at the same time. For the normalization filter, we know that the obvious solution (i.e. concatenating all the input into the context before producing any output) is not good enough, so we will have to find another way. + +We will break the implementation in two parts: a low-level filter, and a factory of high-level filters. The low-level filter will be implemented in C and will not carry any context between function calls. The high-level filter factory, implemented in Lua, will create and return a high-level filter that keeps whatever context the low-level filter needs, but isolates the user from its internal details. That way, we take advantage of C's efficiency to perform the dirty work, and take advantage of Lua's simplicity for the bookkeeping. + +==The Lua part of the implementation== + +Below is the implementation of the factory of high-level end-of-line normalization filters: + {{{ +function filter.cycle(low, ctx, extra) + return function(chunk) + local ret + ret, ctx = low(ctx, chunk, extra) + return ret + end +end + +function normalize(marker) + return cycle(eol, 0, marker) +end +}}} + +The {{normalize}} factory simply calls a more generic factory, the {{cycle}} factory. This factory receives a low-level filter, an initial context and some extra value and returns the corresponding high-level filter. Each time the high level filer is called with a new chunk, it calls the low-level filter passing the previous context, the new chunk and the extra argument. The low-level filter produces the chunk of processed data and a new context. Finally, the high-level filter updates its internal context and returns the processed chunk of data to the user. It is the low-level filter that does all the work. Notice that this implementation takes advantage of the Lua 5.0 lexical scoping rules to store the context locally, between function calls. + +Moving to the low-level filter, we notice there is no perfect solution to the end-of-line marker normalization problem itself. The difficulty comes from an inherent ambiguity on the definition of empty lines within mixed input. However, the following solution works well for any consistent input, as well as for non-empty lines in mixed input. It also does a reasonable job with empty lines and serves as a good example of how to implement a low-level filter. + +Here is what we do: CR and LF are considered candidates for line break. We issue ''one'' end-of-line line marker if one of the candidates is seen alone, or followed by a ''different'' candidate. That is, CR&nbsp;CR and LF&nbsp;LF issue two end of line markers each, but CR&nbsp;LF and LF&nbsp;CR issue only one marker. This idea takes care of Mac OS, Mac OS X, VMS and Unix, DOS and MIME, as well as probably other more obscure conventions. + +==The C part of the implementation== + +The low-level filter is divided into two simple functions. The inner function actually does the conversion. It takes each input character in turn, deciding what to output and how to modify the context. The context tells if the last character seen was a candidate and, if so, which candidate it was. + {{{ +#define candidate(c) (c == CR || c == LF) +static int process(int c, int last, const char *marker, luaL_Buffer *buffer) { + if (candidate(c)) { + if (candidate(last)) { + if (c == last) luaL_addstring(buffer, marker); + return 0; + } else { + luaL_addstring(buffer, marker); + return c; + } + } else { + luaL_putchar(buffer, c); + return 0; + } +} +}}} + +The inner function makes use of Lua's auxiliary library's buffer interface for its efficiency and ease of use. The outer function simply interfaces with Lua. It receives the context and the input chunk (as well as an optional end-of-line marker), and returns the transformed output and the new context. + {{{ +static int eol(lua_State *L) { + int ctx = luaL_checkint(L, 1); + size_t isize = 0; + const char *input = luaL_optlstring(L, 2, NULL, &isize); + const char *last = input + isize; + const char *marker = luaL_optstring(L, 3, CRLF); + luaL_Buffer buffer; + luaL_buffinit(L, &amp;buffer); + if (!input) { + lua_pushnil(L); + lua_pushnumber(L, 0); + return 2; + } + while (input &lt; last) + ctx = process(*input++, ctx, marker, &amp;buffer); + luaL_pushresult(&amp;buffer); + lua_pushnumber(L, ctx); + return 2; +} +}}} + +Notice that if the input chunk is {{nil}}, the operation is considered to be finished. In that case, the loop will not execute a single time and the context is reset to the initial state. This allows the filter to be reused indefinitely. It is a good idea to write filters like this, when possible. + +Besides the end-of-line normalization filter shown above, many other filters can be implemented with the same ideas. Examples include Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing etc. The challenging part is to decide what will be the context. For line breaking, for instance, it could be the number of bytes left in the current line. For Base64 encoding, it could be the bytes that remain in the division of the input into 3-byte atoms. + +===Chaining=== + +Filters become more powerful when the concept of chaining is introduced. Suppose you have a filter for Quoted-Printable encoding and you want to encode some text. According to the standard, the text has to be normalized into its canonic form prior to encoding. A nice interface that simplifies this task is a factory that creates a composite filter that passes data through multiple filters, but that can be used wherever a primitive filter is used. + {{{ +local function chain2(f1, f2) + return function(chunk) + local ret = f2(f1(chunk)) + if chunk then return ret + else return ret .. f2() end + end +end + +function filter.chain(...) + local arg = {...} + local f = arg[1] + for i = 2, #arg do + f = chain2(f, arg[i]) + end + return f +end + +local chain = filter.chain(normalize("\r\n"), encode("quoted-printable")) +while 1 do + local chunk = io.read(2048) + io.write(chain(chunk)) + if not chunk then break end +end +}}} + +The chaining factory is very simple. All it does is return a function that passes data through all filters and returns the result to the user. It uses the simpler auxiliary function that knows how to chain two filters together. In the auxiliary function, special care must be taken if the chunk is final. This is because the final chunk notification has to be pushed through both filters in turn. Thanks to the chain factory, it is easy to perform the Quoted-Printable conversion, as the above example shows. + +===Sources, sinks, and pumps=== + +As we noted in the introduction, the filters we introduced so far act as the internal nodes in a network of transformations. Information flows from node to node (or rather from one filter to the next) and is transformed on its way out. Chaining filters together is the way we found to connect nodes in the network. But what about the end nodes? In the beginning of the network, we need a node that provides the data, a source. In the end of the network, we need a node that takes in the data, a sink. + +==Sources== + +We start with two simple sources. The first is the {{empty}} source: It simply returns no data, possibly returning an error message. The second is the {{file}} source, which produces the contents of a file in a chunk by chunk fashion, closing the file handle when done. + {{{ +function source.empty(err) + return function() + return nil, err + end +end + +function source.file(handle, io_err) + if handle then + return function() + local chunk = handle:read(2048) + if not chunk then handle:close() end + return chunk + end + else return source.empty(io_err or "unable to open file") end +end +}}} + +A source returns the next chunk of data each time it is called. When there is no more data, it just returns {{nil}}. If there is an error, the source can inform the caller by returning {{nil}} followed by an error message. Adrian Sietsma noticed that, although not on purpose, the interface for sources is compatible with the idea of iterators in Lua 5.0. That is, a data source can be nicely used in conjunction with {{for}} loops. Using our file source as an iterator, we can rewrite our first example: + {{{ +local process = normalize("\r\n") +for chunk in source.file(io.stdin) do + io.write(process(chunk)) +end +io.write(process(nil)) +}}} + +Notice that the last call to the filter obtains the last chunk of processed data. The loop terminates when the source returns {{nil}} and therefore we need that final call outside of the loop. + +==Maintaining state between calls== + +It is often the case that a source needs to change its behavior after some event. One simple example would be a file source that wants to make sure it returns {{nil}} regardless of how many times it is called after the end of file, avoiding attempts to read past the end of the file. Another example would be a source that returns the contents of several files, as if they were concatenated, moving from one file to the next until the end of the last file is reached. + +One way to implement this kind of source is to have the factory declare extra state variables that the source can use via lexical scoping. Our file source could set the file handle itself to {{nil}} when it detects the end-of-file. Then, every time the source is called, it could check if the handle is still valid and act accordingly: + {{{ +function source.file(handle, io_err) + if handle then + return function() + if not handle then return nil end + local chunk = handle:read(2048) + if not chunk then + handle:close() + handle = nil + end + return chunk + end + else return source.empty(io_err or "unable to open file") end +end +}}} + +Another way to implement this behavior involves a change in the source interface to makes it more flexible. Let's allow a source to return a second value, besides the next chunk of data. If the returned chunk is {{nil}}, the extra return value tells us what happened. A second {{nil}} means that there is just no more data and the source is empty. Any other value is considered to be an error message. On the other hand, if the chunk was ''not'' {{nil}}, the second return value tells us whether the source wants to be replaced. If it is {{nil}}, we should proceed using the same source. Otherwise it has to be another source, which we have to use from then on, to get the remaining data. + +This extra freedom is good for someone writing a source function, but it is a pain for those that have to use it. Fortunately, given one of these ''fancy'' sources, we can transform it into a simple source that never needs to be replaced, using the following factory. + {{{ +function source.simplify(src) + return function() + local chunk, err_or_new = src() + src = err_or_new or src + if not chunk then return nil, err_or_new + else return chunk end + end +end +}}} + +The simplification factory allows us to write fancy sources and use them as if they were simple. Therefore, our next functions will only produce simple sources, and functions that take sources will assume they are simple. + +Going back to our file source, the extended interface allows for a more elegant implementation. The new source just asks to be replaced by an empty source as soon as there is no more data. There is no repeated checking of the handle. To make things simpler to the user, the factory itself simplifies the the fancy file source before returning it to the user: + {{{ +function source.file(handle, io_err) + if handle then + return source.simplify(function() + local chunk = handle:read(2048) + if not chunk then + handle:close() + return "", source.empty() + end + return chunk + end) + else return source.empty(io_err or "unable to open file") end +end +}}} + +We can make these ideas even more powerful if we use a new feature of Lua 5.0: coroutines. Coroutines suffer from a great lack of advertisement, and I am going to play my part here. Just like lexical scoping, coroutines taste odd at first, but once you get used with the concept, it can save your day. I have to admit that using coroutines to implement our file source would be overkill, so let's implement a concatenated source factory instead. + {{{ +function source.cat(...) + local arg = {...} + local co = coroutine.create(function() + local i = 1 + while i <= #arg do + local chunk, err = arg[i]() + if chunk then coroutine.yield(chunk) + elseif err then return nil, err + else i = i + 1 end + end + end) + return function() + return shift(coroutine.resume(co)) + end +end +}}} + +The factory creates two functions. The first is an auxiliary that does all the work, in the form of a coroutine. It reads a chunk from one of the sources. If the chunk is {{nil}}, it moves to the next source, otherwise it just yields returning the chunk. When it is resumed, it continues from where it stopped and tries to read the next chunk. The second function is the source itself, and just resumes the execution of the auxiliary coroutine, returning to the user whatever chunks it returns (skipping the first result that tells us if the coroutine terminated). Imagine writing the same function without coroutines and you will notice the simplicity of this implementation. We will use coroutines again when we make the filter interface more powerful. + +==Chaining Sources== + +What does it mean to chain a source with a filter? The most useful interpretation is that the combined source-filter is a new source that produces data and passes it through the filter before returning it. Here is a factory that does it: + {{{ +function source.chain(src, f) + return source.simplify(function() + local chunk, err = src() + if not chunk then return f(nil), source.empty(err) + else return f(chunk) end + end) +end +}}} + +Our motivating example in the introduction chains a source with a filter. The idea of chaining a source with a filter is useful when one thinks about functions that might get their input data from a source. By chaining a simple source with one or more filters, the same function can be provided with filtered data even though it is unaware of the filtering that is happening behind its back. + +==Sinks== + +Just as we defined an interface for an initial source of data, we can also define an interface for a final destination of data. We call any function respecting that interface a ''sink''. Below are two simple factories that return sinks. The table factory creates a sink that stores all obtained data into a table. The data can later be efficiently concatenated into a single string with the {{table.concat}} library function. As another example, we introduce the {{null}} sink: A sink that simply discards the data it receives. + {{{ +function sink.table(t) + t = t or {} + local f = function(chunk, err) + if chunk then table.insert(t, chunk) end + return 1 + end + return f, t +end + +local function null() + return 1 +end + +function sink.null() + return null +end +}}} + +Sinks receive consecutive chunks of data, until the end of data is notified with a {{nil}} chunk. An error is notified by an extra argument giving an error message after the {{nil}} chunk. If a sink detects an error itself and wishes not to be called again, it should return {{nil}}, optionally followed by an error message. A return value that is not {{nil}} means the source will accept more data. Finally, just as sources can choose to be replaced, so can sinks, following the same interface. Once again, it is easy to implement a {{sink.simplify}} factory that transforms a fancy sink into a simple sink. + +As an example, let's create a source that reads from the standard input, then chain it with a filter that normalizes the end-of-line convention and let's use a sink to place all data into a table, printing the result in the end. + {{{ +local load = source.chain(source.file(io.stdin), normalize("\r\n")) +local store, t = sink.table() +while 1 do + local chunk = load() + store(chunk) + if not chunk then break end +end +print(table.concat(t)) +}}} + +Again, just as we created a factory that produces a chained source-filter from a source and a filter, it is easy to create a factory that produces a new sink given a sink and a filter. The new sink passes all data it receives through the filter before handing it in to the original sink. Here is the implementation: + {{{ +function sink.chain(f, snk) + return function(chunk, err) + local r, e = snk(f(chunk)) + if not r then return nil, e end + if not chunk then return snk(nil, err) end + return 1 + end +end +}}} + +==Pumps== + +There is a while loop that has been around for too long in our examples. It's always there because everything that we designed so far is passive. Sources, sinks, filters: None of them will do anything on their own. The operation of pumping all data a source can provide into a sink is so common that we will provide a couple helper functions to do that for us. + {{{ +function pump.step(src, snk) + local chunk, src_err = src() + local ret, snk_err = snk(chunk, src_err) + return chunk and ret and not src_err and not snk_err, src_err or snk_err +end + +function pump.all(src, snk, step) + step = step or pump.step + while true do + local ret, err = step(src, snk) + if not ret then return not err, err end + end +end +}}} + +The {{pump.step}} function moves one chunk of data from the source to the sink. The {{pump.all}} function takes an optional {{step}} function and uses it to pump all the data from the source to the sink. We can now use everything we have to write a program that reads a binary file from disk and stores it in another file, after encoding it to the Base64 transfer content encoding: + {{{ +local load = source.chain( + source.file(io.open("input.bin", "rb")), + encode("base64") +) +local store = sink.chain( + wrap(76), + sink.file(io.open("output.b64", "w")), +) +pump.all(load, store) +}}} + +The way we split the filters here is not intuitive, on purpose. Alternatively, we could have chained the Base64 encode filter and the line-wrap filter together, and then chain the resulting filter with either the file source or the file sink. It doesn't really matter. + +===One last important change=== + +Turns out we still have a problem. When David Burgess was writing his gzip filter, he noticed that the decompression filter can explode a small input chunk into a huge amount of data. Although we wished we could ignore this problem, we soon agreed we couldn't. The only solution is to allow filters to return partial results, and that is what we chose to do. After invoking the filter to pass input data, the user now has to loop invoking the filter to find out if it has more output data to return. Note that these extra calls can't pass more data to the filter. + +More specifically, after passing a chunk of input data to a filter and collecting the first chunk of output data, the user invokes the filter repeatedly, passing the empty string, to get extra output chunks. When the filter itself returns an empty string, the user knows there is no more output data, and can proceed to pass the next input chunk. In the end, after the user passes a {{nil}} notifying the filter that there is no more input data, the filter might still have produced too much output data to return in a single chunk. The user has to loop again, this time passing {{nil}} each time, until the filter itself returns {{nil}} to notify the user it is finally done. + +Most filters won't need this extra freedom. Fortunately, the new filter interface is easy to implement. In fact, the end-of-line translation filter we created in the introduction already conforms to it. On the other hand, the chaining function becomes much more complicated. If it wasn't for coroutines, I wouldn't be happy to implement it. Let me know if you can find a simpler implementation that does not use coroutines! + {{{ +local function chain2(f1, f2) + local co = coroutine.create(function(chunk) + while true do + local filtered1 = f1(chunk) + local filtered2 = f2(filtered1) + local done2 = filtered1 and "" + while true do + if filtered2 == "" or filtered2 == nil then break end + coroutine.yield(filtered2) + filtered2 = f2(done2) + end + if filtered1 == "" then chunk = coroutine.yield(filtered1) + elseif filtered1 == nil then return nil + else chunk = chunk and "" end + end + end) + return function(chunk) + local _, res = coroutine.resume(co, chunk) + return res + end +end +}}} + +Chaining sources also becomes more complicated, but a similar solution is possible with coroutines. Chaining sinks is just as simple as it has always been. Interestingly, these modifications do not have a measurable negative impact in the the performance of filters that didn't need the added flexibility. They do severely improve the efficiency of filters like the gzip filter, though, and that is why we are keeping them. + +===Final considerations=== + +These ideas were created during the development of {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket] 2.0, and are available as the LTN12 module. As a result, {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket] implementation was greatly simplified and became much more powerful. The MIME module is especially integrated to LTN12 and provides many other filters. We felt these concepts deserved to be made public even to those that don't care about {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket], hence the LTN. + +One extra application that deserves mentioning makes use of an identity filter. Suppose you want to provide some feedback to the user while a file is being downloaded into a sink. Chaining the sink with an identity filter (a filter that simply returns the received data unaltered), you can update a progress counter on the fly. The original sink doesn't have to be modified. Another interesting idea is that of a T sink: A sink that sends data to two other sinks. In summary, there appears to be enough room for many other interesting ideas. + +In this technical note we introduced filters, sources, sinks, and pumps. These are useful tools for data processing in general. Sources provide a simple abstraction for data acquisition. Sinks provide an abstraction for final data destinations. Filters define an interface for data transformations. The chaining of filters, sources and sinks provides an elegant way to create arbitrarily complex data transformation from simpler transformations. Pumps just put the machinery to work. diff -up luasocket-2.0.2/ltn013.wiki.21 luasocket-2.0.2/ltn013.wiki --- luasocket-2.0.2/ltn013.wiki.21 2013-05-10 13:49:50.359679160 -0400 +++ luasocket-2.0.2/ltn013.wiki 2013-05-10 13:49:50.359679160 -0400 @@ -0,0 +1,194 @@ +===Using finalized exceptions=== +==or How to get rid of all those if statements== +by DiegoNehab + +{{{ + +}}} + +===Abstract=== +This little LTN describes a simple exception scheme that greatly simplifies error checking in Lua programs. All the needed functionality ships standard with Lua, but is hidden between the {{assert}} and {{pcall}} functions. To make it more evident, we stick to a convenient standard (you probably already use anyways) for Lua function return values, and define two very simple helper functions (either in C or in Lua itself). + +===Introduction=== + +Most Lua functions return {{nil}} in case of error, followed by a message describing the error. If you don't use this convention, you probably have good reasons. Hopefully, after reading on, you will realize your reasons are not good enough. + +If you are like me, you hate error checking. Most nice little code snippets that look beautiful when you first write them lose some of their charm when you add all that error checking code. Yet, error checking is as important as the rest of the code. How sad. + +Even if you stick to a return convention, any complex task involving several function calls makes error checking both boring and error-prone (do you see the ''error'' below?) + {{{ +function task(arg1, arg2, ...) + local ret1, err = task1(arg1) + if not ret1 then + cleanup1() + return nil, error + end + local ret2, err = task2(arg2) + if not ret then + cleanup2() + return nil, error + end + ... +end +}}} + +The standard {{assert}} function provides an interesting alternative. To use it, simply nest every function call to be error checked with a call to {{assert}}. The {{assert}} function checks the value of its first argument. If it is {{nil}}, {{assert}} throws the second argument as an error message. Otherwise, {{assert}} lets all arguments through as if had not been there. The idea greatly simplifies error checking: + {{{ +function task(arg1, arg2, ...) + local ret1 = assert(task1(arg1)) + local ret2 = assert(task2(arg2)) + ... +end +}}} + +If any task fails, the execution is aborted by {{assert}} and the error message is displayed to the user as the cause of the problem. If no error happens, the task completes as before. There isn't a single {{if}} statement and this is great. However, there are some problems with the idea. + +First, the topmost {{task}} function doesn't respect the protocol followed by the lower-level tasks: It raises an error instead of returning {{nil}} followed by the error messages. Here is where the standard {{pcall}} comes in handy. + {{{ +function xtask(arg1, arg2, ...) + local ret1 = assert(task1(arg1)) + local ret2 = assert(task2(arg2)) + ... +end + +function task(arg1, arg2, ...) + local ok, ret_or_err = pcall(xtask, arg1, arg2, ...) + if ok then return ret_or_err + else return nil, ret_or_err end +end +}}} + +Our new {{task}} function is well behaved. {{Pcall}} catches any error raised by the calls to {{assert}} and returns it after the status code. That way, errors don't get propagated to the user of the high level {{task}} function. + +These are the main ideas for our exception scheme, but there are still a few glitches to fix: + + * Directly using {{pcall}} ruined the simplicity of the code; + * What happened to the cleanup function calls? What if we have to, say, close a file? + * {{Assert}} messes with the error message before raising the error (it adds line number information). + +Fortunately, all these problems are very easy to solve and that's what we do in the following sections. + +== Introducing the {{protect}} factory == + +We used the {{pcall}} function to shield the user from errors that could be raised by the underlying implementation. Instead of directly using {{pcall}} (and thus duplicating code) every time we prefer a factory that does the same job: + {{{ +local function pack(ok, ...) + return ok, {...} +end + +function protect(f) + return function(...) + local ok, ret = pack(pcall(f, ...)) + if ok then return unpack(ret) + else return nil, ret[1] end + end +end +}}} + +The {{protect}} factory receives a function that might raise exceptions and returns a function that respects our return value convention. Now we can rewrite the top-level {{task}} function in a much cleaner way: + {{{ +task = protect(function(arg1, arg2, ...) + local ret1 = assert(task1(arg1)) + local ret2 = assert(task2(arg2)) + ... +end) +}}} + +The Lua implementation of the {{protect}} factory suffers with the creation of tables to hold multiple arguments and return values. It is possible (and easy) to implement the same function in C, without any table creation. + {{{ +static int safecall(lua_State *L) { + lua_pushvalue(L, lua_upvalueindex(1)); + lua_insert(L, 1); + if (lua_pcall(L, lua_gettop(L) - 1, LUA_MULTRET, 0) != 0) { + lua_pushnil(L); + lua_insert(L, 1); + return 2; + } else return lua_gettop(L); +} + +static int protect(lua_State *L) { + lua_pushcclosure(L, safecall, 1); + return 1; +} +}}} + +===The {{newtry}} factory=== + +Let's solve the two remaining issues with a single shot and use a concrete example to illustrate the proposed solution. Suppose you want to write a function to download an HTTP document. You have to connect, send the request and read the reply. Each of these tasks can fail, but if something goes wrong after you connected, you have to close the connection before returning the error message. + {{{ +get = protect(function(host, path) + local c + -- create a try function with a finalizer to close the socket + local try = newtry(function() + if c then c:close() end + end) + -- connect and send request + c = try(connect(host, 80)) + try(c:send("GET " .. path .. " HTTP/1.0\r\n\r\n")) + -- get headers + local h = {} + while 1 do + l = try(c:receive()) + if l == "" then break end + table.insert(h, l) + end + -- get body + local b = try(c:receive("*a")) + c:close() + return b, h +end) +}}} + +The {{newtry}} factory returns a function that works just like {{assert}}. The differences are that the {{try}} function doesn't mess with the error message and it calls an optional ''finalizer'' before raising the error. In our example, the finalizer simply closes the socket. + +Even with a simple example like this, we see that the finalized exceptions simplified our life. Let's see what we gain in general, not just in this example: + + * We don't need to declare dummy variables to hold error messages in case any ever shows up; + * We avoid using a variable to hold something that could either be a return value or an error message; + * We didn't have to use several ''if'' statements to check for errors; + * If an error happens, we know our finalizer is going to be invoked automatically; + * Exceptions get propagated, so we don't repeat these ''if'' statements until the error reaches the user. + +Try writing the same function without the tricks we used above and you will see that the code gets ugly. Longer sequences of operations with error checking would get even uglier. So let's implement the {{newtry}} function in Lua: + {{{ +function newtry(f) + return function(...) + if not arg[1] then + if f then f() end + error(arg[2], 0) + else + return ... + end + end +end +}}} + +Again, the implementation suffers from the creation of tables at each function call, so we prefer the C version: + {{{ +static int finalize(lua_State *L) { + if (!lua_toboolean(L, 1)) { + lua_pushvalue(L, lua_upvalueindex(1)); + lua_pcall(L, 0, 0, 0); + lua_settop(L, 2); + lua_error(L); + return 0; + } else return lua_gettop(L); +} + +static int do_nothing(lua_State *L) { + (void) L; + return 0; +} + +static int newtry(lua_State *L) { + lua_settop(L, 1); + if (lua_isnil(L, 1)) + lua_pushcfunction(L, do_nothing); + lua_pushcclosure(L, finalize, 1); + return 1; +} +}}} + +===Final considerations=== + +The {{protect}} and {{newtry}} functions saved a ''lot'' of work in the implementation of {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket]. The size of some modules was cut in half by the these ideas. It's true the scheme is not as generic as the exception mechanism of programming languages like C++ or Java, but the power/simplicity ratio is favorable and I hope it serves you as well as it served {{LuaSocket}}. diff -up luasocket-2.0.2/luasocket-2.1-1.rockspec.21 luasocket-2.0.2/luasocket-2.1-1.rockspec --- luasocket-2.0.2/luasocket-2.1-1.rockspec.21 2013-05-10 13:49:50.360679160 -0400 +++ luasocket-2.0.2/luasocket-2.1-1.rockspec 2013-05-10 13:49:50.360679160 -0400 @@ -0,0 +1,67 @@ +package = "LuaSocket" +version = "2.1-1" +source = { + url = "git://github.com/diegonehab/luasocket.git", + branch = "unstable" +} +description = { + summary = "Network support for the Lua language", + detailed = [[ + LuaSocket is a Lua extension library that is composed by two parts: a C core + that provides support for the TCP and UDP transport layers, and a set of Lua + modules that add support for functionality commonly needed by applications + that deal with the Internet. + ]], + homepage = "http://luaforge.net/projects/luasocket/", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} +build = { + type = "make", + build_variables = { + PLAT="linux", + LUAINC_linux="$(LUA_INCDIR)"
+   },
+   install_variables = {
+      INSTALL_TOP_SHARE = "$(LUADIR)", + INSTALL_TOP_LIB = "$(LIBDIR)"
+   },
+   platforms = {
+      macosx = {
+         build_variables = {
+            PLAT="macosx",
+            LUAINC_macosx="$(LUA_INCDIR)" + } + }, + windows={ + type= "command", + build_command= + "set INCLUDE=$(LUA_INCDIR);%INCLUDE% &"..
+            "set LIB=$(LUA_LIBDIR);%LIB% &".. + "msbuild /p:\"VCBuildAdditionalOptions= /useenv\" luasocket.sln &".. + "mkdir mime & mkdir socket &".. + "cp src/mime.dll mime/core.dll &".. + "cp src/socket.dll socket/core.dll", + install= { + lib = { + ["mime.core"] = "mime/core.dll", + ["socket.core"] = "socket/core.dll" + }, + lua = { + "src/ltn12.lua", + "src/mime.lua", + "src/socket.lua", + ["socket.headers"] = "src/headers.lua", + ["socket.ftp"] = "src/ftp.lua", + ["socket.http"] = "src/http.lua", + ["socket.smtp"] = "src/smtp.lua", + ["socket.tp"] = "src/tp.lua", + ["socket.url"] = "src/url.lua", + } + } + } + }, + copy_directories = { "doc", "samples", "etc", "test" } +} diff -up luasocket-2.0.2/luasocket.sln.21 luasocket-2.0.2/luasocket.sln --- luasocket-2.0.2/luasocket.sln.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/luasocket.sln 2013-05-10 13:49:50.360679160 -0400 @@ -1,37 +1,35 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socket", "socket.vcproj", "{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socket", "socket.vcxproj", "{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluasocket", "libluasocket.vcproj", "{599EAD40-60EE-4043-9C14-AE090A8A092D}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcxproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.ActiveCfg = Debug|Win32 - {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug.Build.0 = Debug|Win32 - {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.ActiveCfg = Release|Win32 - {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release.Build.0 = Release|Win32 - {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.ActiveCfg = Debug|Win32 - {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug.Build.0 = Debug|Win32 - {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.ActiveCfg = Release|Win32 - {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release.Build.0 = Release|Win32 - {599EAD40-60EE-4043-9C14-AE090A8A092D}.Debug.ActiveCfg = Debug|Win32 - {599EAD40-60EE-4043-9C14-AE090A8A092D}.Debug.Build.0 = Debug|Win32 - {599EAD40-60EE-4043-9C14-AE090A8A092D}.Release.ActiveCfg = Release|Win32 - {599EAD40-60EE-4043-9C14-AE090A8A092D}.Release.Build.0 = Release|Win32 + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug|Win32.ActiveCfg = Debug|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug|Win32.Build.0 = Debug|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug|x64.ActiveCfg = Debug|x64 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Debug|x64.Build.0 = Debug|x64 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release|Win32.ActiveCfg = Release|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release|Win32.Build.0 = Release|Win32 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release|x64.ActiveCfg = Release|x64 + {66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}.Release|x64.Build.0 = Release|x64 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug|Win32.ActiveCfg = Debug|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug|Win32.Build.0 = Debug|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug|x64.ActiveCfg = Debug|x64 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Debug|x64.Build.0 = Debug|x64 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|Win32.ActiveCfg = Release|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|Win32.Build.0 = Release|Win32 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.ActiveCfg = Release|x64 + {128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.Build.0 = Release|x64 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff -up luasocket-2.0.2/makefile.21 luasocket-2.0.2/makefile --- luasocket-2.0.2/makefile.21 2013-05-10 13:49:50.360679160 -0400 +++ luasocket-2.0.2/makefile 2013-05-10 13:51:05.711676466 -0400 @@ -1,51 +1,34 @@ -#------ -# Load configuration +# luasocket makefile # -include config - -#------ -# Hopefully no need to change anything below this line -# -INSTALL_SOCKET_SHARE=$(INSTALL_TOP_SHARE)/socket
-INSTALL_SOCKET_LIB=$(INSTALL_TOP_LIB)/socket -INSTALL_MIME_SHARE=$(INSTALL_TOP_SHARE)/mime
-INSTALL_MIME_LIB=$(INSTALL_TOP_LIB)/mime - -all clean: - cd src;$(MAKE) $@ - -#------ -# Files to install +# see src/makefile for description of how to customize the build # -TO_SOCKET_SHARE:= \ - http.lua \ - url.lua \ - tp.lua \ - ftp.lua \ - smtp.lua - -TO_TOP_SHARE:= \ - ltn12.lua \ - socket.lua \ - mime.lua +# Targets: +# install install system independent support +# install-unix also install unix-only support +# install-both install both lua5.1 and lua5.2 socket support +# print print the build settings + +PLAT?= linux +PLATS= macosx linux win32 + +all:$(PLAT)
+
+$(PLATS) none install install-unix local clean: +$(MAKE) -C src $@ + +print: +$(MAKE) -C src $@ + +test: + lua test/hello.lua + +install-both: +$(MAKE) clean
+	@cd src; $(MAKE)$(PLAT) LUAV=5.1
+	@cd src; $(MAKE) install-unix LUAV=5.1 +$(MAKE) clean
+	@cd src; $(MAKE)$(PLAT) LUAV=5.2
+	@cd src; $(MAKE) install-unix LUAV=5.2 -TO_MIME_SHARE:= +.PHONY: test -#------ -# Install LuaSocket according to recommendation -# -install: all - cd src; mkdir -p$(INSTALL_TOP_SHARE)
-	cd src; $(INSTALL_DATA)$(TO_TOP_SHARE) $(INSTALL_TOP_SHARE) - cd src; mkdir -p$(INSTALL_SOCKET_SHARE)
-	cd src; $(INSTALL_DATA)$(TO_SOCKET_SHARE) $(INSTALL_SOCKET_SHARE) - cd src; mkdir -p$(INSTALL_SOCKET_LIB)
-	cd src; $(INSTALL_EXEC)$(SOCKET_SO) $(INSTALL_SOCKET_LIB)/core.$(EXT)
-	#cd src; mkdir -p $(INSTALL_MIME_SHARE) - #cd src;$(INSTALL_DATA) $(TO_MIME_SHARE)$(INSTALL_MIME_SHARE)
-	cd src; mkdir -p $(INSTALL_MIME_LIB) - cd src;$(INSTALL_EXEC) $(MIME_SO)$(INSTALL_MIME_LIB)/core.$(EXT) - -#------ -# End of makefile -# diff -up luasocket-2.0.2/makefile.dist.21 luasocket-2.0.2/makefile.dist --- luasocket-2.0.2/makefile.dist.21 2013-05-10 13:49:50.360679160 -0400 +++ luasocket-2.0.2/makefile.dist 2013-05-10 13:49:50.360679160 -0400 @@ -0,0 +1,133 @@ +#-------------------------------------------------------------------------- +# Distribution makefile +#-------------------------------------------------------------------------- +DIST = luasocket-2.1-rc1 + +TEST = \ + test/README \ + test/hello.lua \ + test/testclnt.lua \ + test/testsrvr.lua \ + test/testsupport.lua + +SAMPLES = \ + samples/README \ + samples/cddb.lua \ + samples/daytimeclnt.lua \ + samples/echoclnt.lua \ + samples/echosrvr.lua \ + samples/mclisten.lua \ + samples/mcsend.lua \ + samples/listener.lua \ + samples/lpr.lua \ + samples/talker.lua \ + samples/tinyirc.lua + +ETC = \ + etc/README \ + etc/b64.lua \ + etc/check-links.lua \ + etc/check-memory.lua \ + etc/dict.lua \ + etc/dispatch.lua \ + etc/eol.lua \ + etc/forward.lua \ + etc/get.lua \ + etc/lp.lua \ + etc/qp.lua \ + etc/tftp.lua + +SRC = \ + src/makefile \ + src/auxiliar.c \ + src/auxiliar.h \ + src/buffer.c \ + src/buffer.h \ + src/except.c \ + src/except.h \ + src/inet.c \ + src/inet.h \ + src/io.c \ + src/io.h \ + src/luasocket.c \ + src/luasocket.h \ + src/mime.c \ + src/mime.h \ + src/options.c \ + src/options.h \ + src/select.c \ + src/select.h \ + src/socket.h \ + src/tcp.c \ + src/tcp.h \ + src/timeout.c \ + src/timeout.h \ + src/udp.c \ + src/udp.h \ + src/unix.c \ + src/unix.h \ + src/usocket.c \ + src/usocket.h \ + src/wsocket.c \ + src/wsocket.h \ + src/ftp.lua \ + src/http.lua \ + src/ltn12.lua \ + src/mime.lua \ + src/smtp.lua \ + src/socket.lua \ + src/headers.lua \ + src/tp.lua \ + src/url.lua + +MAKE = \ + makefile \ + luasocket.sln \ + socket.vcproj \ + mime.vcproj + +DOC = \ + doc/dns.html \ + doc/ftp.html \ + doc/index.html \ + doc/http.html \ + doc/installation.html \ + doc/introduction.html \ + doc/ltn12.html \ + doc/luasocket.png \ + doc/mime.html \ + doc/reference.css \ + doc/reference.html \ + doc/smtp.html \ + doc/socket.html \ + doc/tcp.html \ + doc/udp.html \ + doc/url.html + +dist: + mkdir -p$(DIST)
+	cp -vf NEW $(DIST) + cp -vf LICENSE$(DIST)
+	cp -vf README $(DIST) + cp -vf$(MAKE) $(DIST) + + mkdir -p$(DIST)/etc
+	cp -vf $(ETC)$(DIST)/etc
+
+	mkdir -p $(DIST)/src + cp -vf$(SRC) $(DIST)/src + + mkdir -p$(DIST)/doc
+	cp -vf $(DOC)$(DIST)/doc
+
+	mkdir -p $(DIST)/samples + cp -vf$(SAMPLES) $(DIST)/samples + + mkdir -p$(DIST)/test
+	cp -vf $(TEST)$(DIST)/test
+
+	tar -zcvf $(DIST).tar.gz$(DIST)
+	zip -r $(DIST).zip$(DIST)
+
+clean:
+	\rm -rf $(DIST)$(DIST).tar.gz $(DIST).zip diff -up luasocket-2.0.2/mime.vcxproj.21 luasocket-2.0.2/mime.vcxproj --- luasocket-2.0.2/mime.vcxproj.21 2013-05-10 13:49:50.360679160 -0400 +++ luasocket-2.0.2/mime.vcxproj 2013-05-10 13:49:50.360679160 -0400 @@ -0,0 +1,195 @@ +№╗┐<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <ClCompile Include="src\mime.c" /> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{128E8BD0-174A-48F0-8771-92B1E8D18713}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>$(SolutionDir)\$(Configuration)\mime\</OutDir> + <IntDir>$(Configuration)\</IntDir>
+    <TargetName>core</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <TargetName>core</TargetName>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\mime\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>$(SolutionDir)\$(Configuration)\mime\</OutDir> + <IntDir>$(Configuration)\</IntDir>
+    <TargetName>core</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\mime\</OutDir> + <TargetName>core</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention /> + <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat />
+    </ClCompile>
+      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+      <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention /> + <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MIME_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat> + </DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>lualib.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff -up luasocket-2.0.2/NEW.21 luasocket-2.0.2/NEW
--- luasocket-2.0.2/NEW.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/NEW	2013-05-10 13:49:50.360679160 -0400
@@ -2,13 +2,37 @@ What's New

This is just a bug-fix/update release.

-    * Improved: http.request() now supports deprecated HTTP/0.9
-      servers (Florian Berger)
-    * Fixed: could return "timedout" instead of "timeout" (Leo Leo)
-    * Fixed: crash when reading '*a' on closed socket (Paul Ducklin);
-    * Fixed: return values are consistent when reading from closed sockets;
-    * Fixed: case sensitivity in headers of multipart messages in
-      smtp.message() (Graham Henstridge);
-    * Fixed a couple instances of error() being called instead of base.error().       These would cause an error when an error was reported. :)  (Ketmar Dark);
-    * Fixed: test script now uses pairs() iterator instead of the old
-      Lua syntax (Robert Dodier).
+   * Fixed: manual sample of HTTP authentication now uses correct
+   * Fixed: failure on bind() was destroying the socket (Sam Roberts);
+   * Fixed: receive() returns immediatelly if prefix can satisfy
+     bytes requested (M Joonas Pihlaja);
+   * Fixed: multicast didn't work on Windows, or anywhere
+     else for that matter (Herbert Leuwer, Adrian Sietsma);
+   * Fixed: select() now reports an error when called with more
+     sockets than FD_SETSIZE (Lorenzo Leonini);
+   * Fixed: manual links to home.html changed to index.html (Robert Hahn);
+   * Fixed: mime.unb64() would return an empty string on results that started
+     with a null character (Robert Raschke);
+   * Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray);
+   * Fixed: calling sleep() with negative numbers could
+     block forever, wasting CPU. Now it returns immediately (MPB);
+   * Improved: FTP commands are now sent in upper case to
+     help buggy servers (Anders Eurenius);
+   * Improved: known headers now sent in canonic
+     capitalization to help buggy servers (Joseph Stewart);
+   * Improved: Clarified tcp:receive() in the manual (MPB);
+   * Improved: Decent makefiles (LHF).
+   * Fixed: RFC links in documentation now point to IETF (Cosmin Apreutesei).
+
+
+    Yuri's bug?
+    Dahlberg
+    Sam Roberts
+    Thomas Harning Jr.
+    Sebastien Perin
+    remove getn in all files
+    ltn12.pump.all(
+      ltn12.source.file(io.open("original.png")),
+      ltn12.sink.file(io.open("copy.png", "wb"))
+    )
@@ -1,5 +1,5 @@
-This is the LuaSocket 2.0.1. It has been tested on WinXP, Mac OS X,
-and Linux.  Please use the Lua mailing list to report any bugs
+This is the LuaSocket 2.1. It has been tested on --[[WinXP--]], Mac OS X,
+and --[[Linux--]].  Please use the Lua mailing list to report any bugs
(or "features") you encounter.

Have fun,
diff -up luasocket-2.0.2/samples/cddb.lua.21 luasocket-2.0.2/samples/cddb.lua
--- luasocket-2.0.2/samples/cddb.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/cddb.lua	2013-05-10 13:49:50.360679160 -0400
@@ -32,7 +32,7 @@ end
local host = socket.dns.gethostname()
local url = string.format(query, server, arg[1], arg[2], host)
-local body, headers, code = http.get(url)
+local body, headers, code = http.request(url)

if code == 200 then
local data, code, error = parse(body)
diff -up luasocket-2.0.2/samples/daytimeclnt.lua.21 luasocket-2.0.2/samples/daytimeclnt.lua
--- luasocket-2.0.2/samples/daytimeclnt.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/daytimeclnt.lua	2013-05-10 13:49:50.360679160 -0400
@@ -2,7 +2,6 @@
-- UDP sample: daytime protocol client
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: daytimeclnt.lua,v 1.11 2004/06/21 06:07:57 diego Exp$
-----------------------------------------------------------------------------
local socket = require"socket"
host = host or "127.0.0.1"
diff -up luasocket-2.0.2/samples/echoclnt.lua.21 luasocket-2.0.2/samples/echoclnt.lua
--- luasocket-2.0.2/samples/echoclnt.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/echoclnt.lua	2013-05-10 13:49:50.360679160 -0400
@@ -2,7 +2,6 @@
-- UDP sample: echo protocol client
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: echoclnt.lua,v 1.10 2005/01/02 22:44:00 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "localhost"
diff -up luasocket-2.0.2/samples/echosrvr.lua.21 luasocket-2.0.2/samples/echosrvr.lua
--- luasocket-2.0.2/samples/echosrvr.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/echosrvr.lua	2013-05-10 13:49:50.361679160 -0400
@@ -2,7 +2,6 @@
-- UDP sample: echo protocol server
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: echosrvr.lua,v 1.12 2005/11/22 08:33:29 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "127.0.0.1"
diff -up luasocket-2.0.2/samples/listener.lua.21 luasocket-2.0.2/samples/listener.lua
--- luasocket-2.0.2/samples/listener.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/listener.lua	2013-05-10 13:49:50.361679160 -0400
@@ -2,7 +2,6 @@
-- TCP sample: Little program to dump lines received at a given port
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: listener.lua,v 1.11 2005/01/02 22:44:00 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "*"
diff -up luasocket-2.0.2/samples/lpr.lua.21 luasocket-2.0.2/samples/lpr.lua
--- luasocket-2.0.2/samples/lpr.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/lpr.lua	2013-05-10 13:49:50.361679160 -0400
@@ -28,8 +28,8 @@ end

do
local opt = {}
-    local pat = "[%s%c%p]*([%w]*)=([\"]?[%w%s_!@#$%%^&*()<>:;]+[\"]\?\.?)" - for i = 2, table.getn(arg), 1 do + local pat = "[%s%c%p]*([%w]*)=([\"]?[%w%s_!@#$%%^&*()<>:;]+[\"]?.?)"
+    for i = 2, #arg, 1 do
string.gsub(arg[i], pat, function(name, value) opt[name] = value end)
end
if not arg[2] then
diff -up luasocket-2.0.2/samples/mclisten.lua.21 luasocket-2.0.2/samples/mclisten.lua
--- luasocket-2.0.2/samples/mclisten.lua.21	2013-05-10 13:49:50.361679160 -0400
+++ luasocket-2.0.2/samples/mclisten.lua	2013-05-10 13:49:50.361679160 -0400
@@ -0,0 +1,18 @@
+local socket = require"socket"
+local group = "225.0.0.37"
+local port = 12345
+local c = assert(socket.udp())
+print(assert(c:setoption("reuseport", true)))
+print(assert(c:setsockname("*", port)))
+--print("loop:", c:getoption("ip-multicast-loop"))
+--print(assert(c:setoption("ip-multicast-loop", false)))
+--print("loop:", c:getoption("ip-multicast-loop"))
+--print("if:", c:getoption("ip-multicast-if"))
+--print(assert(c:setoption("ip-multicast-if", "127.0.0.1")))
+--print("if:", c:getoption("ip-multicast-if"))
+--print(assert(c:setoption("ip-multicast-if", "10.0.1.4")))
+--print("if:", c:getoption("ip-multicast-if"))
+while 1 do
+end
diff -up luasocket-2.0.2/samples/mcsend.lua.21 luasocket-2.0.2/samples/mcsend.lua
--- luasocket-2.0.2/samples/mcsend.lua.21	2013-05-10 13:49:50.361679160 -0400
+++ luasocket-2.0.2/samples/mcsend.lua	2013-05-10 13:49:50.361679160 -0400
@@ -0,0 +1,20 @@
+local socket = require"socket"
+local group = "225.0.0.37"
+local port = 12345
+local c = assert(socket.udp())
+--print(assert(c:setoption("reuseport", true)))
+--print(assert(c:setsockname("*", port)))
+--print(assert(c:setoption("ip-multicast-loop", false)))
+--print(assert(c:setoption("ip-multicast-ttl", 4)))
+--print(assert(c:setoption("ip-multicast-if", "10.0.1.3")))
+local i = 0
+while 1 do
+    local message = string.format("hello all %d!", i)
+    assert(c:sendto(message, group, port))
+    print("sent " .. message)
+    socket.sleep(1)
+    c:settimeout(0.5)
+    i = i + 1
+end
diff -up luasocket-2.0.2/samples/talker.lua.21 luasocket-2.0.2/samples/talker.lua
--- luasocket-2.0.2/samples/talker.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/talker.lua	2013-05-10 13:49:50.361679160 -0400
@@ -2,7 +2,6 @@
-- TCP sample: Little program to send text lines to a given host/port
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: talker.lua,v 1.9 2005/01/02 22:44:00 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "localhost"
diff -up luasocket-2.0.2/samples/tinyirc.lua.21 luasocket-2.0.2/samples/tinyirc.lua
--- luasocket-2.0.2/samples/tinyirc.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/samples/tinyirc.lua	2013-05-10 13:49:50.361679160 -0400
@@ -2,7 +2,6 @@
-- Select sample: simple text line server
-- LuaSocket sample files.
-- Author: Diego Nehab
--- RCS ID: $Id: tinyirc.lua,v 1.14 2005/11/22 08:33:29 diego Exp$
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "*"
@@ -32,7 +31,7 @@ function newset()
insert = function(set, value)
if not reverse[value] then
table.insert(set, value)
-                reverse[value] = table.getn(set)
+                reverse[value] = #set
end
end,
remove = function(set, value)
diff -up luasocket-2.0.2/socket.vcxproj.21 luasocket-2.0.2/socket.vcxproj
--- luasocket-2.0.2/socket.vcxproj.21	2013-05-10 13:49:50.361679160 -0400
+++ luasocket-2.0.2/socket.vcxproj	2013-05-10 13:49:50.361679160 -0400
@@ -0,0 +1,206 @@
+№╗┐<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="src\auxiliar.c" />
+    <ClCompile Include="src\buffer.c" />
+    <ClCompile Include="src\except.c" />
+    <ClCompile Include="src\inet.c" />
+    <ClCompile Include="src\io.c" />
+    <ClCompile Include="src\luasocket.c" />
+    <ClCompile Include="src\options.c" />
+    <ClCompile Include="src\select.c" />
+    <ClCompile Include="src\tcp.c" />
+    <ClCompile Include="src\timeout.c" />
+    <ClCompile Include="src\udp.c" />
+    <ClCompile Include="src\wsocket.c" />
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{66E3CE14-884D-4AEA-9F20-15A0BEAF8C5A}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>$(SolutionDir)\$(Configuration)\socket\</OutDir>
+    <IntDir>$(Configuration)\</IntDir> + <LinkIncremental>true</LinkIncremental> + <TargetName>core</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <TargetName>core</TargetName> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\socket\</OutDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>$(SolutionDir)\$(Configuration)\socket\</OutDir>
+    <IntDir>$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <TargetName>core</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\socket\</OutDir>
+    <TargetName>core</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+      <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention />
+      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;LUASOCKET_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+      <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)mime.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat /> + </ClCompile> + <Link> + <AdditionalDependencies>lualib.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <AdditionalLibraryDirectories>..\bin\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention />
+      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+    </ClCompile>
+      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+      <AdditionalLibraryDirectories>..\bin\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+  </ItemDefinitionGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff -up luasocket-2.0.2/src/auxiliar.c.21 luasocket-2.0.2/src/auxiliar.c --- luasocket-2.0.2/src/auxiliar.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/auxiliar.c 2013-05-10 13:49:50.361679160 -0400 @@ -1,8 +1,6 @@ /*=========================================================================*\ * Auxiliar routines for class hierarchy manipulation * LuaSocket toolkit -* -* RCS ID:$Id: auxiliar.c,v 1.14 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include <string.h> #include <stdio.h> @@ -24,7 +22,7 @@ int auxiliar_open(lua_State *L) { * Creates a new class with given methods * Methods whose names start with __ are passed directly to the metatable. \*-------------------------------------------------------------------------*/ -void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func) { +void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func) { luaL_newmetatable(L, classname); /* mt */ /* create __index table to place methods */ lua_pushstring(L, "__index"); /* mt,"__index" */ @@ -81,7 +79,7 @@ void auxiliar_add2group(lua_State *L, co \*-------------------------------------------------------------------------*/ int auxiliar_checkboolean(lua_State *L, int objidx) { if (!lua_isboolean(L, objidx)) - luaL_typerror(L, objidx, lua_typename(L, LUA_TBOOLEAN)); + auxiliar_typeerror(L, objidx, lua_typename(L, LUA_TBOOLEAN)); return lua_toboolean(L, objidx); } @@ -147,3 +145,14 @@ void *auxiliar_getgroupudata(lua_State * void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) { return luaL_checkudata(L, objidx, classname); } + +/*-------------------------------------------------------------------------*\ +* Throws error when argument does not have correct type. +* Used to be part of lauxlib in Lua 5.1, was dropped from 5.2. +\*-------------------------------------------------------------------------*/ +int auxiliar_typeerror (lua_State *L, int narg, const char *tname) { + const char *msg = lua_pushfstring(L, "%s expected, got %s", tname, + luaL_typename(L, narg)); + return luaL_argerror(L, narg, msg); +} + diff -up luasocket-2.0.2/src/auxiliar.h.21 luasocket-2.0.2/src/auxiliar.h --- luasocket-2.0.2/src/auxiliar.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/auxiliar.h 2013-05-10 13:49:50.361679160 -0400 @@ -27,15 +27,13 @@ * * The mapping from class name to the corresponding metatable and the * reverse mapping are done using lauxlib. -* -* RCS ID:$Id: auxiliar.h,v 1.9 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include "lua.h" #include "lauxlib.h" int auxiliar_open(lua_State *L); -void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func); +void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func); void auxiliar_add2group(lua_State *L, const char *classname, const char *group); void auxiliar_setclass(lua_State *L, const char *classname, int objidx); void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx); @@ -44,5 +42,6 @@ void *auxiliar_getclassudata(lua_State * void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx); int auxiliar_checkboolean(lua_State *L, int objidx); int auxiliar_tostring(lua_State *L); +int auxiliar_typeerror(lua_State *L, int narg, const char *tname); #endif /* AUXILIAR_H */ diff -up luasocket-2.0.2/src/buffer.c.21 luasocket-2.0.2/src/buffer.c --- luasocket-2.0.2/src/buffer.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/buffer.c 2013-05-10 13:49:50.361679160 -0400 @@ -1,8 +1,6 @@ /*=========================================================================*\ * Input/Output interface for Lua programs * LuaSocket toolkit -* -* RCS ID:$Id: buffer.c,v 1.28 2007/06/11 23:44:54 diego Exp $\*=========================================================================*/ #include "lua.h" #include "lauxlib.h" @@ -42,7 +40,7 @@ int buffer_open(lua_State *L) { * Initializes C structure \*-------------------------------------------------------------------------*/ void buffer_init(p_buffer buf, p_io io, p_timeout tm) { - buf->first = buf->last = 0; + buf->first = buf->last = 0; buf->io = io; buf->tm = tm; buf->received = buf->sent = 0; @@ -53,8 +51,8 @@ void buffer_init(p_buffer buf, p_io io, * object:getstats() interface \*-------------------------------------------------------------------------*/ int buffer_meth_getstats(lua_State *L, p_buffer buf) { - lua_pushnumber(L, buf->received); - lua_pushnumber(L, buf->sent); + lua_pushnumber(L, (lua_Number) buf->received); + lua_pushnumber(L, (lua_Number) buf->sent); lua_pushnumber(L, timeout_gettime() - buf->birthday); return 3; } @@ -63,8 +61,8 @@ int buffer_meth_getstats(lua_State *L, p * object:setstats() interface \*-------------------------------------------------------------------------*/ int buffer_meth_setstats(lua_State *L, p_buffer buf) { - buf->received = (long) luaL_optnumber(L, 2, buf->received); - buf->sent = (long) luaL_optnumber(L, 3, buf->sent); + buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); + buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); lua_pushnumber(L, 1); return 1; @@ -80,7 +78,9 @@ int buffer_meth_send(lua_State *L, p_buf const char *data = luaL_checklstring(L, 2, &size); long start = (long) luaL_optnumber(L, 3, 1); long end = (long) luaL_optnumber(L, 4, -1); +#ifdef LUASOCKET_DEBUG p_timeout tm = timeout_markstart(buf->tm); +#endif if (start < 0) start = (long) (size+start+1); if (end < 0) end = (long) (size+end+1); if (start < 1) start = (long) 1; @@ -90,9 +90,9 @@ int buffer_meth_send(lua_State *L, p_buf if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, buf->io->error(buf->io->ctx, err)); - lua_pushnumber(L, sent+start-1); + lua_pushnumber(L, (lua_Number) (sent+start-1)); } else { - lua_pushnumber(L, sent+start-1); + lua_pushnumber(L, (lua_Number) (sent+start-1)); lua_pushnil(L); lua_pushnil(L); } @@ -111,7 +111,9 @@ int buffer_meth_receive(lua_State *L, p_ luaL_Buffer b; size_t size; const char *part = luaL_optlstring(L, 3, "", &size); +#ifdef LUASOCKET_DEBUG p_timeout tm = timeout_markstart(buf->tm); +#endif /* initialize buffer with optional extra prefix * (useful for concatenating previous partial results) */ luaL_buffinit(L, &b); @@ -122,9 +124,15 @@ int buffer_meth_receive(lua_State *L, p_ if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b); else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); else luaL_argcheck(L, 0, 2, "invalid receive pattern"); - /* get a fixed number of bytes (minus what was already partially - * received) */ - } else err = recvraw(buf, (size_t) lua_tonumber(L, 2)-size, &b); + /* get a fixed number of bytes (minus what was already partially + * received) */ + } else { + double n = lua_tonumber(L, 2); + size_t wanted = (size_t) n; + luaL_argcheck(L, n >= 0, 2, "invalid receive pattern"); + if (size == 0 || wanted > size) + err = recvraw(buf, wanted-size, &b); + } /* check if there was an error */ if (err != IO_DONE) { /* we can't push anyting in the stack before pushing the @@ -166,7 +174,7 @@ static int sendraw(p_buffer buf, const c size_t total = 0; int err = IO_DONE; while (total < count && err == IO_DONE) { - size_t done; + size_t done = 0; size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE; err = io->send(io->ctx, data+total, step, &done, tm); total += done; @@ -225,7 +233,7 @@ static int recvline(p_buffer buf, luaL_B pos = 0; while (pos < count && data[pos] != '\n') { /* we ignore all \r's */ - if (data[pos] != '\r') luaL_putchar(b, data[pos]); + if (data[pos] != '\r') luaL_addchar(b, data[pos]); pos++; } if (pos < count) { /* found '\n' */ diff -up luasocket-2.0.2/src/buffer.h.21 luasocket-2.0.2/src/buffer.h --- luasocket-2.0.2/src/buffer.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/buffer.h 2013-05-10 13:49:50.362679160 -0400 @@ -14,8 +14,6 @@ * * The module is built on top of the I/O abstraction defined in io.h and the * timeout management is done with the timeout.h interface. -* -* RCS ID:$Id: buffer.h,v 1.12 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include "lua.h" @@ -31,8 +29,8 @@ typedef struct t_buffer_ { size_t sent, received; /* bytes sent, and bytes received */ p_io io; /* IO driver used for this buffer */ p_timeout tm; /* timeout management for this buffer */ - size_t first, last; /* index of first and last bytes of stored data */ - char data[BUF_SIZE]; /* storage space for buffer data */ + size_t first, last; /* index of first and last bytes of stored data */ + char data[BUF_SIZE]; /* storage space for buffer data */ } t_buffer; typedef t_buffer *p_buffer; diff -up luasocket-2.0.2/src/except.c.21 luasocket-2.0.2/src/except.c --- luasocket-2.0.2/src/except.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/except.c 2013-05-10 13:49:50.362679160 -0400 @@ -1,8 +1,6 @@ /*=========================================================================*\ * Simple exception support * LuaSocket toolkit -* -* RCS ID:$Id: except.c,v 1.8 2005/09/29 06:11:41 diego Exp $\*=========================================================================*/ #include <stdio.h> @@ -21,7 +19,7 @@ static int finalize(lua_State *L); static int do_nothing(lua_State *L); /* except functions */ -static luaL_reg func[] = { +static luaL_Reg func[] = { {"newtry", global_newtry}, {"protect", global_protect}, {NULL, NULL} diff -up luasocket-2.0.2/src/except.h.21 luasocket-2.0.2/src/except.h --- luasocket-2.0.2/src/except.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/except.h 2013-05-10 13:49:50.362679160 -0400 @@ -24,8 +24,6 @@ * * With these two function, it's easy to write functions that throw * exceptions on error, but that don't interrupt the user script. -* -* RCS ID:$Id: except.h,v 1.2 2005/09/29 06:11:41 diego Exp $\*=========================================================================*/ #include "lua.h" diff -up luasocket-2.0.2/src/ftp.lua.21 luasocket-2.0.2/src/ftp.lua --- luasocket-2.0.2/src/ftp.lua.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/ftp.lua 2013-05-10 13:49:50.362679160 -0400 @@ -2,7 +2,6 @@ -- FTP support for the Lua language -- LuaSocket toolkit. -- Author: Diego Nehab --- RCS ID:$Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $----------------------------------------------------------------------------- ----------------------------------------------------------------------------- @@ -212,8 +211,8 @@ local function tput(putt) end local default = { - path = "/", - scheme = "ftp" + path = "/", + scheme = "ftp" } local function parse(u) diff -up luasocket-2.0.2/src/headers.lua.21 luasocket-2.0.2/src/headers.lua --- luasocket-2.0.2/src/headers.lua.21 2013-05-10 13:49:50.362679160 -0400 +++ luasocket-2.0.2/src/headers.lua 2013-05-10 13:49:50.362679160 -0400 @@ -0,0 +1,100 @@ +----------------------------------------------------------------------------- +-- Canonic header field capitalization +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- +module("socket.headers") + +canonic = { + ["accept"] = "Accept", + ["accept-charset"] = "Accept-Charset", + ["accept-encoding"] = "Accept-Encoding", + ["accept-language"] = "Accept-Language", + ["accept-ranges"] = "Accept-Ranges", + ["action"] = "Action", + ["alternate-recipient"] = "Alternate-Recipient", + ["age"] = "Age", + ["allow"] = "Allow", + ["arrival-date"] = "Arrival-Date", + ["authorization"] = "Authorization", + ["bcc"] = "Bcc", + ["cache-control"] = "Cache-Control", + ["cc"] = "Cc", + ["comments"] = "Comments", + ["connection"] = "Connection", + ["content-description"] = "Content-Description", + ["content-disposition"] = "Content-Disposition", + ["content-encoding"] = "Content-Encoding", + ["content-id"] = "Content-ID", + ["content-language"] = "Content-Language", + ["content-length"] = "Content-Length", + ["content-location"] = "Content-Location", + ["content-md5"] = "Content-MD5", + ["content-range"] = "Content-Range", + ["content-transfer-encoding"] = "Content-Transfer-Encoding", + ["content-type"] = "Content-Type", + ["cookie"] = "Cookie", + ["date"] = "Date", + ["diagnostic-code"] = "Diagnostic-Code", + ["dsn-gateway"] = "DSN-Gateway", + ["etag"] = "ETag", + ["expect"] = "Expect", + ["expires"] = "Expires", + ["final-log-id"] = "Final-Log-ID", + ["final-recipient"] = "Final-Recipient", + ["from"] = "From", + ["host"] = "Host", + ["if-match"] = "If-Match", + ["if-modified-since"] = "If-Modified-Since", + ["if-none-match"] = "If-None-Match", + ["if-range"] = "If-Range", + ["if-unmodified-since"] = "If-Unmodified-Since", + ["in-reply-to"] = "In-Reply-To", + ["keywords"] = "Keywords", + ["last-attempt-date"] = "Last-Attempt-Date", + ["last-modified"] = "Last-Modified", + ["location"] = "Location", + ["max-forwards"] = "Max-Forwards", + ["message-id"] = "Message-ID", + ["mime-version"] = "MIME-Version", + ["original-envelope-id"] = "Original-Envelope-ID", + ["original-recipient"] = "Original-Recipient", + ["pragma"] = "Pragma", + ["proxy-authenticate"] = "Proxy-Authenticate", + ["proxy-authorization"] = "Proxy-Authorization", + ["range"] = "Range", + ["received"] = "Received", + ["received-from-mta"] = "Received-From-MTA", + ["references"] = "References", + ["referer"] = "Referer", + ["remote-mta"] = "Remote-MTA", + ["reply-to"] = "Reply-To", + ["reporting-mta"] = "Reporting-MTA", + ["resent-bcc"] = "Resent-Bcc", + ["resent-cc"] = "Resent-Cc", + ["resent-date"] = "Resent-Date", + ["resent-from"] = "Resent-From", + ["resent-message-id"] = "Resent-Message-ID", + ["resent-reply-to"] = "Resent-Reply-To", + ["resent-sender"] = "Resent-Sender", + ["resent-to"] = "Resent-To", + ["retry-after"] = "Retry-After", + ["return-path"] = "Return-Path", + ["sender"] = "Sender", + ["server"] = "Server", + ["smtp-remote-recipient"] = "SMTP-Remote-Recipient", + ["status"] = "Status", + ["subject"] = "Subject", + ["te"] = "TE", + ["to"] = "To", + ["trailer"] = "Trailer", + ["transfer-encoding"] = "Transfer-Encoding", + ["upgrade"] = "Upgrade", + ["user-agent"] = "User-Agent", + ["vary"] = "Vary", + ["via"] = "Via", + ["warning"] = "Warning", + ["will-retry-until"] = "Will-Retry-Until", + ["www-authenticate"] = "WWW-Authenticate", + ["x-mailer"] = "X-Mailer", +} diff -up luasocket-2.0.2/src/http.lua.21 luasocket-2.0.2/src/http.lua --- luasocket-2.0.2/src/http.lua.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/http.lua 2013-05-10 13:49:50.362679160 -0400 @@ -2,7 +2,6 @@ -- HTTP/1.1 client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab --- RCS ID:$Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $----------------------------------------------------------------------------- ----------------------------------------------------------------------------- @@ -13,6 +12,7 @@ local url = require("socket.url") local ltn12 = require("ltn12") local mime = require("mime") local string = require("string") +local headers = require("socket.headers") local base = _G local table = require("table") module("socket.http") @@ -123,10 +123,11 @@ function metat.__index:sendrequestline(m return self.try(self.c:send(reqline)) end -function metat.__index:sendheaders(headers) +function metat.__index:sendheaders(tosend) + local canonic = headers.canonic local h = "\r\n" - for i, v in base.pairs(headers) do - h = i .. ": " .. v .. "\r\n" .. h + for f, v in base.pairs(tosend) do + h = (canonic[f] or f) .. ": " .. v .. "\r\n" .. h end self.try(self.c:send(h)) return 1 @@ -254,7 +255,7 @@ local function shouldredirect(reqt, code return headers.location and string.gsub(headers.location, "%s", "") ~= "" and (reqt.redirect ~= false) and - (code == 301 or code == 302) and + (code == 301 or code == 302 or code == 303 or code == 307) and (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") and (not reqt.nredirects or reqt.nredirects < 5) end diff -up luasocket-2.0.2/src/inet.c.21 luasocket-2.0.2/src/inet.c --- luasocket-2.0.2/src/inet.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/inet.c 2013-05-10 13:49:50.362679160 -0400 @@ -1,8 +1,6 @@ /*=========================================================================*\ * Internet domain functions * LuaSocket toolkit -* -* RCS ID:$Id: inet.c,v 1.28 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include <stdio.h> #include <string.h> @@ -16,14 +14,18 @@ * Internal function prototypes. \*=========================================================================*/ static int inet_global_toip(lua_State *L); +static int inet_global_getaddrinfo(lua_State *L); static int inet_global_tohostname(lua_State *L); +static int inet_global_getnameinfo(lua_State *L); static void inet_pushresolved(lua_State *L, struct hostent *hp); static int inet_global_gethostname(lua_State *L); /* DNS functions */ -static luaL_reg func[] = { - { "toip", inet_global_toip }, - { "tohostname", inet_global_tohostname }, +static luaL_Reg func[] = { + { "toip", inet_global_toip}, + { "getaddrinfo", inet_global_getaddrinfo}, + { "tohostname", inet_global_tohostname}, + { "getnameinfo", inet_global_getnameinfo}, { "gethostname", inet_global_gethostname}, { NULL, NULL} }; @@ -54,7 +56,7 @@ static int inet_gethost(const char *addr struct in_addr addr; if (inet_aton(address, &addr)) return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp); - else + else return socket_gethostbyname(address, hp); } @@ -64,7 +66,7 @@ static int inet_gethost(const char *addr \*-------------------------------------------------------------------------*/ static int inet_global_tohostname(lua_State *L) { const char *address = luaL_checkstring(L, 1); - struct hostent *hp = NULL; + struct hostent *hp = NULL; int err = inet_gethost(address, &hp); if (err != IO_DONE) { lua_pushnil(L); @@ -76,6 +78,52 @@ static int inet_global_tohostname(lua_St return 2; } +static int inet_global_getnameinfo(lua_State *L) { + int i, ret; + char host[1024]; + char serv[32]; + struct addrinfo hints; + struct addrinfo *resolved, *iter; + const char *node = luaL_optstring(L, 1, NULL); + const char *service = luaL_optstring(L, 2, NULL); + + if (!(node || service)) + luaL_error(L, "You have to specify a hostname, a service, or both"); + + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; + + /* getaddrinfo must get a node and a service argument */ + ret = getaddrinfo(node ? node : "127.0.0.1", service ? service : "7", + &hints, &resolved); + if (ret != 0) { + lua_pushnil(L); + lua_pushstring(L, socket_gaistrerror(ret)); + return 2; + } + + lua_newtable(L); + for (i = 1, iter = resolved; iter; i++, iter = iter->ai_next) { + getnameinfo(iter->ai_addr, (socklen_t) iter->ai_addrlen, host, + node ? (socklen_t) sizeof(host) : 0, serv, service ? (socklen_t) sizeof(serv) : 0, 0); + + if (node) { + lua_pushnumber(L, i); + lua_pushstring(L, host); + lua_settable(L, -3); + } + } + freeaddrinfo(resolved); + + if (service) { + lua_pushstring(L, serv); + return 2; + } else { + return 1; + } +} + /*-------------------------------------------------------------------------*\ * Returns all information provided by the resolver given a host name * or ip address @@ -83,7 +131,7 @@ static int inet_global_tohostname(lua_St static int inet_global_toip(lua_State *L) { const char *address = luaL_checkstring(L, 1); - struct hostent *hp = NULL; + struct hostent *hp = NULL; int err = inet_gethost(address, &hp); if (err != IO_DONE) { lua_pushnil(L); @@ -95,6 +143,66 @@ static int inet_global_toip(lua_State *L return 2; } +int inet_optfamily(lua_State* L, int narg, const char* def) +{ + static const char* optname[] = { "unspec", "inet", "inet6", NULL }; + static int optvalue[] = { PF_UNSPEC, PF_INET, PF_INET6, 0 }; + + return optvalue[luaL_checkoption(L, narg, def, optname)]; +} + +int inet_optsocktype(lua_State* L, int narg, const char* def) +{ + static const char* optname[] = { "stream", "dgram", NULL }; + static int optvalue[] = { SOCK_STREAM, SOCK_DGRAM, 0 }; + + return optvalue[luaL_checkoption(L, narg, def, optname)]; +} + +static int inet_global_getaddrinfo(lua_State *L) +{ + const char *hostname = luaL_checkstring(L, 1); + struct addrinfo *iterator = NULL, *resolved = NULL; + struct addrinfo hints; + int i = 1, ret = 0; + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; + ret = getaddrinfo(hostname, NULL, &hints, &resolved); + if (ret != 0) { + lua_pushnil(L); + lua_pushstring(L, socket_gaistrerror(ret)); + return 2; + } + lua_newtable(L); + for (iterator = resolved; iterator; iterator = iterator->ai_next) { + char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; + getnameinfo(iterator->ai_addr, (socklen_t) iterator->ai_addrlen, hbuf, + (socklen_t) sizeof(hbuf), sbuf, 0, NI_NUMERICHOST); + lua_pushnumber(L, i); + lua_newtable(L); + switch (iterator->ai_family) { + case AF_INET: + lua_pushliteral(L, "family"); + lua_pushliteral(L, "inet"); + lua_settable(L, -3); + break; + case AF_INET6: + lua_pushliteral(L, "family"); + lua_pushliteral(L, "inet6"); + lua_settable(L, -3); + break;; + } + lua_pushliteral(L, "addr"); + lua_pushstring(L, hbuf); + lua_settable(L, -3); + lua_settable(L, -3); + i++; + } + freeaddrinfo(resolved); + return 1; +} + /*-------------------------------------------------------------------------*\ * Gets the host name @@ -105,7 +213,7 @@ static int inet_global_gethostname(lua_S name[256] = '\0'; if (gethostname(name, 256) < 0) { lua_pushnil(L); - lua_pushstring(L, "gethostname failed"); + lua_pushstring(L, socket_strerror(errno)); return 2; } else { lua_pushstring(L, name); @@ -121,35 +229,91 @@ static int inet_global_gethostname(lua_S /*-------------------------------------------------------------------------*\ * Retrieves socket peer name \*-------------------------------------------------------------------------*/ -int inet_meth_getpeername(lua_State *L, p_socket ps) +int inet_meth_getpeername(lua_State *L, p_socket ps, int family) { - struct sockaddr_in peer; - socklen_t peer_len = sizeof(peer); - if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, "getpeername failed"); - } else { - lua_pushstring(L, inet_ntoa(peer.sin_addr)); - lua_pushnumber(L, ntohs(peer.sin_port)); + switch (family) { + case PF_INET: { + struct sockaddr_in peer; + socklen_t peer_len = sizeof(peer); + char name[INET_ADDRSTRLEN]; + if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) { + lua_pushnil(L); + lua_pushstring(L, socket_strerror(errno)); + return 2; + } else { + inet_ntop(family, &peer.sin_addr, name, sizeof(name)); + lua_pushstring(L, name); + lua_pushnumber(L, ntohs(peer.sin_port)); + lua_pushliteral(L, "inet"); + return 3; + } + } + case PF_INET6: { + struct sockaddr_in6 peer; + socklen_t peer_len = sizeof(peer); + char name[INET6_ADDRSTRLEN]; + if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) { + lua_pushnil(L); + lua_pushstring(L, socket_strerror(errno)); + return 2; + } else { + inet_ntop(family, &peer.sin6_addr, name, sizeof(name)); + lua_pushstring(L, name); + lua_pushnumber(L, ntohs(peer.sin6_port)); + lua_pushliteral(L, "inet6"); + return 3; + } + } + default: + lua_pushnil(L); + lua_pushfstring(L, "unknown family %d", family); + return 2; } - return 2; } /*-------------------------------------------------------------------------*\ * Retrieves socket local name \*-------------------------------------------------------------------------*/ -int inet_meth_getsockname(lua_State *L, p_socket ps) +int inet_meth_getsockname(lua_State *L, p_socket ps, int family) { - struct sockaddr_in local; - socklen_t local_len = sizeof(local); - if (getsockname(*ps, (SA *) &local, &local_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, "getsockname failed"); - } else { - lua_pushstring(L, inet_ntoa(local.sin_addr)); - lua_pushnumber(L, ntohs(local.sin_port)); + switch (family) { + case PF_INET: { + struct sockaddr_in local; + socklen_t local_len = sizeof(local); + char name[INET_ADDRSTRLEN]; + if (getsockname(*ps, (SA *) &local, &local_len) < 0) { + lua_pushnil(L); + lua_pushstring(L, socket_strerror(errno)); + return 2; + } else { + inet_ntop(family, &local.sin_addr, name, sizeof(name)); + lua_pushstring(L, name); + lua_pushnumber(L, ntohs(local.sin_port)); + lua_pushliteral(L, "inet"); + return 3; + } + } + case PF_INET6: { + struct sockaddr_in6 local; + socklen_t local_len = sizeof(local); + char name[INET6_ADDRSTRLEN]; + if (getsockname(*ps, (SA *) &local, &local_len) < 0) { + lua_pushnil(L); + lua_pushstring(L, socket_strerror(errno)); + return 2; + } else { + inet_ntop(family, &local.sin6_addr, name, sizeof(name)); + lua_pushstring(L, name); + lua_pushnumber(L, ntohs(local.sin6_port)); + lua_pushliteral(L, "inet6"); + return 3; + } + } + default: + lua_pushnil(L); + lua_pushfstring(L, "unknown family %d", family); + return 2; } - return 2; } /*=========================================================================*\ @@ -198,58 +362,123 @@ static void inet_pushresolved(lua_State /*-------------------------------------------------------------------------*\ * Tries to create a new inet socket \*-------------------------------------------------------------------------*/ -const char *inet_trycreate(p_socket ps, int type) { - return socket_strerror(socket_create(ps, AF_INET, type, 0)); +const char *inet_trycreate(p_socket ps, int family, int type) { + return socket_strerror(socket_create(ps, family, type, 0)); +} + +/*-------------------------------------------------------------------------*\ +* "Disconnects" a DGRAM socket +\*-------------------------------------------------------------------------*/ +const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm) +{ + switch (family) { + case PF_INET: { + struct sockaddr_in sin; + memset((char *) &sin, 0, sizeof(sin)); + sin.sin_family = AF_UNSPEC; + sin.sin_addr.s_addr = INADDR_ANY; + return socket_strerror(socket_connect(ps, (SA *) &sin, + sizeof(sin), tm)); + } + case PF_INET6: { + struct sockaddr_in6 sin6; + struct in6_addr addrany = IN6ADDR_ANY_INIT; + memset((char *) &sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_UNSPEC; +fprintf(stderr, "disconnecting\n"); + sin6.sin6_addr = addrany; + return socket_strerror(socket_connect(ps, (SA *) &sin6, + sizeof(sin6), tm)); + } + } + return NULL; } /*-------------------------------------------------------------------------*\ * Tries to connect to remote address (address, port) \*-------------------------------------------------------------------------*/ -const char *inet_tryconnect(p_socket ps, const char *address, - unsigned short port, p_timeout tm) +const char *inet_tryconnect(p_socket ps, const char *address, + const char *serv, p_timeout tm, struct addrinfo *connecthints) { - struct sockaddr_in remote; - int err; - memset(&remote, 0, sizeof(remote)); - remote.sin_family = AF_INET; - remote.sin_port = htons(port); - if (strcmp(address, "*")) { - if (!inet_aton(address, &remote.sin_addr)) { - struct hostent *hp = NULL; - struct in_addr **addr; - err = socket_gethostbyname(address, &hp); - if (err != IO_DONE) return socket_hoststrerror(err); - addr = (struct in_addr **) hp->h_addr_list; - memcpy(&remote.sin_addr, *addr, sizeof(struct in_addr)); - } - } else remote.sin_family = AF_UNSPEC; - err = socket_connect(ps, (SA *) &remote, sizeof(remote), tm); - return socket_strerror(err); + struct addrinfo *iterator = NULL, *resolved = NULL; + const char *err = NULL; + /* try resolving */ + err = socket_gaistrerror(getaddrinfo(address, serv, + connecthints, &resolved)); + if (err != NULL) { + if (resolved) freeaddrinfo(resolved); + return err; + } + for (iterator = resolved; iterator; iterator = iterator->ai_next) { + timeout_markstart(tm); + /* try connecting to remote address */ + err = socket_strerror(socket_connect(ps, (SA *) iterator->ai_addr, + (socklen_t) iterator->ai_addrlen, tm)); + /* if success, break out of loop */ + if (err == NULL) break; + } + freeaddrinfo(resolved); + /* here, if err is set, we failed */ + return err; +} + +/*-------------------------------------------------------------------------*\ +* Tries to accept a socket +\*-------------------------------------------------------------------------*/ +const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm) +{ + socklen_t len; + t_sockaddr_storage addr; + if (family == PF_INET6) { + len = sizeof(struct sockaddr_in6); + } else { + len = sizeof(struct sockaddr_in); + } + return socket_strerror(socket_accept(server, client, (SA *) &addr, &len, tm)); } /*-------------------------------------------------------------------------*\ * Tries to bind socket to (address, port) \*-------------------------------------------------------------------------*/ -const char *inet_trybind(p_socket ps, const char *address, unsigned short port) +const char *inet_trybind(p_socket ps, const char *address, const char *serv, + struct addrinfo *bindhints) { - struct sockaddr_in local; - int err; - memset(&local, 0, sizeof(local)); - /* address is either wildcard or a valid ip address */ - local.sin_addr.s_addr = htonl(INADDR_ANY); - local.sin_port = htons(port); - local.sin_family = AF_INET; - if (strcmp(address, "*") && !inet_aton(address, &local.sin_addr)) { - struct hostent *hp = NULL; - struct in_addr **addr; - err = socket_gethostbyname(address, &hp); - if (err != IO_DONE) return socket_hoststrerror(err); - addr = (struct in_addr **) hp->h_addr_list; - memcpy(&local.sin_addr, *addr, sizeof(struct in_addr)); - } - err = socket_bind(ps, (SA *) &local, sizeof(local)); - if (err != IO_DONE) socket_destroy(ps); - return socket_strerror(err); + struct addrinfo *iterator = NULL, *resolved = NULL; + const char *err = NULL; + t_socket sock = *ps; + /* try resolving */ + err = socket_gaistrerror(getaddrinfo(address, serv, bindhints, &resolved)); + if (err) { + if (resolved) freeaddrinfo(resolved); + return err; + } + /* iterate over resolved addresses until one is good */ + for (iterator = resolved; iterator; iterator = iterator->ai_next) { + if(sock == SOCKET_INVALID) { + err = socket_strerror(socket_create(&sock, iterator->ai_family, + iterator->ai_socktype, iterator->ai_protocol)); + if(err) + continue; + } + /* try binding to local address */ + err = socket_strerror(socket_bind(&sock, + (SA *) iterator->ai_addr, + (socklen_t) iterator->ai_addrlen)); + + /* keep trying unless bind succeeded */ + if (err) { + if(sock != *ps) + socket_destroy(&sock); + } else { + /* remember what we connected to, particularly the family */ + *bindhints = *iterator; + break; + } + } + /* cleanup and return error */ + freeaddrinfo(resolved); + *ps = sock; + return err; } /*-------------------------------------------------------------------------*\ diff -up luasocket-2.0.2/src/inet.h.21 luasocket-2.0.2/src/inet.h --- luasocket-2.0.2/src/inet.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/inet.h 2013-05-10 13:49:50.362679160 -0400 @@ -13,8 +13,6 @@ * getpeername and getsockname functions as seen by Lua programs. * * The Lua functions toip and tohostname are also implemented here. -* -* RCS ID:$Id: inet.h,v 1.16 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include "lua.h" #include "socket.h" @@ -26,14 +24,19 @@ int inet_open(lua_State *L); -const char *inet_trycreate(p_socket ps, int type); -const char *inet_tryconnect(p_socket ps, const char *address, - unsigned short port, p_timeout tm); -const char *inet_trybind(p_socket ps, const char *address, - unsigned short port); +const char *inet_trycreate(p_socket ps, int family, int type); +const char *inet_tryconnect(p_socket ps, const char *address, + const char *serv, p_timeout tm, struct addrinfo *connecthints); +const char *inet_trybind(p_socket ps, const char *address, const char *serv, + struct addrinfo *bindhints); +const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); +const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); + +int inet_meth_getpeername(lua_State *L, p_socket ps, int family); +int inet_meth_getsockname(lua_State *L, p_socket ps, int family); -int inet_meth_getpeername(lua_State *L, p_socket ps); -int inet_meth_getsockname(lua_State *L, p_socket ps); +int inet_optfamily(lua_State* L, int narg, const char* def); +int inet_optsocktype(lua_State* L, int narg, const char* def); #ifdef INET_ATON int inet_aton(const char *cp, struct in_addr *inp); diff -up luasocket-2.0.2/src/io.c.21 luasocket-2.0.2/src/io.c --- luasocket-2.0.2/src/io.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/io.c 2013-05-10 13:49:50.362679160 -0400 @@ -1,8 +1,6 @@ /*=========================================================================*\ * Input/Output abstraction * LuaSocket toolkit -* -* RCS ID:$Id: io.c,v 1.6 2005/09/29 06:11:41 diego Exp $\*=========================================================================*/ #include "io.h" diff -up luasocket-2.0.2/src/io.h.21 luasocket-2.0.2/src/io.h --- luasocket-2.0.2/src/io.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/io.h 2013-05-10 13:49:50.363679160 -0400 @@ -11,8 +11,6 @@ * * The module socket.h implements this interface, and thus the module tcp.h * is very simple. -* -* RCS ID:$Id: io.h,v 1.11 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ #include <stdio.h> #include "lua.h" diff -up luasocket-2.0.2/src/ltn12.lua.21 luasocket-2.0.2/src/ltn12.lua --- luasocket-2.0.2/src/ltn12.lua.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/ltn12.lua 2013-05-10 13:49:50.363679160 -0400 @@ -2,7 +2,6 @@ -- LTN12 - Filters, sources, sinks and pumps. -- LuaSocket toolkit. -- Author: Diego Nehab --- RCS ID:$Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $----------------------------------------------------------------------------- ----------------------------------------------------------------------------- @@ -20,7 +19,7 @@ pump = {} -- 2048 seems to be better in windows... BLOCKSIZE = 2048 -_VERSION = "LTN12 1.0.1" +_VERSION = "LTN12 1.0.2" ----------------------------------------------------------------------------- -- Filter stuff @@ -38,7 +37,8 @@ end -- chains a bunch of filters together -- (thanks to Wim Couwenberg) function filter.chain(...) - local n = table.getn(arg) + local arg = {...} + local n = #arg local top, index = 1, 1 local retry = "" return function(chunk) @@ -186,6 +186,7 @@ end -- other, as if they were concatenated -- (thanks to Wim Couwenberg) function source.cat(...) + local arg = {...} local src = table.remove(arg, 1) return function() while src do diff -up luasocket-2.0.2/src/luasocket.c.21 luasocket-2.0.2/src/luasocket.c --- luasocket-2.0.2/src/luasocket.c.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/luasocket.c 2013-05-10 13:49:50.363679160 -0400 @@ -10,8 +10,6 @@ * involved in setting up both client and server connections. The provided * IO routines, however, follow the Lua style, being very similar to the * standard Lua read and write functions. -* -* RCS ID:$Id: luasocket.c,v 1.53 2005/10/07 04:40:59 diego Exp $\*=========================================================================*/ /*=========================================================================*\ @@ -47,7 +45,7 @@ static int base_open(lua_State *L); /*-------------------------------------------------------------------------*\ * Modules and functions \*-------------------------------------------------------------------------*/ -static const luaL_reg mod[] = { +static const luaL_Reg mod[] = { {"auxiliar", auxiliar_open}, {"except", except_open}, {"timeout", timeout_open}, @@ -59,7 +57,7 @@ static const luaL_reg mod[] = { {NULL, NULL} }; -static luaL_reg func[] = { +static luaL_Reg func[] = { {"skip", global_skip}, {"__unload", global_unload}, {NULL, NULL} diff -up luasocket-2.0.2/src/luasocket.h.21 luasocket-2.0.2/src/luasocket.h --- luasocket-2.0.2/src/luasocket.h.21 2007-10-15 00:21:05.000000000 -0400 +++ luasocket-2.0.2/src/luasocket.h 2013-05-10 13:49:50.363679160 -0400 @@ -5,16 +5,14 @@ * Networking support for the Lua language * Diego Nehab * 9/11/1999 -* -* RCS ID:$Id: luasocket.h,v 1.25 2007/06/11 23:44:54 diego Exp $\*=========================================================================*/ #include "lua.h" /*-------------------------------------------------------------------------*\ * Current socket library version \*-------------------------------------------------------------------------*/ -#define LUASOCKET_VERSION "LuaSocket 2.0.2" -#define LUASOCKET_COPYRIGHT "Copyright (C) 2004-2007 Diego Nehab" +#define LUASOCKET_VERSION "LuaSocket 2.1-rc1" +#define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2012 Diego Nehab" #define LUASOCKET_AUTHORS "Diego Nehab" /*-------------------------------------------------------------------------*\ @@ -24,6 +22,10 @@ #define LUASOCKET_API extern #endif +#if LUA_VERSION_NUM > 501 & !( defined LUA_COMPAT_MODULE) +# error Lua 5.2 requires LUA_COMPAT_MODULE defined for luaL_openlib +#endif + /*-------------------------------------------------------------------------*\ * Initializes the library. \*-------------------------------------------------------------------------*/ diff -up luasocket-2.0.2/src/makefile.21 luasocket-2.0.2/src/makefile --- luasocket-2.0.2/src/makefile.21 2013-05-10 13:49:50.363679160 -0400 +++ luasocket-2.0.2/src/makefile 2013-05-10 13:51:19.825675962 -0400 @@ -1,90 +1,323 @@ +# luasocket src/makefile +# +# Definitions in this section can be overriden on the command line or in the +# environment. +# +# These are equivalent: +# +# export PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw +# make +# +# and +# +# make PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw + +# PLAT: linux macosx win32 +# platform to build for +PLAT?=linux + +# LUAV: 5.1 5.2 +# lua version to build against +LUAV?=5.1 + +# DEBUG: NODEBUG DEBUG +# debug mode causes luasocket to collect and returns timing information useful +# for testing and debugging luasocket itself +DEBUG?=NODEBUG + +# where lua headers are found for macosx builds +# LUAINC_macosx: +# /opt/local/include +LUAINC_macosx_base?=/opt/local/include +LUAINC_macosx?=$(LUAINC_macosx_base)/lua$(LUAV) +# FIXME default should this default to fink or to macports? +# What happens when more than one Lua version is installed? +LUAPREFIX_macosx?=/opt/local + +# LUAINC_linux: +# /usr/include/lua$(LUAV)
+# /usr/local/include
+# /usr/local/include/lua$(LUAV) +# where lua headers are found for linux builds +LUAINC_linux_base?=/usr/include +LUAINC_linux?=$(LUAINC_linux_base)/lua$(LUAV) +LUAPREFIX_linux?=/usr/local + +# LUAINC_win32: +# LUALIB_win32: +# where lua headers and libraries are found for win32 builds +LUAINC_win32?="../../lua-5.1.3/src" +LUALIB_win32?="../../lua-5.1.3" +LUAPREFIX_win32?= +# FIXME default should be where lua-for-windows puts lua + +# prefix: /usr/local /usr /opt/local /sw +# the top of the default install tree +prefix?=$(LUAPREFIX_$(PLAT)) + +# DESTDIR: (no default) +# used by package managers to install into a temporary destination +DESTDIR= + +#------ +# Definitions below can be overridden on the make command line, but +# shouldn't have to be. + +print: + @echo PLAT=$(PLAT)
+	@echo LUAV=$(LUAV) + @echo DEBUG=$(DEBUG)
+	@echo prefix=$(prefix) + @echo LUAINC_$(PLAT)=$(LUAINC_$(PLAT))
+	@echo LUALIB_$(PLAT)=$(LUALIB_$(PLAT)) + #------ -# Load configuration +# Install directories # -include ../config + +INSTALL_DIR=install -d +INSTALL_DATA=install -m644 +INSTALL_EXEC=install +INSTALL_TOP=$(DESTDIR)$(prefix) + +INSTALL_TOP_SHARE=$(INSTALL_TOP)/share/lua/$(LUAV) +INSTALL_TOP_LIB=$(INSTALL_TOP)/lib/lua/$(LUAV) + +INSTALL_SOCKET_SHARE=$(INSTALL_TOP_SHARE)/socket
+INSTALL_SOCKET_LIB=$(INSTALL_TOP_LIB)/socket +INSTALL_MIME_SHARE=$(INSTALL_TOP_SHARE)/mime
+INSTALL_MIME_LIB=$(INSTALL_TOP_LIB)/mime #------ -# Hopefully no need to change anything below this line +# Supported platforms # +PLATS= macosx linux win32 #------ -# Modules belonging to socket-core +# Compiler and linker settings +# for Mac OS X +SO_macosx=so +O_macosx=o +CC_macosx=gcc +DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_COMPAT_MODULE \
+	-DLUASOCKET_API='__attribute__((visibility("default")))' \
+	-DMIME_API='__attribute__((visibility("default")))'
+CFLAGS_macosx= -I$(LUAINC)$(DEF) -pedantic -Wall -O2 -fno-common \
+	-fvisibility=hidden
+LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
+LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
+SOCKET_macosx=usocket.o
+
+#------
+# for Linux
+SO_linux=so
+O_linux=o
+CC_linux=gcc
+DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_COMPAT_MODULE \ + -DLUASOCKET_API='__attribute__((visibility("default")))' \ + -DMIME_API='__attribute__((visibility("default")))' +CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra -Wimplicit -O2 -ggdb3 -fpic \ + -fvisibility=hidden +LDFLAGS_linux=-O -shared -fpic -o +LD_linux=gcc +SOCKET_linux=usocket.o + +#------ +# Compiler and linker settings +# for Win32 +SO_win32=dll +O_win32=obj +CC_win32=cl +DEF_win32= /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" \ + /D "LUASOCKET_API=__declspec(dllexport)" /D "_CRT_SECURE_NO_WARNINGS" \ + /D "_WINDLL" /D "LUA_COMPAT_MODULE" /D "MIME_API=__declspec(dllexport)" \ + /D "LUASOCKET_$(DEBUG)"
+CFLAGS_win32=/I "$(LUAINC)"$(DEF) /O2 /Ot /MD /W3 /nologo
+LDFLAGS_win32= /nologo /link /NOLOGO /DLL /INCREMENTAL:NO \
+    /LIBPATH:"$(LUALIB)" \ + /MANIFEST \ + /MANIFESTFILE:"intermediate.manifest" \ + /MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ + /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /DYNAMICBASE:NO \ + /MACHINE:X86 ws2_32.lib lua$(LUAV).lib /OUT:
+LD_win32=cl
+SOCKET_win32=wsocket.obj
+
+.SUFFIXES: .obj
+
+.c.obj:
+	$(CC)$(CFLAGS) /Fo"$@" /c$<
+
+#------
+# Output file names
#
+SO=$(SO_$(PLAT))
+O=$(O_$(PLAT))
+SOCKET_V=2.1
+MIME_V=1.0.3
+SOCKET_SO=socket.$(SO).$(SOCKET_V)
+MIME_SO=mime.$(SO).$(MIME_V)
+UNIX_SO=unix.$(SO) +SERIAL_SO=serial.$(SO)
+SOCKET=$(SOCKET_$(PLAT))

-#$(COMPAT)/compat-5.1.o \ +#------ +# Settings selected for platform +# +CC=$(CC_$(PLAT)) +DEF=$(DEF_$(PLAT)) +CFLAGS=$(CFLAGS_$(PLAT)) +LDFLAGS=$(LDFLAGS_$(PLAT)) +LD=$(LD_$(PLAT)) +LUAINC=$(LUAINC_$(PLAT)) +LUALIB=$(LUALIB_$(PLAT)) -SOCKET_OBJS:= \ - luasocket.o \ - timeout.o \ - buffer.o \ - io.o \ - auxiliar.o \ - options.o \ - inet.o \ - tcp.o \ - udp.o \ - except.o \ - select.o \ - usocket.o +#------ +# Modules belonging to socket-core +# +SOCKET_OBJS= \ + luasocket.$(O) \
+	timeout.$(O) \ + buffer.$(O) \
+	io.$(O) \ + auxiliar.$(O) \
+	options.$(O) \ + inet.$(O) \
+	$(SOCKET) \ + except.$(O) \
+	select.$(O) \ + tcp.$(O) \
+	udp.$(O) #------ # Modules belonging mime-core # -#$(COMPAT)/compat-5.1.o \
-
-MIME_OBJS:=\
-	mime.o
+MIME_OBJS= \
+	mime.$(O) #------ # Modules belonging unix (local domain sockets) # -UNIX_OBJS:=\ - buffer.o \ - auxiliar.o \ - options.o \ - timeout.o \ - io.o \ - usocket.o \ - unix.o +UNIX_OBJS=\ + buffer.$(O) \
+	auxiliar.$(O) \ + options.$(O) \
+	timeout.$(O) \ + io.$(O) \
+	usocket.$(O) \ + unix.$(O)
+
+#------
+# Modules belonging to serial (device streams)
+#
+SERIAL_OBJS:=\
+	buffer.$(O) \ + auxiliar.$(O) \
+	options.$(O) \ + timeout.$(O) \
+	io.$(O) \ + usocket.$(O) \
+	serial.$(O) + +#------ +# Files to install +# +TO_SOCKET_SHARE= \ + http.lua \ + url.lua \ + tp.lua \ + ftp.lua \ + headers.lua \ + smtp.lua + +TO_TOP_SHARE= \ + ltn12.lua \ + socket.lua \ + mime.lua + +#------ +# Targets +# +default:$(PLAT)
+
+macosx:
+	$(MAKE) all-unix PLAT=macosx -all:$(SOCKET_SO) $(MIME_SO) +win32: +$(MAKE) all PLAT=win32
+
+linux:
+	$(MAKE) all-unix PLAT=linux + +none: + @echo "Please run" + @echo " make PLATFORM" + @echo "where PLATFORM is one of these:" + @echo "$(PLATS)"
+
+all: $(SOCKET_SO)$(MIME_SO)

$(SOCKET_SO):$(SOCKET_OBJS)
-	$(LD)$(LDFLAGS) -o $@$(SOCKET_OBJS)
+	$(LD)$(SOCKET_OBJS) $(LDFLAGS)$@

$(MIME_SO):$(MIME_OBJS)
-	$(LD)$(LDFLAGS) -o $@$(MIME_OBJS)
+	$(LD)$(MIME_OBJS) $(LDFLAGS)$@
+
+all-unix: all $(UNIX_SO)$(SERIAL_SO)

$(UNIX_SO):$(UNIX_OBJS)
-	$(LD)$(LDFLAGS) -o $@$(UNIX_OBJS)
+	$(LD)$(UNIX_OBJS) $(LDFLAGS)$@

-#------
-# List of dependencies
-#
-auxiliar.o: auxiliar.c auxiliar.h
-buffer.o: buffer.c buffer.h io.h timeout.h
-except.o: except.c except.h
-inet.o: inet.c inet.h socket.h io.h timeout.h usocket.h
-io.o: io.c io.h timeout.h
-luasocket.o: luasocket.c luasocket.h auxiliar.h except.h timeout.h \
-  buffer.h io.h inet.h socket.h usocket.h tcp.h udp.h select.h
-mime.o: mime.c mime.h
-options.o: options.c auxiliar.h options.h socket.h io.h timeout.h \
-  usocket.h inet.h
-select.o: select.c socket.h io.h timeout.h usocket.h select.h
-tcp.o: tcp.c auxiliar.h socket.h io.h timeout.h usocket.h inet.h \
-  options.h tcp.h buffer.h
-timeout.o: timeout.c auxiliar.h timeout.h
-udp.o: udp.c auxiliar.h socket.h io.h timeout.h usocket.h inet.h \
-  options.h udp.h
-unix.o: unix.c auxiliar.h socket.h io.h timeout.h usocket.h options.h \
-  unix.h buffer.h
-usocket.o: usocket.c socket.h io.h timeout.h usocket.h
+$(SERIAL_SO):$(SERIAL_OBJS)
+	$(LD)$(SERIAL_OBJS) $(LDFLAGS)$@
+
+install:
+	$(INSTALL_DIR)$(INSTALL_TOP_SHARE)
+	$(INSTALL_DATA)$(TO_TOP_SHARE) $(INSTALL_TOP_SHARE) +$(INSTALL_DIR) $(INSTALL_SOCKET_SHARE) +$(INSTALL_DATA) $(TO_SOCKET_SHARE)$(INSTALL_SOCKET_SHARE)
+	$(INSTALL_DIR)$(INSTALL_SOCKET_LIB)
+	$(INSTALL_EXEC)$(SOCKET_SO) $(INSTALL_SOCKET_LIB)/core.$(SO)
+	$(INSTALL_DIR)$(INSTALL_MIME_LIB)
+	$(INSTALL_EXEC)$(MIME_SO) $(INSTALL_MIME_LIB)/core.$(SO)
+
+install-unix: install
+	$(INSTALL_EXEC)$(UNIX_SO) $(INSTALL_SOCKET_LIB)/$(UNIX_SO)
+	$(INSTALL_EXEC)$(SERIAL_SO) $(INSTALL_SOCKET_LIB)/$(SERIAL_SO)
+
+local:
+	$(MAKE) install INSTALL_TOP_LIB=.. INSTALL_TOP_SHARE=.. clean: - rm -f$(SOCKET_SO) $(SOCKET_OBJS) - rm -f$(MIME_SO) $(UNIX_SO)$(MIME_OBJS) $(UNIX_OBJS) + rm -f$(SOCKET_SO) $(SOCKET_OBJS)$(SERIAL_OBJS)
+	rm -f $(MIME_SO)$(UNIX_SO) $(SERIAL_SO)$(MIME_OBJS) $(UNIX_OBJS) + +.PHONY: all$(PLATS) default clean echo none

#------
-# End of makefile configuration
+# List of dependencies
#
+auxiliar.$(O): auxiliar.c auxiliar.h +buffer.$(O): buffer.c buffer.h io.h timeout.h
+except.$(O): except.c except.h +inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h
+io.$(O): io.c io.h timeout.h +luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \
+	timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \
+	udp.h select.h
+mime.$(O): mime.c mime.h +options.$(O): options.c auxiliar.h options.h socket.h io.h \
+	timeout.h usocket.h inet.h
+select.$(O): select.c socket.h io.h timeout.h usocket.h select.h +serial.$(O): serial.c auxiliar.h socket.h io.h timeout.h usocket.h \
+  options.h unix.h buffer.h
+tcp.$(O): tcp.c auxiliar.h socket.h io.h timeout.h usocket.h \ + inet.h options.h tcp.h buffer.h +timeout.$(O): timeout.c auxiliar.h timeout.h
+udp.$(O): udp.c auxiliar.h socket.h io.h timeout.h usocket.h \ + inet.h options.h udp.h +unix.$(O): unix.c auxiliar.h socket.h io.h timeout.h usocket.h \
+	options.h unix.h buffer.h
+usocket.$(O): usocket.c socket.h io.h timeout.h usocket.h +wsocket.$(O): wsocket.c socket.h io.h timeout.h usocket.h
diff -up luasocket-2.0.2/src/mbox.lua.21 luasocket-2.0.2/src/mbox.lua
--- luasocket-2.0.2/src/mbox.lua.21	2013-05-10 13:49:50.363679160 -0400
+++ luasocket-2.0.2/src/mbox.lua	2013-05-10 13:49:50.363679160 -0400
@@ -0,0 +1,88 @@
+local Public = {}
+
+mbox = Public
+
+function Public.split_message(message_s)
+    local message = {}
+    message_s = string.gsub(message_s, "\r\n", "\n")
+    string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end)
+    string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end)
+    if not message.body then
+        string.gsub(message_s, "^\n(.*)", function (b) message.body = b end)
+    end
+    if not message.headers and not message.body then
+    end
+    return message.headers or "", message.body or ""
+end
+
+end
+
+    local _, __, name, value = string.find(header_s, "([^%s:]-):%s*(.*)")
+    return name, value
+end
+
+    for i = 1, #headers_t do
+        if name then
+            name = string.lower(name)
+            else headers[name] = value end
+        end
+    end
+end
+
+function Public.parse_from(from)
+    local _, __, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>")
+        _, __, address = string.find(from, "%s*(.+)%s*")
+    end
+    name = name or ""
+    if name == "" then name = address end
+    name = string.gsub(name, '"', "")
+end
+
+function Public.split_mbox(mbox_s)
+    mbox = {}
+    mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n"
+    local nj, i, j = 1, 1, 1
+    while 1 do
+        i, nj = string.find(mbox_s, "\n\nFrom .-\n", j)
+        if not i then break end
+        local message = string.sub(mbox_s, j, i-1)
+        table.insert(mbox, message)
+        j = nj+1
+    end
+    return mbox
+end
+
+function Public.parse(mbox_s)
+    local mbox = Public.split_mbox(mbox_s)
+    for i = 1, #mbox do
+        mbox[i] = Public.parse_message(mbox[i])
+    end
+    return mbox
+end
+
+function Public.parse_message(message_s)
+    local message = {}
+    return message
+end
diff -up luasocket-2.0.2/src/mime.c.21 luasocket-2.0.2/src/mime.c
--- luasocket-2.0.2/src/mime.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/mime.c	2013-05-10 13:49:50.363679160 -0400
@@ -1,8 +1,6 @@
/*=========================================================================*\
* MIME support functions
* LuaSocket toolkit
-*
-* RCS ID: $Id: mime.c,v 1.28 2005/11/20 07:20:23 diego Exp$
\*=========================================================================*/
#include <string.h>

@@ -35,12 +33,12 @@ static int mime_global_eol(lua_State *L)
static int mime_global_dot(lua_State *L);

static size_t dot(int c, size_t state, luaL_Buffer *buffer);
-static void b64setup(UC *b64unbase);
+static void b64setup(UC *base);
static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
static size_t b64pad(const UC *input, size_t size, luaL_Buffer *buffer);
static size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer);

-static void qpsetup(UC *qpclass, UC *qpunbase);
+static void qpsetup(UC *class, UC *unbase);
static void qpquote(UC c, luaL_Buffer *buffer);
static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
static size_t qpencode(UC c, UC *input, size_t size,
@@ -48,7 +46,7 @@ static size_t qpencode(UC c, UC *input,
static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer);

/* code support functions */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{ "dot", mime_global_dot },
{ "b64", mime_global_b64 },
{ "eol", mime_global_eol },
@@ -135,7 +133,7 @@ static int mime_global_wrp(lua_State *L)
left = length;
}
-                luaL_putchar(&buffer, *input);
left--;
break;
}
@@ -149,12 +147,12 @@ static int mime_global_wrp(lua_State *L)
/*-------------------------------------------------------------------------*\
* Fill base64 decode map.
\*-------------------------------------------------------------------------*/
-static void b64setup(UC *b64unbase)
+static void b64setup(UC *unbase)
{
int i;
-    for (i = 0; i <= 255; i++) b64unbase[i] = (UC) 255;
-    for (i = 0; i < 64; i++) b64unbase[b64base[i]] = (UC) i;
-    b64unbase['='] = 0;
+    for (i = 0; i <= 255; i++) unbase[i] = (UC) 255;
+    for (i = 0; i < 64; i++) unbase[b64base[i]] = (UC) i;
+    unbase['='] = 0;
}

/*-------------------------------------------------------------------------*\
@@ -265,6 +263,8 @@ static int mime_global_b64(lua_State *L)
lua_pushnil(L);
return 2;
}
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
/* process first part of the input */
luaL_buffinit(L, &buffer);
while (input < last)
@@ -272,9 +272,12 @@ static int mime_global_b64(lua_State *L)
input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
/* if second part is nil, we are done */
if (!input) {
+        size_t osize = 0;
luaL_pushresult(&buffer);
-        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        /* if the output is empty  and the input is nil, return nil */
+        lua_tolstring(L, -1, &osize);
+        if (osize == 0) lua_pushnil(L);
lua_pushnil(L);
return 2;
}
@@ -306,6 +309,8 @@ static int mime_global_unb64(lua_State *
lua_pushnil(L);
return 2;
}
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
/* process first part of the input */
luaL_buffinit(L, &buffer);
while (input < last)
@@ -313,8 +318,11 @@ static int mime_global_unb64(lua_State *
input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
/* if second is nil, we are done */
if (!input) {
+        size_t osize = 0;
luaL_pushresult(&buffer);
-        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        /* if the output is empty  and the input is nil, return nil */
+        lua_tolstring(L, -1, &osize);
+        if (osize == 0) lua_pushnil(L);
lua_pushnil(L);
return 2;
}
@@ -343,24 +351,24 @@ static int mime_global_unb64(lua_State *
* Split quoted-printable characters into classes
* Precompute reverse map for encoding
\*-------------------------------------------------------------------------*/
-static void qpsetup(UC *qpclass, UC *qpunbase)
+static void qpsetup(UC *cl, UC *unbase)
{
int i;
-    for (i = 0; i < 256; i++) qpclass[i] = QP_QUOTED;
-    for (i = 33; i <= 60; i++) qpclass[i] = QP_PLAIN;
-    for (i = 62; i <= 126; i++) qpclass[i] = QP_PLAIN;
-    qpclass['\t'] = QP_IF_LAST;
-    qpclass[' '] = QP_IF_LAST;
-    qpclass['\r'] = QP_CR;
-    for (i = 0; i < 256; i++) qpunbase[i] = 255;
-    qpunbase['0'] = 0; qpunbase['1'] = 1; qpunbase['2'] = 2;
-    qpunbase['3'] = 3; qpunbase['4'] = 4; qpunbase['5'] = 5;
-    qpunbase['6'] = 6; qpunbase['7'] = 7; qpunbase['8'] = 8;
-    qpunbase['9'] = 9; qpunbase['A'] = 10; qpunbase['a'] = 10;
-    qpunbase['B'] = 11; qpunbase['b'] = 11; qpunbase['C'] = 12;
-    qpunbase['c'] = 12; qpunbase['D'] = 13; qpunbase['d'] = 13;
-    qpunbase['E'] = 14; qpunbase['e'] = 14; qpunbase['F'] = 15;
-    qpunbase['f'] = 15;
+    for (i = 0; i < 256; i++) cl[i] = QP_QUOTED;
+    for (i = 33; i <= 60; i++) cl[i] = QP_PLAIN;
+    for (i = 62; i <= 126; i++) cl[i] = QP_PLAIN;
+    cl['\t'] = QP_IF_LAST;
+    cl[' '] = QP_IF_LAST;
+    cl['\r'] = QP_CR;
+    for (i = 0; i < 256; i++) unbase[i] = 255;
+    unbase['0'] = 0; unbase['1'] = 1; unbase['2'] = 2;
+    unbase['3'] = 3; unbase['4'] = 4; unbase['5'] = 5;
+    unbase['6'] = 6; unbase['7'] = 7; unbase['8'] = 8;
+    unbase['9'] = 9; unbase['A'] = 10; unbase['a'] = 10;
+    unbase['B'] = 11; unbase['b'] = 11; unbase['C'] = 12;
+    unbase['c'] = 12; unbase['D'] = 13; unbase['d'] = 13;
+    unbase['E'] = 14; unbase['e'] = 14; unbase['F'] = 15;
+    unbase['f'] = 15;
}

/*-------------------------------------------------------------------------*\
@@ -368,9 +376,9 @@ static void qpsetup(UC *qpclass, UC *qpu
\*-------------------------------------------------------------------------*/
static void qpquote(UC c, luaL_Buffer *buffer)
{
-    luaL_putchar(buffer, '=');
-    luaL_putchar(buffer, qpbase[c >> 4]);
-    luaL_putchar(buffer, qpbase[c & 0x0F]);
}

/*-------------------------------------------------------------------------*\
@@ -400,7 +408,7 @@ static size_t qpencode(UC c, UC *input,
qpquote(input[0], buffer);
return 0;
-                } else luaL_putchar(buffer, input[0]);
break;
/* might have to be quoted always */
case QP_QUOTED:
@@ -408,7 +416,7 @@ static size_t qpencode(UC c, UC *input,
break;
/* might never have to be quoted */
default:
-                luaL_putchar(buffer, input[0]);
break;
}
input[0] = input[1]; input[1] = input[2];
@@ -424,7 +432,7 @@ static size_t qppad(UC *input, size_t si
{
size_t i;
for (i = 0; i < size; i++) {
-        if (qpclass[input[i]] == QP_PLAIN) luaL_putchar(buffer, input[i]);
+        if (qpclass[input[i]] == QP_PLAIN) luaL_addchar(buffer, input[i]);
else qpquote(input[i], buffer);
}
if (size > 0) luaL_addstring(buffer, EQCRLF);
@@ -454,6 +462,8 @@ static int mime_global_qp(lua_State *L)
lua_pushnil(L);
return 2;
}
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 3);
/* process first part of input */
luaL_buffinit(L, &buffer);
while (input < last)
@@ -494,7 +504,7 @@ static size_t qpdecode(UC c, UC *input,
c = qpunbase[input[1]]; d = qpunbase[input[2]];
/* if it is an invalid, do not decode */
if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3);
-            else luaL_putchar(buffer, (c << 4) + d);
+            else luaL_addchar(buffer, (char) ((c << 4) + d));
return 0;
case '\r':
if (size < 2) return size;
@@ -502,7 +512,7 @@ static size_t qpdecode(UC c, UC *input,
return 0;
default:
if (input[0] == '\t' || (input[0] > 31 && input[0] < 127))
-                luaL_putchar(buffer, input[0]);
return 0;
}
}
@@ -527,6 +537,8 @@ static int mime_global_unqp(lua_State *L
lua_pushnil(L);
return 2;
}
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
/* process first part of input */
luaL_buffinit(L, &buffer);
while (input < last)
@@ -587,7 +599,7 @@ static int mime_global_qpwrp(lua_State *
left = length;
}
-                luaL_putchar(&buffer, *input);
left--;
break;
default:
@@ -595,7 +607,7 @@ static int mime_global_qpwrp(lua_State *
left = length;
}
-                luaL_putchar(&buffer, *input);
left--;
break;
}
@@ -630,7 +642,7 @@ static int eolprocess(int c, int last, c
return c;
}
} else {
-        luaL_putchar(buffer, c);
return 0;
}
}
@@ -670,7 +682,7 @@ static int mime_global_eol(lua_State *L)
\*-------------------------------------------------------------------------*/
static size_t dot(int c, size_t state, luaL_Buffer *buffer)
{
-    luaL_putchar(buffer, c);
switch (c) {
case '\r':
return 1;
@@ -678,7 +690,7 @@ static size_t dot(int c, size_t state, l
return (state == 1)? 2: 0;
case '.':
if (state == 2)
-                luaL_putchar(buffer, '.');
default:
return 0;
}
@@ -705,7 +717,7 @@ static int mime_global_dot(lua_State *L)
while (input < last)
state = dot(*input++, state, &buffer);
luaL_pushresult(&buffer);
-    lua_pushnumber(L, state);
+    lua_pushnumber(L, (lua_Number) state);
return 2;
}

diff -up luasocket-2.0.2/src/mime.h.21 luasocket-2.0.2/src/mime.h
--- luasocket-2.0.2/src/mime.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/mime.h	2013-05-10 13:49:50.364679160 -0400
@@ -7,16 +7,14 @@
* This module provides functions to implement transfer content encodings
* and formatting conforming to RFC 2045. It is used by mime.lua, which
* provide a higher level interface to this functionality.
-*
-* RCS ID: $Id: mime.h,v 1.15 2007/06/11 23:44:54 diego Exp$
\*=========================================================================*/
#include "lua.h"

/*-------------------------------------------------------------------------*\
* Current MIME library version
\*-------------------------------------------------------------------------*/
-#define MIME_VERSION    "MIME 1.0.2"
+#define MIME_VERSION    "MIME 1.0.3-rc1"
#define MIME_AUTHORS    "Diego Nehab"

/*-------------------------------------------------------------------------*\
diff -up luasocket-2.0.2/src/mime.lua.21 luasocket-2.0.2/src/mime.lua
--- luasocket-2.0.2/src/mime.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/mime.lua	2013-05-10 13:49:50.364679160 -0400
@@ -2,7 +2,6 @@
-- MIME support for the Lua language.
-- Author: Diego Nehab
-- Conforming to RFCs 2045-2049
--- RCS ID: $Id: mime.lua,v 1.29 2007/06/11 23:44:54 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -11,7 +10,6 @@
local base = _G
local ltn12 = require("ltn12")
local mime = require("mime.core")
-local io = require("io")
local string = require("string")
module("mime")

diff -up luasocket-2.0.2/src/options.c.21 luasocket-2.0.2/src/options.c
--- luasocket-2.0.2/src/options.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/options.c	2013-05-10 13:49:50.364679160 -0400
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Common option interface
* LuaSocket toolkit
-*
-* RCS ID: $Id: options.c,v 1.6 2005/11/20 07:20:23 diego Exp$
\*=========================================================================*/
#include <string.h>

@@ -12,14 +10,16 @@
#include "options.h"
#include "inet.h"

-
/*=========================================================================*\
* Internal functions prototypes
\*=========================================================================*/
static int opt_setmembership(lua_State *L, p_socket ps, int level, int name);
static int opt_setboolean(lua_State *L, p_socket ps, int level, int name);
+static int opt_getboolean(lua_State *L, p_socket ps, int level, int name);
static int opt_set(lua_State *L, p_socket ps, int level, int name,
void *val, int len);
+static int opt_get(lua_State *L, p_socket ps, int level, int name,
+        void *val, int* len);

/*=========================================================================*\
* Exported functions
@@ -40,42 +40,86 @@ int opt_meth_setoption(lua_State *L, p_o
return opt->func(L, ps);
}

+int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps)
+{
+    const char *name = luaL_checkstring(L, 2);      /* obj, name, ... */
+    while (opt->name && strcmp(name, opt->name))
+        opt++;
+    if (!opt->func) {
+        char msg[45];
+        sprintf(msg, "unsupported option %.35s'", name);
+        luaL_argerror(L, 2, msg);
+    }
+    return opt->func(L, ps);
+}
+
/* enables reuse of local address */
{
}

+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEADDR);
+}
+
+/* enables reuse of local port */
+int opt_set_reuseport(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEPORT);
+}
+
+int opt_get_reuseport(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEPORT);
+}
+
/* disables the Naggle algorithm */
-int opt_tcp_nodelay(lua_State *L, p_socket ps)
+int opt_set_tcp_nodelay(lua_State *L, p_socket ps)
{
return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY);
}

-int opt_keepalive(lua_State *L, p_socket ps)
+int opt_get_tcp_nodelay(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, IPPROTO_TCP, TCP_NODELAY);
+}
+
+int opt_set_keepalive(lua_State *L, p_socket ps)
{
return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE);
}

-int opt_dontroute(lua_State *L, p_socket ps)
+int opt_get_keepalive(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE);
+}
+
+int opt_set_dontroute(lua_State *L, p_socket ps)
{
return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE);
}

{
}

-int opt_ip_multicast_loop(lua_State *L, p_socket ps)
+int opt_set_ip_multicast_loop(lua_State *L, p_socket ps)
{
return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
}

-int opt_linger(lua_State *L, p_socket ps)
+int opt_get_ip_multicast_loop(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
+}
+
+int opt_set_linger(lua_State *L, p_socket ps)
{
struct linger li;                      /* obj, name, table */
-    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE));
lua_pushstring(L, "on");
lua_gettable(L, 3);
if (!lua_isboolean(L, -1))
@@ -89,29 +133,74 @@ int opt_linger(lua_State *L, p_socket ps
return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li));
}

-int opt_ip_multicast_ttl(lua_State *L, p_socket ps)
+int opt_get_linger(lua_State *L, p_socket ps)
+{
+    struct linger li;                      /* obj, name */
+    int len = sizeof(li);
+    int err = opt_get(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, &len);
+    if (err)
+        return err;
+    lua_newtable(L);
+    lua_pushboolean(L, li.l_onoff);
+    lua_setfield(L, -2, "on");
+    lua_pushinteger(L, li.l_linger);
+    lua_setfield(L, -2, "timeout");
+    return 1;
+}
+
+int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps)
{
int val = (int) luaL_checknumber(L, 3);    /* obj, name, int */
-    return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &val, sizeof(val));
+    return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_TTL,
+        (char *) &val, sizeof(val));
+}
+
+int opt_set_ip_multicast_if(lua_State *L, p_socket ps)
+{
+    const char *address = luaL_checkstring(L, 3);    /* obj, name, ip */
+        luaL_argerror(L, 3, "ip expected");
+    return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_IF,
+        (char *) &val, sizeof(val));
+}
+
+int opt_get_ip_multicast_if(lua_State *L, p_socket ps)
+{
+    socklen_t len = sizeof(val);
+    if (getsockopt(*ps, IPPROTO_IP, IP_MULTICAST_IF, (char *) &val, &len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockopt failed");
+        return 2;
+    }
+    lua_pushstring(L, inet_ntoa(val));
+    return 1;
}

{
}

-int opt_ip_drop_membersip(lua_State *L, p_socket ps)
+int opt_set_ip_drop_membersip(lua_State *L, p_socket ps)
{
return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP);
}

+int opt_set_ip6_v6only(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY);
+}
+
/*=========================================================================*\
* Auxiliar functions
\*=========================================================================*/
static int opt_setmembership(lua_State *L, p_socket ps, int level, int name)
{
struct ip_mreq val;                   /* obj, name, table */
-    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE));
lua_gettable(L, 3);
if (!lua_isstring(L, -1))
@@ -130,6 +219,19 @@ static int opt_setmembership(lua_State *
}

static
+int opt_get(lua_State *L, p_socket ps, int level, int name, void *val, int* len)
+{
+    socklen_t socklen = *len;
+    if (getsockopt(*ps, level, name, (char *) val, &socklen) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockopt failed");
+        return 2;
+    }
+    *len = socklen;
+    return 0;
+}
+
+static
int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len)
{
if (setsockopt(*ps, level, name, (char *) val, len) < 0) {
@@ -141,6 +243,17 @@ int opt_set(lua_State *L, p_socket ps, i
return 1;
}

+static int opt_getboolean(lua_State *L, p_socket ps, int level, int name)
+{
+    int val = 0;
+    int len = sizeof(val);
+    int err = opt_get(L, ps, level, name, (char *) &val, &len);
+    if (err)
+        return err;
+    lua_pushboolean(L, val);
+    return 1;
+}
+
static int opt_setboolean(lua_State *L, p_socket ps, int level, int name)
{
int val = auxiliar_checkboolean(L, 3);             /* obj, name, bool */
diff -up luasocket-2.0.2/src/options.h.21 luasocket-2.0.2/src/options.h
--- luasocket-2.0.2/src/options.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/options.h	2013-05-10 13:49:50.364679160 -0400
@@ -6,8 +6,6 @@
*
* This module provides a common interface to socket options, used mainly by
* modules UDP and TCP.
-*
-* RCS ID: $Id: options.h,v 1.4 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/

#include "lua.h"
@@ -20,20 +18,33 @@ typedef struct t_opt {
} t_opt;
typedef t_opt *p_opt;

-/* supported options */
-int opt_dontroute(lua_State *L, p_socket ps);
-int opt_tcp_nodelay(lua_State *L, p_socket ps);
-int opt_keepalive(lua_State *L, p_socket ps);
-int opt_linger(lua_State *L, p_socket ps);
-int opt_ip_multicast_ttl(lua_State *L, p_socket ps);
-int opt_ip_multicast_loop(lua_State *L, p_socket ps);
-int opt_ip_drop_membersip(lua_State *L, p_socket ps);
+/* supported options for setoption */
+int opt_set_dontroute(lua_State *L, p_socket ps);
+int opt_set_tcp_nodelay(lua_State *L, p_socket ps);
+int opt_set_keepalive(lua_State *L, p_socket ps);
+int opt_set_linger(lua_State *L, p_socket ps);
+int opt_set_reuseport(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_if(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_loop(lua_State *L, p_socket ps);
+int opt_set_ip_drop_membersip(lua_State *L, p_socket ps);
+int opt_set_ip6_v6only(lua_State *L, p_socket ps);
+
+/* supported options for getoption */
+int opt_get_tcp_nodelay(lua_State *L, p_socket ps);
+int opt_get_keepalive(lua_State *L, p_socket ps);
+int opt_get_linger(lua_State *L, p_socket ps);
+int opt_get_ip_multicast_loop(lua_State *L, p_socket ps);
+int opt_get_ip_multicast_if(lua_State *L, p_socket ps);

/* invokes the appropriate option handler */
int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps);
+int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps);

#endif
diff -up luasocket-2.0.2/src/select.c.21 luasocket-2.0.2/src/select.c
--- luasocket-2.0.2/src/select.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/select.c	2013-05-10 13:49:50.364679160 -0400
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Select implementation
* LuaSocket toolkit
-*
-* RCS ID: $Id: select.c,v 1.22 2005/11/20 07:20:23 diego Exp$
\*=========================================================================*/
#include <string.h>

@@ -18,8 +16,8 @@
\*=========================================================================*/
static t_socket getfd(lua_State *L);
static int dirty(lua_State *L);
-static t_socket collect_fd(lua_State *L, int tab, t_socket max_fd,
-        int itab, fd_set *set);
+static void collect_fd(lua_State *L, int tab, int itab,
+        fd_set *set, t_socket *max_fd);
static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set);
static void return_fd(lua_State *L, fd_set *set, t_socket max_fd,
int itab, int tab, int start);
@@ -27,7 +25,7 @@ static void make_assoc(lua_State *L, int
static int global_select(lua_State *L);

/* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{"select", global_select},
{NULL,     NULL}
};
@@ -39,6 +37,9 @@ static luaL_reg func[] = {
* Initializes module
\*-------------------------------------------------------------------------*/
int select_open(lua_State *L) {
+    lua_pushstring(L, "_SETSIZE");
+    lua_pushnumber(L, FD_SETSIZE);
+    lua_rawset(L, -3);
luaL_openlib(L, NULL, func, 0);
return 0;
}
@@ -51,7 +52,7 @@ int select_open(lua_State *L) {
\*-------------------------------------------------------------------------*/
static int global_select(lua_State *L) {
int rtab, wtab, itab, ret, ndirty;
-    t_socket max_fd;
+    t_socket max_fd = SOCKET_INVALID;
fd_set rset, wset;
t_timeout tm;
double t = luaL_optnumber(L, 3, -1);
@@ -60,12 +61,12 @@ static int global_select(lua_State *L) {
lua_newtable(L); itab = lua_gettop(L);
lua_newtable(L); rtab = lua_gettop(L);
lua_newtable(L); wtab = lua_gettop(L);
-    max_fd = collect_fd(L, 1, SOCKET_INVALID, itab, &rset);
+    collect_fd(L, 1, itab, &rset, &max_fd);
+    collect_fd(L, 2, itab, &wset, &max_fd);
ndirty = check_dirty(L, 1, rtab, &rset);
t = ndirty > 0? 0.0: t;
timeout_init(&tm, t, -1);
timeout_markstart(&tm);
-    max_fd = collect_fd(L, 2, max_fd, itab, &wset);
ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm);
if (ret > 0 || ndirty > 0) {
return_fd(L, &rset, max_fd+1, itab, rtab, ndirty);
@@ -77,7 +78,7 @@ static int global_select(lua_State *L) {
lua_pushstring(L, "timeout");
return 3;
} else {
-        lua_pushstring(L, "error");
+        luaL_error(L, "select failed");
return 3;
}
}
@@ -92,8 +93,10 @@ static t_socket getfd(lua_State *L) {
if (!lua_isnil(L, -1)) {
lua_pushvalue(L, -2);
lua_call(L, 1, 1);
-        if (lua_isnumber(L, -1))
-            fd = (t_socket) lua_tonumber(L, -1);
+        if (lua_isnumber(L, -1)) {
+            double numfd = lua_tonumber(L, -1);
+            fd = (numfd >= 0.0)? (t_socket) numfd: SOCKET_INVALID;
+        }
}
lua_pop(L, 1);
return fd;
@@ -112,12 +115,14 @@ static int dirty(lua_State *L) {
return is;
}

-static t_socket collect_fd(lua_State *L, int tab, t_socket max_fd,
-        int itab, fd_set *set) {
-    int i = 1;
-    if (lua_isnil(L, tab))
-        return max_fd;
-    while (1) {
+static void collect_fd(lua_State *L, int tab, int itab,
+        fd_set *set, t_socket *max_fd) {
+    int i = 1, n = 0;
+    /* nil is the same as an empty table */
+    if (lua_isnil(L, tab)) return;
+    /* otherwise we need it to be a table */
+    luaL_checktype(L, tab, LUA_TTABLE);
+    for ( ;; ) {
t_socket fd;
lua_pushnumber(L, i);
lua_gettable(L, tab);
@@ -125,26 +130,37 @@ static t_socket collect_fd(lua_State *L,
lua_pop(L, 1);
break;
}
+        /* getfd figures out if this is a socket */
fd = getfd(L);
if (fd != SOCKET_INVALID) {
+            /* make sure we don't overflow the fd_set */
+#ifdef _WIN32
+            if (n >= FD_SETSIZE)
+                luaL_argerror(L, tab, "too many sockets");
+#else
+            if (fd >= FD_SETSIZE)
+                luaL_argerror(L, tab, "descriptor too large for set size");
+#endif
FD_SET(fd, set);
-            if (max_fd == SOCKET_INVALID || max_fd < fd)
-                max_fd = fd;
-            lua_pushnumber(L, fd);
+            n++;
+            /* keep track of the largest descriptor so far */
+            if (*max_fd == SOCKET_INVALID || *max_fd < fd)
+                *max_fd = fd;
+            /* make sure we can map back from descriptor to the object */
+            lua_pushnumber(L, (lua_Number) fd);
lua_pushvalue(L, -2);
lua_settable(L, itab);
}
lua_pop(L, 1);
i = i + 1;
}
-    return max_fd;
}

static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
int ndirty = 0, i = 1;
if (lua_isnil(L, tab))
return 0;
-    while (1) {
+    for ( ;; ) {
t_socket fd;
lua_pushnumber(L, i);
lua_gettable(L, tab);
@@ -171,7 +187,7 @@ static void return_fd(lua_State *L, fd_s
for (fd = 0; fd < max_fd; fd++) {
if (FD_ISSET(fd, set)) {
lua_pushnumber(L, ++start);
-            lua_pushnumber(L, fd);
+            lua_pushnumber(L, (lua_Number) fd);
lua_gettable(L, itab);
lua_settable(L, tab);
}
@@ -181,7 +197,7 @@ static void return_fd(lua_State *L, fd_s
static void make_assoc(lua_State *L, int tab) {
int i = 1, atab;
lua_newtable(L); atab = lua_gettop(L);
-    while (1) {
+    for ( ;; ) {
lua_pushnumber(L, i);
lua_gettable(L, tab);
if (!lua_isnil(L, -1)) {
diff -up luasocket-2.0.2/src/select.h.21 luasocket-2.0.2/src/select.h
--- luasocket-2.0.2/src/select.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/select.h	2013-05-10 13:49:50.364679160 -0400
@@ -8,8 +8,6 @@
* method getfd() which returns the descriptor to be passed to the
* underlying select function. Another method, dirty(), should return
* true if there is data ready for reading (required for buffered input).
-*
-* RCS ID: $Id: select.h,v 1.7 2004/06/16 01:02:07 diego Exp$
\*=========================================================================*/

int select_open(lua_State *L);
diff -up luasocket-2.0.2/src/serial.c.21 luasocket-2.0.2/src/serial.c
--- luasocket-2.0.2/src/serial.c.21	2013-05-10 13:49:50.364679160 -0400
+++ luasocket-2.0.2/src/serial.c	2013-05-10 13:49:50.364679160 -0400
@@ -0,0 +1,183 @@
+/*=========================================================================*\
+* Serial stream
+* LuaSocket toolkit
+\*=========================================================================*/
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "auxiliar.h"
+#include "socket.h"
+#include "options.h"
+#include "unix.h"
+#include <sys/un.h>
+
+/*
+Reuses userdata definition from unix.h, since it is useful for all
+stream-like objects.
+
+If we stored the serial path for use in error messages or userdata
+printing, we might need our own userdata definition.
+
+Group usage is semi-inherited from unix.c, but unnecessary since we
+have only one object type.
+*/
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int global_create(lua_State *L);
+static int meth_send(lua_State *L);
+static int meth_close(lua_State *L);
+static int meth_settimeout(lua_State *L);
+static int meth_getfd(lua_State *L);
+static int meth_setfd(lua_State *L);
+static int meth_dirty(lua_State *L);
+static int meth_getstats(lua_State *L);
+static int meth_setstats(lua_State *L);
+
+/* serial object methods */
+static luaL_Reg serial_methods[] = {
+    {"__gc",        meth_close},
+    {"__tostring",  auxiliar_tostring},
+    {"close",       meth_close},
+    {"dirty",       meth_dirty},
+    {"getfd",       meth_getfd},
+    {"getstats",    meth_getstats},
+    {"setstats",    meth_setstats},
+    {"send",        meth_send},
+    {"setfd",       meth_setfd},
+    {"settimeout",  meth_settimeout},
+    {NULL,          NULL}
+};
+
+/* our socket creation function */
+static luaL_Reg func[] = {
+    {"serial", global_create},
+    {NULL,          NULL}
+};
+
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+LUASOCKET_API int luaopen_socket_serial(lua_State *L) {
+    /* create classes */
+    auxiliar_newclass(L, "serial{client}", serial_methods);
+    /* create class groups */
+    /* make sure the function ends up in the package table */
+    luaL_openlib(L, "socket", func, 0);
+    /* return the function instead of the 'socket' table */
+    lua_pushstring(L, "serial");
+    lua_gettable(L, -2);
+    return 1;
+}
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Just call buffered IO methods
+\*-------------------------------------------------------------------------*/
+static int meth_send(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_send(L, &un->buf);
+}
+
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+}
+
+static int meth_getstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_getstats(L, &un->buf);
+}
+
+static int meth_setstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_setstats(L, &un->buf);
+}
+
+/*-------------------------------------------------------------------------*\
+* Select support methods
+\*-------------------------------------------------------------------------*/
+static int meth_getfd(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    lua_pushnumber(L, (int) un->sock);
+    return 1;
+}
+
+/* this is very dangerous, but can be handy for those that are brave enough */
+static int meth_setfd(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    un->sock = (t_socket) luaL_checknumber(L, 2);
+    return 0;
+}
+
+static int meth_dirty(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    lua_pushboolean(L, !buffer_isempty(&un->buf));
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Closes socket used by object
+\*-------------------------------------------------------------------------*/
+static int meth_close(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    socket_destroy(&un->sock);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+
+/*-------------------------------------------------------------------------*\
+* Just call tm methods
+\*-------------------------------------------------------------------------*/
+static int meth_settimeout(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    return timeout_meth_settimeout(L, &un->tm);
+}
+
+/*=========================================================================*\
+* Library functions
+\*=========================================================================*/
+
+
+/*-------------------------------------------------------------------------*\
+* Creates a serial object
+\*-------------------------------------------------------------------------*/
+static int global_create(lua_State *L) {
+    const char* path = luaL_checkstring(L, 1);
+
+    /* allocate unix object */
+    p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix));
+
+    /* open serial device */
+    t_socket sock = open(path, O_NOCTTY|O_RDWR);
+
+    /*printf("open %s on %d\n", path, sock);*/
+
+    if (sock < 0)  {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(errno));
+        lua_pushnumber(L, errno);
+        return 3;
+    }
+    /* set its type as client object */
+    auxiliar_setclass(L, "serial{client}", -1);
+    /* initialize remaining structure fields */
+    socket_setnonblocking(&sock);
+    un->sock = sock;
+    io_init(&un->io, (p_send) socket_write, (p_recv) socket_read,
+            (p_error) socket_ioerror, &un->sock);
+    timeout_init(&un->tm, -1, -1);
+    buffer_init(&un->buf, &un->io, &un->tm);
+    return 1;
+}
diff -up luasocket-2.0.2/src/smtp.lua.21 luasocket-2.0.2/src/smtp.lua
--- luasocket-2.0.2/src/smtp.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/smtp.lua	2013-05-10 13:49:50.364679160 -0400
@@ -2,7 +2,6 @@
-- SMTP client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -16,6 +15,7 @@ local os = require("os")
local socket = require("socket")
local tp = require("socket.tp")
local ltn12 = require("ltn12")
local mime = require("mime")
module("socket.smtp")

@@ -75,9 +75,9 @@ end
self.try(self.tp:check("3.."))
-    self.try(self.tp:command(mime.b64(user)))
+    self.try(self.tp:send(mime.b64(user) .. "\r\n"))
self.try(self.tp:check("3.."))
return self.try(self.tp:check("2.."))
end

@@ -146,10 +146,11 @@ end
local send_message

-- yield the headers all at once, it's faster
local h = "\r\n"
-    for i,v in base.pairs(headers) do
-        h = i .. ': ' .. v .. "\r\n" .. h
+    for f,v in base.pairs(tosend) do
+        h = (canonic[f] or f) .. ': ' .. v .. "\r\n" .. h
end
coroutine.yield(h)
end
diff -up luasocket-2.0.2/src/socket.h.21 luasocket-2.0.2/src/socket.h
--- luasocket-2.0.2/src/socket.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/socket.h	2013-05-10 13:49:50.364679160 -0400
@@ -8,8 +8,6 @@
* differences. Also, not all *nix platforms behave the same. This module
* (and the associated usocket.h and wsocket.h) factor these differences and
* creates a interface compatible with the io.h module.
-*
-* RCS ID: $Id: socket.h,v 1.20 2005/11/20 07:20:23 diego Exp$
\*=========================================================================*/
#include "io.h"

@@ -61,6 +59,7 @@ int socket_accept(p_socket ps, p_socket

const char *socket_hoststrerror(int err);
+const char *socket_gaistrerror(int err);
const char *socket_strerror(int err);

/* these are perfect to use with the io abstraction module
@@ -68,6 +67,9 @@ const char *socket_strerror(int err);
int socket_send(p_socket ps, const char *data, size_t count,
size_t *sent, p_timeout tm);
int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
+int socket_write(p_socket ps, const char *data, size_t count,
+        size_t *sent, p_timeout tm);
+int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
const char *socket_ioerror(p_socket ps, int err);

diff -up luasocket-2.0.2/src/socket.lua.21 luasocket-2.0.2/src/socket.lua
--- luasocket-2.0.2/src/socket.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/socket.lua	2013-05-10 13:49:50.365679160 -0400
@@ -1,7 +1,6 @@
-----------------------------------------------------------------------------
-- LuaSocket helper module
-- Author: Diego Nehab
--- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -16,27 +15,41 @@ module("socket")
-----------------------------------------------------------------------------
-- Exported auxiliar functions
-----------------------------------------------------------------------------
-    local sock, err = socket.tcp()
-    if not sock then return nil, err end
-        local res, err = sock:bind(laddress, lport, -1)
-        if not res then return nil, err end
-    end
-    local res, err = sock:connect(address, port)
-    if not res then return nil, err end
-    return sock
+end
+
end

function bind(host, port, backlog)
-    local sock, err = socket.tcp()
-    if not sock then return nil, err end
-    local res, err = sock:bind(host, port)
-    if not res then return nil, err end
-    res, err = sock:listen(backlog)
-    if not res then return nil, err end
-    return sock
+    if host == "*" then host = "0.0.0.0" end
+    if not addrinfo then return nil, err end
+    local sock, res
+    err = "no info on address"
+    for i, alt in base.ipairs(addrinfo) do
+        if alt.family == "inet" then
+            sock, err = socket.tcp()
+        else
+            sock, err = socket.tcp6()
+        end
+        if not sock then return nil, err end
+        res, err = sock:bind(alt.addr, port)
+        if not res then
+            sock:close()
+        else
+            res, err = sock:listen(backlog)
+            if not res then
+                sock:close()
+            else
+                return sock
+            end
+        end
+    end
+    return nil, err
end

try = newtry()
diff -up luasocket-2.0.2/src/tcp.c.21 luasocket-2.0.2/src/tcp.c
--- luasocket-2.0.2/src/tcp.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/tcp.c	2013-05-10 13:49:50.365679160 -0400
@@ -1,10 +1,8 @@
/*=========================================================================*\
-* TCP object
+* TCP object
* LuaSocket toolkit
-*
-* RCS ID: $Id: tcp.c,v 1.41 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
-#include <string.h>
+#include <string.h>

#include "lua.h"
#include "lauxlib.h"
@@ -19,8 +17,11 @@
* Internal function prototypes
\*=========================================================================*/
static int global_create(lua_State *L);
+static int global_create6(lua_State *L);
+static int global_connect(lua_State *L);
static int meth_connect(lua_State *L);
static int meth_listen(lua_State *L);
+static int meth_getfamily(lua_State *L);
static int meth_bind(lua_State *L);
static int meth_send(lua_State *L);
static int meth_getstats(lua_State *L);
@@ -31,6 +32,7 @@ static int meth_shutdown(lua_State *L);
static int meth_accept(lua_State *L);
static int meth_close(lua_State *L);
+static int meth_getoption(lua_State *L);
static int meth_setoption(lua_State *L);
static int meth_settimeout(lua_State *L);
static int meth_getfd(lua_State *L);
@@ -38,7 +40,7 @@ static int meth_setfd(lua_State *L);
static int meth_dirty(lua_State *L);

/* tcp object methods */
-static luaL_reg tcp[] = {
+static luaL_Reg tcp_methods[] = {
{"__gc",        meth_close},
{"__tostring",  auxiliar_tostring},
{"accept",      meth_accept},
@@ -46,7 +48,9 @@ static luaL_reg tcp[] = {
{"close",       meth_close},
{"connect",     meth_connect},
{"dirty",       meth_dirty},
+    {"getfamily",   meth_getfamily},
{"getfd",       meth_getfd},
+    {"getoption",   meth_getoption},
{"getpeername", meth_getpeername},
{"getsockname", meth_getsockname},
{"getstats",    meth_getstats},
@@ -64,17 +68,28 @@ static luaL_reg tcp[] = {
};

/* socket option handlers */
-static t_opt opt[] = {
-    {"keepalive",   opt_keepalive},
-    {"tcp-nodelay", opt_tcp_nodelay},
-    {"linger",      opt_linger},
+static t_opt optget[] = {
+    {"keepalive",   opt_get_keepalive},
+    {"tcp-nodelay", opt_get_tcp_nodelay},
+    {"linger",      opt_get_linger},
+    {NULL,          NULL}
+};
+
+static t_opt optset[] = {
+    {"keepalive",   opt_set_keepalive},
+    {"tcp-nodelay", opt_set_tcp_nodelay},
+    {"ipv6-v6only", opt_set_ip6_v6only},
+    {"linger",      opt_set_linger},
{NULL,          NULL}
};

/* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{"tcp", global_create},
+    {"tcp6", global_create6},
+    {"connect", global_connect},
{NULL, NULL}
};

@@ -84,15 +99,15 @@ static luaL_reg func[] = {
int tcp_open(lua_State *L)
{
/* create classes */
-    auxiliar_newclass(L, "tcp{master}", tcp);
-    auxiliar_newclass(L, "tcp{client}", tcp);
-    auxiliar_newclass(L, "tcp{server}", tcp);
+    auxiliar_newclass(L, "tcp{master}", tcp_methods);
+    auxiliar_newclass(L, "tcp{client}", tcp_methods);
+    auxiliar_newclass(L, "tcp{server}", tcp_methods);
/* create class groups */
/* define library functions */
-    luaL_openlib(L, NULL, func, 0);
+    luaL_openlib(L, NULL, func, 0);
return 0;
}

@@ -125,10 +140,16 @@ static int meth_setstats(lua_State *L) {
/*-------------------------------------------------------------------------*\
* Just call option handler
\*-------------------------------------------------------------------------*/
+static int meth_getoption(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return opt_meth_getoption(L, optget, &tcp->sock);
+}
+
static int meth_setoption(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return opt_meth_setoption(L, opt, &tcp->sock);
+    return opt_meth_setoption(L, optset, &tcp->sock);
}

/*-------------------------------------------------------------------------*\
@@ -145,7 +166,7 @@ static int meth_getfd(lua_State *L)
static int meth_setfd(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    tcp->sock = (t_socket) luaL_checknumber(L, 2);
+    tcp->sock = (t_socket) luaL_checknumber(L, 2);
return 0;
}

@@ -157,43 +178,52 @@ static int meth_dirty(lua_State *L)
}

/*-------------------------------------------------------------------------*\
-* Waits for and returns a client object attempting connection to the
-* server object
+* Waits for and returns a client object attempting connection to the
+* server object
\*-------------------------------------------------------------------------*/
static int meth_accept(lua_State *L)
{
p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1);
p_timeout tm = timeout_markstart(&server->tm);
t_socket sock;
-    int err = socket_accept(&server->sock, &sock, NULL, NULL, tm);
+    const char *err = inet_tryaccept(&server->sock, server->family, &sock, tm);
/* if successful, push client socket */
-    if (err == IO_DONE) {
+    if (err == NULL) {
p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
auxiliar_setclass(L, "tcp{client}", -1);
/* initialize structure fields */
+        memset(clnt, 0, sizeof(t_tcp));
socket_setnonblocking(&sock);
clnt->sock = sock;
-        io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv,
+        io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv,
(p_error) socket_ioerror, &clnt->sock);
timeout_init(&clnt->tm, -1, -1);
buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
+        clnt->family = server->family;
return 1;
} else {
-        lua_pushnil(L);
-        lua_pushstring(L, socket_strerror(err));
+        lua_pushnil(L);
+        lua_pushstring(L, err);
return 2;
}
}

/*-------------------------------------------------------------------------*\
-* Binds an object to an address
+* Binds an object to an address
\*-------------------------------------------------------------------------*/
static int meth_bind(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1);
const char *address =  luaL_checkstring(L, 2);
-    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
-    const char *err = inet_trybind(&tcp->sock, address, port);
+    const char *port = luaL_checkstring(L, 3);
+    const char *err;
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_STREAM;
+    bindhints.ai_family = tcp->family;
+    bindhints.ai_flags = AI_PASSIVE;
+    err = inet_trybind(&tcp->sock, address, port, &bindhints);
if (err) {
lua_pushnil(L);
lua_pushstring(L, err);
@@ -210,9 +240,15 @@ static int meth_connect(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
const char *address =  luaL_checkstring(L, 2);
-    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
-    p_timeout tm = timeout_markstart(&tcp->tm);
-    const char *err = inet_tryconnect(&tcp->sock, address, port, tm);
+    const char *port = luaL_checkstring(L, 3);
+    const char *err;
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_STREAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = tcp->family;
+    timeout_markstart(&tcp->tm);
+    err = inet_tryconnect(&tcp->sock, address, port, &tcp->tm, &connecthints);
/* have to set the class even if it failed due to non-blocking connects */
auxiliar_setclass(L, "tcp{client}", 1);
if (err) {
@@ -220,13 +256,12 @@ static int meth_connect(lua_State *L)
lua_pushstring(L, err);
return 2;
}
-    /* turn master object into a client object */
lua_pushnumber(L, 1);
return 1;
}

/*-------------------------------------------------------------------------*\
-* Closes socket used by object
+* Closes socket used by object
\*-------------------------------------------------------------------------*/
static int meth_close(lua_State *L)
{
@@ -237,6 +272,21 @@ static int meth_close(lua_State *L)
}

/*-------------------------------------------------------------------------*\
+* Returns family as string
+\*-------------------------------------------------------------------------*/
+static int meth_getfamily(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    if (tcp->family == PF_INET6) {
+        lua_pushliteral(L, "inet6");
+        return 1;
+    } else {
+        lua_pushliteral(L, "inet4");
+        return 1;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
* Puts the sockt in listen mode
\*-------------------------------------------------------------------------*/
static int meth_listen(lua_State *L)
@@ -260,27 +310,13 @@ static int meth_listen(lua_State *L)
\*-------------------------------------------------------------------------*/
static int meth_shutdown(lua_State *L)
{
+    /* SHUT_RD,  SHUT_WR,  SHUT_RDWR  have  the value 0, 1, 2, so we can use method index directly */
+    static const char* methods[] = { "receive", "send", "both", NULL };
p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
-    const char *how = luaL_optstring(L, 2, "both");
-    switch (how[0]) {
-        case 'b':
-            if (strcmp(how, "both")) goto error;
-            socket_shutdown(&tcp->sock, 2);
-            break;
-        case 's':
-            if (strcmp(how, "send")) goto error;
-            socket_shutdown(&tcp->sock, 1);
-            break;
-        case 'r':
-            if (strcmp(how, "receive")) goto error;
-            socket_shutdown(&tcp->sock, 0);
-            break;
-    }
+    int how = luaL_checkoption(L, 2, "both", methods);
+    socket_shutdown(&tcp->sock, how);
lua_pushnumber(L, 1);
return 1;
-error:
-    luaL_argerror(L, 2, "invalid shutdown method");
-    return 0;
}

/*-------------------------------------------------------------------------*\
@@ -289,13 +325,13 @@ error:
static int meth_getpeername(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return inet_meth_getpeername(L, &tcp->sock);
+    return inet_meth_getpeername(L, &tcp->sock, tcp->family);
}

static int meth_getsockname(lua_State *L)
{
p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return inet_meth_getsockname(L, &tcp->sock);
+    return inet_meth_getsockname(L, &tcp->sock, tcp->family);
}

/*-------------------------------------------------------------------------*\
@@ -311,25 +347,31 @@ static int meth_settimeout(lua_State *L)
* Library functions
\*=========================================================================*/
/*-------------------------------------------------------------------------*\
-* Creates a master tcp object
+* Creates a master tcp object
\*-------------------------------------------------------------------------*/
-static int global_create(lua_State *L)
-{
+static int tcp_create(lua_State *L, int family) {
t_socket sock;
-    const char *err = inet_trycreate(&sock, SOCK_STREAM);
+    const char *err = inet_trycreate(&sock, family, SOCK_STREAM);
/* try to allocate a system socket */
-    if (!err) {
+    if (!err) {
/* allocate tcp object */
p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+        memset(tcp, 0, sizeof(t_tcp));
/* set its type as master object */
auxiliar_setclass(L, "tcp{master}", -1);
/* initialize remaining structure fields */
socket_setnonblocking(&sock);
+        if (family == PF_INET6) {
+            int yes = 1;
+            setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+                (void *)&yes, sizeof(yes));
+        }
tcp->sock = sock;
-        io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv,
+        io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv,
(p_error) socket_ioerror, &tcp->sock);
timeout_init(&tcp->tm, -1, -1);
buffer_init(&tcp->buf, &tcp->io, &tcp->tm);
+        tcp->family = family;
return 1;
} else {
lua_pushnil(L);
@@ -337,3 +379,97 @@ static int global_create(lua_State *L)
return 2;
}
}
+
+static int global_create(lua_State *L) {
+    return tcp_create(L, AF_INET);
+}
+
+static int global_create6(lua_State *L) {
+    return tcp_create(L, AF_INET6);
+}
+
+static const char *tryconnect6(const char *remoteaddr, const char *remoteserv,
+    struct addrinfo *connecthints, p_tcp tcp) {
+    struct addrinfo *iterator = NULL, *resolved = NULL;
+    const char *err = NULL;
+    /* try resolving */
+                connecthints, &resolved));
+    if (err != NULL) {
+        return err;
+    }
+    /* iterate over all returned addresses trying to connect */
+    for (iterator = resolved; iterator; iterator = iterator->ai_next) {
+        p_timeout tm = timeout_markstart(&tcp->tm);
+        /* create new socket if one wasn't created by the bind stage */
+        if (tcp->sock == SOCKET_INVALID) {
+            err = socket_strerror(socket_create(&tcp->sock,
+                iterator->ai_family, iterator->ai_socktype,
+                iterator->ai_protocol));
+            if (err != NULL) {
+                return err;
+            }
+            tcp->family = iterator->ai_family;
+            /* all sockets initially non-blocking */
+            socket_setnonblocking(&tcp->sock);
+        }
+        /* finally try connecting to remote address */
+        err = socket_strerror(socket_connect(&tcp->sock,
+        /* if success, break out of loop */
+        if (err == NULL) break;
+    }
+
+    /* here, if err is set, we failed */
+    return err;
+}
+
+static int global_connect(lua_State *L) {
+    const char *remoteaddr = luaL_checkstring(L, 1);
+    const char *remoteserv = luaL_checkstring(L, 2);
+    const char *localaddr  = luaL_optstring(L, 3, NULL);
+    const char *localserv  = luaL_optstring(L, 4, "0");
+    int family = inet_optfamily(L, 5, "unspec");
+    p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+    const char *err = NULL;
+    /* initialize tcp structure */
+    memset(tcp, 0, sizeof(t_tcp));
+    io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv,
+            (p_error) socket_ioerror, &tcp->sock);
+    timeout_init(&tcp->tm, -1, -1);
+    buffer_init(&tcp->buf, &tcp->io, &tcp->tm);
+    tcp->sock = SOCKET_INVALID;
+    /* allow user to pick local address and port */
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_STREAM;
+    bindhints.ai_family = family;
+    bindhints.ai_flags = AI_PASSIVE;
+        err = inet_trybind(&tcp->sock, localaddr, localserv, &bindhints);
+        if (err) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+        tcp->family = bindhints.ai_family;
+    }
+    /* try to connect to remote address and port */
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_STREAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = bindhints.ai_family;
+    err = tryconnect6(remoteaddr, remoteserv, &connecthints, tcp);
+    if (err) {
+        socket_destroy(&tcp->sock);
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    auxiliar_setclass(L, "tcp{client}", -1);
+    return 1;
+}
diff -up luasocket-2.0.2/src/tcp.h.21 luasocket-2.0.2/src/tcp.h
--- luasocket-2.0.2/src/tcp.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/tcp.h	2013-05-10 13:49:50.365679160 -0400
@@ -13,8 +13,6 @@
* objects are tcp objects bound to some local address. Client objects are
* tcp objects either connected to some address or returned by the accept
* method of a server object.
-*
-* RCS ID: $Id: tcp.h,v 1.7 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
#include "lua.h"

@@ -27,6 +25,7 @@ typedef struct t_tcp_ {
t_io io;
t_buffer buf;
t_timeout tm;
+    int family;
} t_tcp;

typedef t_tcp *p_tcp;
diff -up luasocket-2.0.2/src/timeout.c.21 luasocket-2.0.2/src/timeout.c
--- luasocket-2.0.2/src/timeout.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/timeout.c	2013-05-10 13:49:50.365679160 -0400
@@ -1,10 +1,10 @@
/*=========================================================================*\
* Timeout management functions
* LuaSocket toolkit
-*
-* RCS ID: $Id: timeout.c,v 1.30 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
#include <stdio.h>
+#include <limits.h>
+#include <float.h>

#include "lua.h"
#include "lauxlib.h"
@@ -33,7 +33,7 @@
static int timeout_lua_gettime(lua_State *L);
static int timeout_lua_sleep(lua_State *L);

-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{ "gettime", timeout_lua_gettime },
{ "sleep", timeout_lua_sleep },
{ NULL, NULL }
@@ -187,13 +187,23 @@ static int timeout_lua_gettime(lua_State
/*-------------------------------------------------------------------------*\
* Sleep for n seconds.
\*-------------------------------------------------------------------------*/
+#ifdef _WIN32
int timeout_lua_sleep(lua_State *L)
{
double n = luaL_checknumber(L, 1);
-#ifdef _WIN32
-    Sleep((int)(n*1000));
+    if (n < 0.0) n = 0.0;
+    if (n < DBL_MAX/1000.0) n *= 1000.0;
+    if (n > INT_MAX) n = INT_MAX;
+    Sleep((int)n);
+    return 0;
+}
#else
+int timeout_lua_sleep(lua_State *L)
+{
+    double n = luaL_checknumber(L, 1);
struct timespec t, r;
+    if (n < 0.0) n = 0.0;
+    if (n > INT_MAX) n = INT_MAX;
t.tv_sec = (int) n;
n -= t.tv_sec;
t.tv_nsec = (int) (n * 1000000000);
@@ -202,6 +212,6 @@ int timeout_lua_sleep(lua_State *L)
t.tv_sec = r.tv_sec;
t.tv_nsec = r.tv_nsec;
}
-#endif
return 0;
}
+#endif
diff -up luasocket-2.0.2/src/timeout.h.21 luasocket-2.0.2/src/timeout.h
--- luasocket-2.0.2/src/timeout.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/timeout.h	2013-05-10 13:49:50.365679160 -0400
@@ -3,8 +3,6 @@
/*=========================================================================*\
* Timeout management functions
* LuaSocket toolkit
-*
-* RCS ID: $Id: timeout.h,v 1.14 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
#include "lua.h"

diff -up luasocket-2.0.2/src/tp.lua.21 luasocket-2.0.2/src/tp.lua
--- luasocket-2.0.2/src/tp.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/tp.lua	2013-05-10 13:49:50.365679160 -0400
@@ -2,7 +2,6 @@
-- Unified SMTP/FTP subsystem
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: tp.lua,v 1.22 2006/03/14 09:04:15 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -64,6 +63,7 @@ function metat.__index:check(ok)
end

function metat.__index:command(cmd, arg)
+    cmd = string.upper(cmd)
if arg then
return self.c:send(cmd .. " " .. arg.. "\r\n")
else
@@ -105,7 +105,7 @@ end
-- closes the underlying c
function metat.__index:close()
self.c:close()
-	return 1
+    return 1
end

-- connect with server and return c object
diff -up luasocket-2.0.2/src/udp.c.21 luasocket-2.0.2/src/udp.c
--- luasocket-2.0.2/src/udp.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/udp.c	2013-05-10 13:49:50.365679160 -0400
@@ -1,10 +1,8 @@
/*=========================================================================*\
-* UDP object
+* UDP object
* LuaSocket toolkit
-*
-* RCS ID: $Id: udp.c,v 1.29 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
-#include <string.h>
+#include <string.h>

#include "lua.h"
#include "lauxlib.h"
@@ -18,36 +16,40 @@
/* min and max macros */
#ifndef MIN
#define MIN(x, y) ((x) < (y) ? x : y)
-#endif
+#endif
#ifndef MAX
#define MAX(x, y) ((x) > (y) ? x : y)
-#endif
+#endif

/*=========================================================================*\
* Internal function prototypes
\*=========================================================================*/
static int global_create(lua_State *L);
+static int global_create6(lua_State *L);
static int meth_send(lua_State *L);
static int meth_sendto(lua_State *L);
+static int meth_getfamily(lua_State *L);
static int meth_getsockname(lua_State *L);
static int meth_getpeername(lua_State *L);
static int meth_setsockname(lua_State *L);
static int meth_setpeername(lua_State *L);
static int meth_close(lua_State *L);
static int meth_setoption(lua_State *L);
+static int meth_getoption(lua_State *L);
static int meth_settimeout(lua_State *L);
static int meth_getfd(lua_State *L);
static int meth_setfd(lua_State *L);
static int meth_dirty(lua_State *L);

/* udp object methods */
-static luaL_reg udp[] = {
+static luaL_Reg udp_methods[] = {
{"__gc",        meth_close},
{"__tostring",  auxiliar_tostring},
{"close",       meth_close},
{"dirty",       meth_dirty},
+    {"getfamily",   meth_getfamily},
{"getfd",       meth_getfd},
{"getpeername", meth_getpeername},
{"getsockname", meth_getsockname},
@@ -57,27 +59,39 @@ static luaL_reg udp[] = {
{"sendto",      meth_sendto},
{"setfd",       meth_setfd},
{"setoption",   meth_setoption},
+    {"getoption",   meth_getoption},
{"setpeername", meth_setpeername},
{"setsockname", meth_setsockname},
{"settimeout",  meth_settimeout},
{NULL,          NULL}
};

-/* socket options */
-static t_opt opt[] = {
-    {"dontroute",          opt_dontroute},
-    {"ip-multicast-ttl",   opt_ip_multicast_ttl},
-    {"ip-multicast-loop",  opt_ip_multicast_loop},
-    {"ip-drop-membership", opt_ip_drop_membersip},
-    {NULL,          NULL}
+/* socket options for setoption */
+static t_opt optset[] = {
+    {"dontroute",          opt_set_dontroute},
+    {"reuseport",          opt_set_reuseport},
+    {"ip-multicast-if",    opt_set_ip_multicast_if},
+    {"ip-multicast-ttl",   opt_set_ip_multicast_ttl},
+    {"ip-multicast-loop",  opt_set_ip_multicast_loop},
+    {"ip-drop-membership", opt_set_ip_drop_membersip},
+    {"ipv6-v6only",        opt_set_ip6_v6only},
+    {NULL,                 NULL}
+};
+
+/* socket options for getoption */
+static t_opt optget[] = {
+    {"ip-multicast-if",    opt_get_ip_multicast_if},
+    {"ip-multicast-loop",  opt_get_ip_multicast_loop},
+    {NULL,                 NULL}
};

/* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{"udp", global_create},
+    {"udp6", global_create6},
{NULL, NULL}
};

@@ -87,15 +101,15 @@ static luaL_reg func[] = {
int udp_open(lua_State *L)
{
/* create classes */
-    auxiliar_newclass(L, "udp{connected}", udp);
-    auxiliar_newclass(L, "udp{unconnected}", udp);
+    auxiliar_newclass(L, "udp{connected}", udp_methods);
+    auxiliar_newclass(L, "udp{unconnected}", udp_methods);
/* create class groups */
/* define library functions */
-    luaL_openlib(L, NULL, func, 0);
+    luaL_openlib(L, NULL, func, 0);
return 0;
}

@@ -125,7 +139,7 @@ static int meth_send(lua_State *L) {
lua_pushstring(L, udp_strerror(err));
return 2;
}
-    lua_pushnumber(L, sent);
+    lua_pushnumber(L, (lua_Number) sent);
return 1;
}

@@ -139,22 +153,43 @@ static int meth_sendto(lua_State *L) {
const char *ip = luaL_checkstring(L, 3);
unsigned short port = (unsigned short) luaL_checknumber(L, 4);
p_timeout tm = &udp->tm;
int err;
-        luaL_argerror(L, 3, "invalid ip address");
-    timeout_markstart(tm);
-    err = socket_sendto(&udp->sock, data, count, &sent,
+    switch (udp->family) {
+	case PF_INET: {
+		luaL_argerror(L, 3, "invalid ip address");
+	    timeout_markstart(tm);
+	    err = socket_sendto(&udp->sock, data, count, &sent,
+	    break;
+	}
+	case PF_INET6: {
+		luaL_argerror(L, 3, "invalid ip address");
+	    timeout_markstart(tm);
+	    err = socket_sendto(&udp->sock, data, count, &sent,
+	    break;
+	}
+	default:
+            lua_pushnil(L);
+            lua_pushfstring(L, "unknown family %d", udp->family);
+            return 2;
+    }
if (err != IO_DONE) {
lua_pushnil(L);
lua_pushstring(L, udp_strerror(err));
return 2;
}
-    lua_pushnumber(L, sent);
+    lua_pushnumber(L, (lua_Number) sent);
return 1;
}

@@ -170,6 +205,9 @@ static int meth_receive(lua_State *L) {
count = MIN(count, sizeof(buffer));
timeout_markstart(tm);
err = socket_recv(&udp->sock, buffer, count, &got, tm);
+    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+    if (err == IO_CLOSED)
+        err = IO_DONE;
if (err != IO_DONE) {
lua_pushnil(L);
lua_pushstring(L, udp_strerror(err));
@@ -184,26 +222,82 @@ static int meth_receive(lua_State *L) {
\*-------------------------------------------------------------------------*/
p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
char buffer[UDP_DATAGRAMSIZE];
size_t got, count = (size_t) luaL_optnumber(L, 2, sizeof(buffer));
int err;
p_timeout tm = &udp->tm;
timeout_markstart(tm);
count = MIN(count, sizeof(buffer));
-    err = socket_recvfrom(&udp->sock, buffer, count, &got,
-    if (err == IO_DONE) {
-        lua_pushlstring(L, buffer, got);
-        return 3;
-    } else {
+    switch (udp->family) {
+	case PF_INET: {
+	    err = socket_recvfrom(&udp->sock, buffer, count, &got,
+	    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+	    if (err == IO_CLOSED)
+		err = IO_DONE;
+	    if (err == IO_DONE) {
+		lua_pushlstring(L, buffer, got);
+		    lua_pushnil(L);
+		    return 2;
+		}
+		return 3;
+	    }
+	    break;
+	}
+	case PF_INET6: {
+	    err = socket_recvfrom(&udp->sock, buffer, count, &got,
+	    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+	    if (err == IO_CLOSED)
+		err = IO_DONE;
+	    if (err == IO_DONE) {
+		lua_pushlstring(L, buffer, got);
+		    lua_pushnil(L);
+		    return 2;
+		}
+		return 3;
+	    }
+	    break;
+	}
+    default:
lua_pushnil(L);
-        lua_pushstring(L, udp_strerror(err));
+        lua_pushfstring(L, "unknown family %d", udp->family);
return 2;
}
+    lua_pushnil(L);
+    lua_pushstring(L, udp_strerror(err));
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Returns family as string
+\*-------------------------------------------------------------------------*/
+static int meth_getfamily(lua_State *L)
+{
+    p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
+    if (udp->family == PF_INET6) {
+        lua_pushliteral(L, "inet6");
+        return 1;
+    } else {
+        lua_pushliteral(L, "inet4");
+        return 1;
+    }
}

/*-------------------------------------------------------------------------*\
@@ -234,12 +328,12 @@ static int meth_dirty(lua_State *L) {
\*-------------------------------------------------------------------------*/
static int meth_getpeername(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1);
-    return inet_meth_getpeername(L, &udp->sock);
+    return inet_meth_getpeername(L, &udp->sock, udp->family);
}

static int meth_getsockname(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
-    return inet_meth_getsockname(L, &udp->sock);
+    return inet_meth_getsockname(L, &udp->sock, udp->family);
}

/*-------------------------------------------------------------------------*\
@@ -247,7 +341,15 @@ static int meth_getsockname(lua_State *L
\*-------------------------------------------------------------------------*/
static int meth_setoption(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
-    return opt_meth_setoption(L, opt, &udp->sock);
+    return opt_meth_setoption(L, optset, &udp->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call option handler
+\*-------------------------------------------------------------------------*/
+static int meth_getoption(lua_State *L) {
+    p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
+    return opt_meth_getoption(L, optget, &udp->sock);
}

/*-------------------------------------------------------------------------*\
@@ -264,26 +366,36 @@ static int meth_settimeout(lua_State *L)
static int meth_setpeername(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
p_timeout tm = &udp->tm;
-    const char *address =  luaL_checkstring(L, 2);
+    const char *address = luaL_checkstring(L, 2);
-    unsigned short port = connecting ?
-        (unsigned short) luaL_checknumber(L, 3) :
-        (unsigned short) luaL_optnumber(L, 3, 0);
-    const char *err = inet_tryconnect(&udp->sock, address, port, tm);
-    if (err) {
-        lua_pushnil(L);
-        lua_pushstring(L, err);
-        return 2;
+    const char *port = connecting? luaL_checkstring(L, 3): "0";
+    const char *err;
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_DGRAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = udp->family;
+    if (connecting) {
+        err = inet_tryconnect(&udp->sock, address, port, tm, &connecthints);
+        if (err) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+        auxiliar_setclass(L, "udp{connected}", 1);
+    } else {
+        /* we ignore possible errors because Mac OS X always
+         * returns EAFNOSUPPORT */
+        inet_trydisconnect(&udp->sock, udp->family, tm);
+        auxiliar_setclass(L, "udp{unconnected}", 1);
}
/* change class to connected or unconnected depending on address */
-    if (connecting) auxiliar_setclass(L, "udp{connected}", 1);
-    else auxiliar_setclass(L, "udp{unconnected}", 1);
lua_pushnumber(L, 1);
return 1;
}

/*-------------------------------------------------------------------------*\
-* Closes socket used by object
+* Closes socket used by object
\*-------------------------------------------------------------------------*/
static int meth_close(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
@@ -298,8 +410,14 @@ static int meth_close(lua_State *L) {
static int meth_setsockname(lua_State *L) {
p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
const char *address =  luaL_checkstring(L, 2);
-    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
-    const char *err = inet_trybind(&udp->sock, address, port);
+    const char *port = luaL_checkstring(L, 3);
+    const char *err;
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_DGRAM;
+    bindhints.ai_family = udp->family;
+    bindhints.ai_flags = AI_PASSIVE;
+    err = inet_trybind(&udp->sock, address, port, &bindhints);
if (err) {
lua_pushnil(L);
lua_pushstring(L, err);
@@ -313,20 +431,26 @@ static int meth_setsockname(lua_State *L
* Library functions
\*=========================================================================*/
/*-------------------------------------------------------------------------*\
-* Creates a master udp object
+* Creates a master udp object
\*-------------------------------------------------------------------------*/
-static int global_create(lua_State *L) {
+static int udp_create(lua_State *L, int family) {
t_socket sock;
-    const char *err = inet_trycreate(&sock, SOCK_DGRAM);
+    const char *err = inet_trycreate(&sock, family, SOCK_DGRAM);
/* try to allocate a system socket */
-    if (!err) {
-        /* allocate tcp object */
+    if (!err) {
+        /* allocate udp object */
p_udp udp = (p_udp) lua_newuserdata(L, sizeof(t_udp));
auxiliar_setclass(L, "udp{unconnected}", -1);
/* initialize remaining structure fields */
socket_setnonblocking(&sock);
+        if (family == PF_INET6) {
+            int yes = 1;
+            setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+                (void *)&yes, sizeof(yes));
+        }
udp->sock = sock;
timeout_init(&udp->tm, -1, -1);
+        udp->family = family;
return 1;
} else {
lua_pushnil(L);
@@ -334,3 +458,11 @@ static int global_create(lua_State *L) {
return 2;
}
}
+
+static int global_create(lua_State *L) {
+	return udp_create(L, AF_INET);
+}
+
+static int global_create6(lua_State *L) {
+	return udp_create(L, AF_INET6);
+}
diff -up luasocket-2.0.2/src/udp.h.21 luasocket-2.0.2/src/udp.h
--- luasocket-2.0.2/src/udp.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/udp.h	2013-05-10 13:49:50.366679160 -0400
@@ -11,8 +11,6 @@
* originally unconnected. They can be "connected" to a given address
* with a call to the setpeername function. The same function can be used to
* break the connection.
-*
-* RCS ID: $Id: udp.h,v 1.10 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/
#include "lua.h"

@@ -25,6 +23,7 @@
typedef struct t_udp_ {
t_socket sock;
t_timeout tm;
+    int family;
} t_udp;
typedef t_udp *p_udp;

diff -up luasocket-2.0.2/src/unix.c.21 luasocket-2.0.2/src/unix.c
--- luasocket-2.0.2/src/unix.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/unix.c	2013-05-10 13:49:50.366679160 -0400
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Unix domain socket
* LuaSocket toolkit
-*
-* RCS ID: $Id: unix.c,v 1.13 2006/03/13 07:16:39 diego Exp$
\*=========================================================================*/
#include <string.h>

@@ -39,7 +37,7 @@ static const char *unix_tryconnect(p_uni
static const char *unix_trybind(p_unix un, const char *path);

/* unix object methods */
-static luaL_reg un[] = {
+static luaL_Reg unix_methods[] = {
{"__gc",        meth_close},
{"__tostring",  auxiliar_tostring},
{"accept",      meth_accept},
@@ -63,15 +61,15 @@ static luaL_reg un[] = {
};

/* socket option handlers */
-static t_opt opt[] = {
-    {"keepalive",   opt_keepalive},
-    {"linger",      opt_linger},
+static t_opt optset[] = {
+    {"keepalive",   opt_set_keepalive},
+    {"linger",      opt_set_linger},
{NULL,          NULL}
};

/* our socket creation function */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
{"unix", global_create},
{NULL,          NULL}
};
@@ -82,9 +80,9 @@ static luaL_reg func[] = {
\*-------------------------------------------------------------------------*/
int luaopen_socket_unix(lua_State *L) {
/* create classes */
-    auxiliar_newclass(L, "unix{master}", un);
-    auxiliar_newclass(L, "unix{client}", un);
-    auxiliar_newclass(L, "unix{server}", un);
+    auxiliar_newclass(L, "unix{master}", unix_methods);
+    auxiliar_newclass(L, "unix{client}", unix_methods);
+    auxiliar_newclass(L, "unix{server}", unix_methods);
/* create class groups */
@@ -128,7 +126,7 @@ static int meth_setstats(lua_State *L) {
\*-------------------------------------------------------------------------*/
static int meth_setoption(lua_State *L) {
p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    return opt_meth_setoption(L, opt, &un->sock);
+    return opt_meth_setoption(L, optset, &un->sock);
}

/*-------------------------------------------------------------------------*\
@@ -294,27 +292,13 @@ static int meth_listen(lua_State *L)
\*-------------------------------------------------------------------------*/
static int meth_shutdown(lua_State *L)
{
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    const char *how = luaL_optstring(L, 2, "both");
-    switch (how[0]) {
-        case 'b':
-            if (strcmp(how, "both")) goto error;
-            socket_shutdown(&un->sock, 2);
-            break;
-        case 's':
-            if (strcmp(how, "send")) goto error;
-            socket_shutdown(&un->sock, 1);
-            break;
-        case 'r':
-            if (strcmp(how, "receive")) goto error;
-            socket_shutdown(&un->sock, 0);
-            break;
-    }
+    /* SHUT_RD,  SHUT_WR,  SHUT_RDWR  have  the value 0, 1, 2, so we can use method index directly */
+    static const char* methods[] = { "receive", "send", "both", NULL };
+    p_unix tcp = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
+    int how = luaL_checkoption(L, 2, "both", methods);
+    socket_shutdown(&tcp->sock, how);
lua_pushnumber(L, 1);
return 1;
-error:
-    luaL_argerror(L, 2, "invalid shutdown method");
-    return 0;
}

/*-------------------------------------------------------------------------*\
diff -up luasocket-2.0.2/src/unix.h.21 luasocket-2.0.2/src/unix.h
--- luasocket-2.0.2/src/unix.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/unix.h	2013-05-10 13:49:50.366679160 -0400
@@ -6,8 +6,6 @@
*
* This module is just an example of how to extend LuaSocket with a new
* domain.
-*
-* RCS ID: $Id: unix.h,v 1.9 2006/03/13 07:16:39 diego Exp$
\*=========================================================================*/
#include "lua.h"

@@ -23,6 +21,6 @@ typedef struct t_unix_ {
} t_unix;
typedef t_unix *p_unix;

-int luaopen_socket_unix(lua_State *L);
+LUASOCKET_API int luaopen_socket_unix(lua_State *L);

#endif /* UNIX_H */
diff -up luasocket-2.0.2/src/url.lua.21 luasocket-2.0.2/src/url.lua
--- luasocket-2.0.2/src/url.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/url.lua	2013-05-10 13:49:50.366679160 -0400
@@ -2,7 +2,6 @@
-- URI parsing, composition and relative URL resolution
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: url.lua,v 1.38 2006/04/03 04:45:42 diego Exp$
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
@@ -16,7 +15,7 @@ module("socket.url")
-----------------------------------------------------------------------------
-- Module version
-----------------------------------------------------------------------------
-_VERSION = "URL 1.0.1"
+_VERSION = "URL 1.0.2"

-----------------------------------------------------------------------------
-- Encodes a string into its escaped hexadecimal representation
@@ -26,9 +25,9 @@ _VERSION = "URL 1.0.1"
--   escaped representation of string binary
-----------------------------------------------------------------------------
function escape(s)
-    return string.gsub(s, "([^A-Za-z0-9_])", function(c)
+    return (string.gsub(s, "([^A-Za-z0-9_])", function(c)
return string.format("%%%02x", string.byte(c))
-    end)
+    end))
end

-----------------------------------------------------------------------------
@@ -40,25 +39,25 @@ end
--   escaped representation of string binary
-----------------------------------------------------------------------------
local function make_set(t)
-	local s = {}
-	for i,v in base.ipairs(t) do
-		s[t[i]] = 1
-	end
-	return s
+    local s = {}
+    for i,v in base.ipairs(t) do
+        s[t[i]] = 1
+    end
+    return s
end

-- these are allowed withing a path segment, along with alphanum
-- other characters must be escaped
local segment_set = make_set {
"-", "_", ".", "!", "~", "*", "'", "(",
-	")", ":", "@", "&", "=", "+", "$", ",", + ")", ":", "@", "&", "=", "+", "$", ",",
}

local function protect_segment(s)
-	return string.gsub(s, "([^A-Za-z0-9_])", function (c)
-		if segment_set[c] then return c
-		else return string.format("%%%02x", string.byte(c)) end
-	end)
+    return string.gsub(s, "([^A-Za-z0-9_])", function (c)
+        if segment_set[c] then return c
+        else return string.format("%%%02x", string.byte(c)) end
+    end)
end

-----------------------------------------------------------------------------
@@ -69,9 +68,9 @@ end
--   escaped representation of string binary
-----------------------------------------------------------------------------
function unescape(s)
-    return string.gsub(s, "%%(%x%x)", function(hex)
+    return (string.gsub(s, "%%(%x%x)", function(hex)
return string.char(base.tonumber(hex, 16))
-    end)
+    end))
end

-----------------------------------------------------------------------------
@@ -142,7 +141,7 @@ function parse(url, default)
parsed.authority = n
return ""
end)
-    -- get query stringing
+    -- get query string
url = string.gsub(url, "%?(.*)", function(q)
parsed.query = q
return ""
@@ -158,9 +157,12 @@ function parse(url, default)
if not authority then return parsed end
authority = string.gsub(authority,"^([^@]*)@",
function(u) parsed.userinfo = u; return "" end)
-    authority = string.gsub(authority, ":([^:]*)$", + authority = string.gsub(authority, ":([^:%]]*)$",
function(p) parsed.port = p; return "" end)
-    if authority ~= "" then parsed.host = authority end
+    if authority ~= "" then
+        -- IPv6?
+        parsed.host = string.match(authority, "^%[(.+)%]$") or authority + end local userinfo = parsed.userinfo if not userinfo then return parsed end userinfo = string.gsub(userinfo, ":([^:]*)$",
@@ -182,19 +184,22 @@ function build(parsed)
local url = build_path(ppath)
if parsed.params then url = url .. ";" .. parsed.params end
if parsed.query then url = url .. "?" .. parsed.query end
-	local authority = parsed.authority
-	if parsed.host then
-		authority = parsed.host
-		if parsed.port then authority = authority .. ":" .. parsed.port end
-		local userinfo = parsed.userinfo
-		if parsed.user then
-			userinfo = parsed.user
-				userinfo = userinfo .. ":" .. parsed.password
-			end
-		end
-		if userinfo then authority = userinfo .. "@" .. authority end
-	end
+    local authority = parsed.authority
+    if parsed.host then
+        authority = parsed.host
+        if string.find(authority, ":") then -- IPv6?
+            authority = "[" .. authority .. "]"
+        end
+        if parsed.port then authority = authority .. ":" .. parsed.port end
+        local userinfo = parsed.userinfo
+        if parsed.user then
+            userinfo = parsed.user
+                userinfo = userinfo .. ":" .. parsed.password
+            end
+        end
+        if userinfo then authority = userinfo .. "@" .. authority end
+    end
if authority then url = "//" .. authority .. url end
if parsed.scheme then url = parsed.scheme .. ":" .. url end
if parsed.fragment then url = url .. "#" .. parsed.fragment end
@@ -250,16 +255,16 @@ end
--   segment: a table with one entry per segment
-----------------------------------------------------------------------------
function parse_path(path)
-	local parsed = {}
-	path = path or ""
-	--path = string.gsub(path, "%s", "")
-	string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end)
-	for i = 1, table.getn(parsed) do
-		parsed[i] = unescape(parsed[i])
-	end
-	if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end
-	if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end
-	return parsed
+    local parsed = {}
+    path = path or ""
+    --path = string.gsub(path, "%s", "")
+    string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end)
+    for i = 1, #parsed do
+        parsed[i] = unescape(parsed[i])
+    end
+    if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end
+    if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end
+    return parsed
end

-----------------------------------------------------------------------------
@@ -271,27 +276,27 @@ end
--   path: corresponding path stringing
-----------------------------------------------------------------------------
function build_path(parsed, unsafe)
-	local path = ""
-	local n = table.getn(parsed)
-	if unsafe then
-		for i = 1, n-1 do
-			path = path .. parsed[i]
-			path = path .. "/"
-		end
-		if n > 0 then
-			path = path .. parsed[n]
-			if parsed.is_directory then path = path .. "/" end
-		end
-	else
-		for i = 1, n-1 do
-			path = path .. protect_segment(parsed[i])
-			path = path .. "/"
-		end
-		if n > 0 then
-			path = path .. protect_segment(parsed[n])
-			if parsed.is_directory then path = path .. "/" end
-		end
-	end
-	if parsed.is_absolute then path = "/" .. path end
-	return path
+    local path = ""
+    local n = #parsed
+    if unsafe then
+        for i = 1, n-1 do
+            path = path .. parsed[i]
+            path = path .. "/"
+        end
+        if n > 0 then
+            path = path .. parsed[n]
+            if parsed.is_directory then path = path .. "/" end
+        end
+    else
+        for i = 1, n-1 do
+            path = path .. protect_segment(parsed[i])
+            path = path .. "/"
+        end
+        if n > 0 then
+            path = path .. protect_segment(parsed[n])
+            if parsed.is_directory then path = path .. "/" end
+        end
+    end
+    if parsed.is_absolute then path = "/" .. path end
+    return path
end
diff -up luasocket-2.0.2/src/usocket.c.21 luasocket-2.0.2/src/usocket.c
--- luasocket-2.0.2/src/usocket.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/usocket.c	2013-05-10 13:49:50.366679160 -0400
@@ -5,8 +5,6 @@
* The code is now interrupt-safe.
* The penalty of calling select to avoid busy-wait is only paid when
* the I/O call fail in the first place.
-*
-* RCS ID: $Id: usocket.c,v 1.38 2007/10/13 23:55:20 diego Exp$
\*=========================================================================*/
#include <string.h>
#include <signal.h>
@@ -16,7 +14,7 @@
/*-------------------------------------------------------------------------*\
* Wait for readable/writable/connected socket with timeout
\*-------------------------------------------------------------------------*/
-#ifdef SOCKET_POLL
+#ifndef SOCKET_SELECT
#include <sys/poll.h>

#define WAITFD_R        POLLIN
@@ -30,9 +28,9 @@ int socket_waitfd(p_socket ps, int sw, p
pfd.revents = 0;
if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
do {
-		int t = (int)(timeout_getretry(tm)*1e3);
-		ret = poll(&pfd, 1, t >= 0? t: -1);
-	} while (ret == -1 && errno == EINTR);
+        int t = (int)(timeout_getretry(tm)*1e3);
+        ret = poll(&pfd, 1, t >= 0? t: -1);
+    } while (ret == -1 && errno == EINTR);
if (ret == -1) return errno;
if (ret == 0) return IO_TIMEOUT;
if (sw == WAITFD_C && (pfd.revents & (POLLIN|POLLERR))) return IO_CLOSED;
@@ -49,6 +47,7 @@ int socket_waitfd(p_socket ps, int sw, p
fd_set rfds, wfds, *rp, *wp;
struct timeval tv, *tp;
double t;
+    if (*ps >= FD_SETSIZE) return EINVAL;
if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
do {
/* must set bits within loop, because select may have modifed them */
@@ -182,11 +181,7 @@ int socket_connect(p_socket ps, SA *addr
* Accept with timeout
\*-------------------------------------------------------------------------*/
int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) {
if (*ps == SOCKET_INVALID) return IO_CLOSED;
-    if (!len) len = &dlen;
for ( ;; ) {
int err;
if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE;
@@ -213,14 +208,13 @@ int socket_send(p_socket ps, const char
for ( ;; ) {
long put = (long) send(*ps, data, count, 0);
/* if we sent anything, we are done */
-        if (put > 0) {
+        if (put >= 0) {
*sent = put;
return IO_DONE;
}
err = errno;
-        /* send can't really return 0, but EPIPE means the connection was
-           closed */
-        if (put == 0 || err == EPIPE) return IO_CLOSED;
+        /* EPIPE means the connection was closed */
+        if (err == EPIPE) return IO_CLOSED;
/* we call was interrupted, just try again */
if (err == EINTR) continue;
@@ -243,12 +237,12 @@ int socket_sendto(p_socket ps, const cha
if (*ps == SOCKET_INVALID) return IO_CLOSED;
for ( ;; ) {
long put = (long) sendto(*ps, data, count, 0, addr, len);
-        if (put > 0) {
+        if (put >= 0) {
*sent = put;
return IO_DONE;
}
err = errno;
-        if (put == 0 || err == EPIPE) return IO_CLOSED;
+        if (err == EPIPE) return IO_CLOSED;
if (err == EINTR) continue;
if (err != EAGAIN) return err;
if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
@@ -301,6 +295,66 @@ int socket_recvfrom(p_socket ps, char *d
return IO_UNKNOWN;
}

+
+/*-------------------------------------------------------------------------*\
+* Write with timeout
+*
+* socket_read and socket_write are cut-n-paste of socket_send and socket_recv,
+* in the socket version, because behaviour when size is zero is different.
+\*-------------------------------------------------------------------------*/
+int socket_write(p_socket ps, const char *data, size_t count,
+        size_t *sent, p_timeout tm)
+{
+    int err;
+    *sent = 0;
+    /* avoid making system calls on closed sockets */
+    if (*ps == SOCKET_INVALID) return IO_CLOSED;
+    /* loop until we send something or we give up on error */
+    for ( ;; ) {
+        long put = (long) write(*ps, data, count);
+        /* if we sent anything, we are done */
+        if (put >= 0) {
+            *sent = put;
+            return IO_DONE;
+        }
+        err = errno;
+        /* EPIPE means the connection was closed */
+        if (err == EPIPE) return IO_CLOSED;
+        /* we call was interrupted, just try again */
+        if (err == EINTR) continue;
+        if (err != EAGAIN) return err;
+        /* wait until we can send something or we timeout */
+        if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
+    }
+    /* can't reach here */
+    return IO_UNKNOWN;
+}
+
+/*-------------------------------------------------------------------------*\
+* See note for socket_write
+\*-------------------------------------------------------------------------*/
+int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) {
+    int err;
+    *got = 0;
+    if (*ps == SOCKET_INVALID) return IO_CLOSED;
+    for ( ;; ) {
+        long taken = (long) read(*ps, data, count);
+        if (taken > 0) {
+            *got = taken;
+            return IO_DONE;
+        }
+        err = errno;
+        if (taken == 0) return IO_CLOSED;
+        if (err == EINTR) continue;
+        if (err != EAGAIN) return err;
+        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
+    }
+    return IO_UNKNOWN;
+}
+
/*-------------------------------------------------------------------------*\
* Put socket into blocking mode
\*-------------------------------------------------------------------------*/
@@ -360,7 +414,7 @@ const char *socket_strerror(int err) {
case ECONNABORTED: return "closed";
case ECONNRESET: return "closed";
case ETIMEDOUT: return "timeout";
-        default: return strerror(errno);
+        default: return strerror(err);
}
}

@@ -368,3 +422,28 @@ const char *socket_ioerror(p_socket ps,
(void) ps;
return socket_strerror(err);
}
+
+const char *socket_gaistrerror(int err) {
+    if (err == 0) return NULL;
+    switch (err) {
+        case EAI_AGAIN: return "temporary failure in name resolution";
+        case EAI_BADFLAGS: return "invalid value for ai_flags";
+        case EAI_BADHINTS: return "invalid value for hints";
+#endif
+        case EAI_FAIL: return "non-recoverable failure in name resolution";
+        case EAI_FAMILY: return "ai_family not supported";
+        case EAI_MEMORY: return "memory allocation failure";
+        case EAI_NONAME:
+            return "host or service not provided, or not known";
+        case EAI_OVERFLOW: return "argument buffer overflow";
+#ifdef EAI_PROTOCOL
+        case EAI_PROTOCOL: return "resolved protocol is unknown";
+#endif
+        case EAI_SERVICE: return "service not supported for socket type";
+        case EAI_SOCKTYPE: return "ai_socktype not supported";
+        case EAI_SYSTEM: return strerror(errno);
+        default: return gai_strerror(err);
+    }
+}
+
diff -up luasocket-2.0.2/src/usocket.h.21 luasocket-2.0.2/src/usocket.h
--- luasocket-2.0.2/src/usocket.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/usocket.h	2013-05-10 13:49:50.366679160 -0400
@@ -3,8 +3,6 @@
/*=========================================================================*\
* Socket compatibilization module for Unix
* LuaSocket toolkit
-*
-* RCS ID: $Id: usocket.h,v 1.7 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/

/*=========================================================================*\
@@ -32,8 +30,13 @@
/* TCP options (nagle algorithm disable) */
#include <netinet/tcp.h>

+#ifndef SO_REUSEPORT
+#endif
+
typedef int t_socket;
typedef t_socket *p_socket;

#define SOCKET_INVALID (-1)

diff -up luasocket-2.0.2/src/wsocket.c.21 luasocket-2.0.2/src/wsocket.c
--- luasocket-2.0.2/src/wsocket.c.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/wsocket.c	2013-05-10 13:49:50.366679160 -0400
@@ -4,8 +4,6 @@
*
* The penalty of calling select to avoid busy-wait is only paid when
* the I/O call fail in the first place.
-*
-* RCS ID: $Id: wsocket.c,v 1.36 2007/06/11 23:44:54 diego Exp$
\*=========================================================================*/
#include <string.h>

@@ -54,7 +52,7 @@ int socket_waitfd(p_socket ps, int sw, p
if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
if (sw & WAITFD_R) {
FD_ZERO(&rfds);
-		FD_SET(*ps, &rfds);
+        FD_SET(*ps, &rfds);
rp = &rfds;
}
if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; }
@@ -171,11 +169,7 @@ int socket_listen(p_socket ps, int backl
\*-------------------------------------------------------------------------*/
int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len,
p_timeout tm) {
if (*ps == SOCKET_INVALID) return IO_CLOSED;
-    if (!len) len = &dlen;
for ( ;; ) {
int err;
/* try to get client socket */
@@ -187,8 +181,6 @@ int socket_accept(p_socket ps, p_socket
/* call select to avoid busy wait */
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
}
-    /* can't reach here */
-    return IO_UNKNOWN;
}

/*-------------------------------------------------------------------------*\
@@ -207,7 +199,7 @@ int socket_send(p_socket ps, const char
/* loop until we send something or we give up on error */
for ( ;; ) {
/* try to send something */
-		int put = send(*ps, data, (int) count, 0);
+        int put = send(*ps, data, (int) count, 0);
/* if we sent something, we are done */
if (put > 0) {
*sent = put;
@@ -220,8 +212,6 @@ int socket_send(p_socket ps, const char
/* avoid busy wait */
if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
}
-    /* can't reach here */
-    return IO_UNKNOWN;
}

/*-------------------------------------------------------------------------*\
@@ -243,7 +233,6 @@ int socket_sendto(p_socket ps, const cha
if (err != WSAEWOULDBLOCK) return err;
if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
}
-    return IO_UNKNOWN;
}

/*-------------------------------------------------------------------------*\
@@ -264,7 +253,6 @@ int socket_recv(p_socket ps, char *data,
if (err != WSAEWOULDBLOCK) return err;
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
}
-    return IO_UNKNOWN;
}

/*-------------------------------------------------------------------------*\
@@ -286,7 +274,6 @@ int socket_recvfrom(p_socket ps, char *d
if (err != WSAEWOULDBLOCK) return err;
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
}
-    return IO_UNKNOWN;
}

/*-------------------------------------------------------------------------*\
@@ -346,8 +333,8 @@ const char *socket_strerror(int err) {
}

const char *socket_ioerror(p_socket ps, int err) {
-	(void) ps;
-	return socket_strerror(err);
+    (void) ps;
+    return socket_strerror(err);
}

static const char *wstrerror(int err) {
@@ -399,3 +386,28 @@ static const char *wstrerror(int err) {
default: return "Unknown error";
}
}
+
+const char *socket_gaistrerror(int err) {
+    if (err == 0) return NULL;
+    switch (err) {
+        case EAI_AGAIN: return "temporary failure in name resolution";
+        case EAI_BADFLAGS: return "invalid value for ai_flags";
+        case EAI_BADHINTS: return "invalid value for hints";
+#endif
+        case EAI_FAIL: return "non-recoverable failure in name resolution";
+        case EAI_FAMILY: return "ai_family not supported";
+        case EAI_MEMORY: return "memory allocation failure";
+        case EAI_NONAME:
+            return "host or service not provided, or not known";
+//        case EAI_OVERFLOW: return "argument buffer overflow";
+#ifdef EAI_PROTOCOL
+        case EAI_PROTOCOL: return "resolved protocol is unknown";
+#endif
+        case EAI_SERVICE: return "service not supported for socket type";
+        case EAI_SOCKTYPE: return "ai_socktype not supported";
+//        case EAI_SYSTEM: return strerror(errno);
+        default: return gai_strerror(err);
+    }
+}
+
diff -up luasocket-2.0.2/src/wsocket.h.21 luasocket-2.0.2/src/wsocket.h
--- luasocket-2.0.2/src/wsocket.h.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/src/wsocket.h	2013-05-10 13:49:50.366679160 -0400
@@ -3,19 +3,23 @@
/*=========================================================================*\
* Socket compatibilization module for Win32
* LuaSocket toolkit
-*
-* RCS ID: $Id: wsocket.h,v 1.4 2005/10/07 04:40:59 diego Exp$
\*=========================================================================*/

/*=========================================================================*\
* WinSock include files
\*=========================================================================*/
-#include <winsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>

typedef int socklen_t;
typedef SOCKET t_socket;
typedef t_socket *p_socket;

#define SOCKET_INVALID (INVALID_SOCKET)

+#ifndef SO_REUSEPORT
+#endif
+
#endif /* WSOCKET_H */
diff -up luasocket-2.0.2/test/auth/.htpasswd.21 luasocket-2.0.2/test/auth/.htpasswd
--- luasocket-2.0.2/test/auth/.htpasswd.21	2013-05-10 13:49:50.367679160 -0400
+++ luasocket-2.0.2/test/auth/.htpasswd	2013-05-10 13:49:50.367679160 -0400
@@ -0,0 +1 @@
+luasocket:l8n2npozPB.sQ
diff -up luasocket-2.0.2/test/auth/index.html.21 luasocket-2.0.2/test/auth/index.html
--- luasocket-2.0.2/test/auth/index.html.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/auth/index.html	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,3002 @@
+<html>
+<body>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+</body>
+</html>
diff -up luasocket-2.0.2/test/cgi/cat.21 luasocket-2.0.2/test/cgi/cat
--- luasocket-2.0.2/test/cgi/cat.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/cgi/cat	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,6 @@
+#!/bin/sh
+echo Content-type: text/plain
+echo
+
+cat > /tmp/luasocket.cat.tmp
+cat /tmp/luasocket.cat.tmp
diff -up luasocket-2.0.2/test/cgi/cat-index-html.21 luasocket-2.0.2/test/cgi/cat-index-html
--- luasocket-2.0.2/test/cgi/cat-index-html.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/cgi/cat-index-html	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo Content-type: text/plain
+echo
+
+cat ../index.html
diff -up luasocket-2.0.2/test/cgi/env.21 luasocket-2.0.2/test/cgi/env
--- luasocket-2.0.2/test/cgi/env.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/cgi/env	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo Content-type: text/plain
+echo
+
+env
diff -up luasocket-2.0.2/test/cgi/query-string.21 luasocket-2.0.2/test/cgi/query-string
--- luasocket-2.0.2/test/cgi/query-string.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/cgi/query-string	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo Content-type: text/plain
+echo
+echo $QUERY_STRING diff -up luasocket-2.0.2/test/cgi/redirect-loop.21 luasocket-2.0.2/test/cgi/redirect-loop --- luasocket-2.0.2/test/cgi/redirect-loop.21 2013-05-10 13:49:50.369679160 -0400 +++ luasocket-2.0.2/test/cgi/redirect-loop 2013-05-10 13:49:50.369679160 -0400 @@ -0,0 +1,3 @@ +#!/bin/sh +echo Location: http://$HTTP_HOST$REQUEST_URI +echo diff -up luasocket-2.0.2/test/cgi/request-uri.21 luasocket-2.0.2/test/cgi/request-uri --- luasocket-2.0.2/test/cgi/request-uri.21 2013-05-10 13:49:50.369679160 -0400 +++ luasocket-2.0.2/test/cgi/request-uri 2013-05-10 13:49:50.369679160 -0400 @@ -0,0 +1,4 @@ +#!/bin/sh +echo Content-type: text/plain +echo +echo$REQUEST_URI
diff -up luasocket-2.0.2/test/dicttest.lua.21 luasocket-2.0.2/test/dicttest.lua
--- luasocket-2.0.2/test/dicttest.lua.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/dicttest.lua	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,5 @@
+local dict = require"socket.dict"
+
+print(dict.get("dict://localhost/d:teste"))
+
+for i,v in pairs(dict.get("dict://localhost/d:teste")) do print(v) end
diff -up luasocket-2.0.2/test/excepttest.lua.21 luasocket-2.0.2/test/excepttest.lua
--- luasocket-2.0.2/test/excepttest.lua.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/excepttest.lua	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,6 @@
+local socket = require("socket")
+try = socket.newtry(function()
+    print("finalized!!!")
+end)
+try = socket.protect(try)
+print(try(nil, "it works"))
diff -up luasocket-2.0.2/test/find-connect-limit.21 luasocket-2.0.2/test/find-connect-limit
--- luasocket-2.0.2/test/find-connect-limit.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/find-connect-limit	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,32 @@
+#!/usr/bin/env lua
+--[[
+Find out how many TCP connections we can make.
+
+Use ulimit to increase the max number of descriptors:
+
+ulimit -n 10000
+ulimit -n
+
+You'll probably need to be root to do this.
+]]
+
+require "socket"
+
+port = arg[2] or 80
+
+connections = {}
+
+repeat
+	c = assert(socket.connect(hostip or host, 80))
+	table.insert(connections, c)
+
+        if not hostip then
+            hostip = c:getpeername()
+            print("resolved", host, "to", hostip)
+        end
+
+	print("connection #", #connections, c, "fd", c:getfd())
+
+until false
+
diff -up luasocket-2.0.2/test/ftptest.lua.21 luasocket-2.0.2/test/ftptest.lua
--- luasocket-2.0.2/test/ftptest.lua.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/ftptest.lua	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,110 @@
+local socket = require("socket")
+local ftp = require("socket.ftp")
+local url = require("socket.url")
+local ltn12 = require("ltn12")
+
+-- override protection to make sure we see all errors
+--socket.protect = function(s) return s end
+
+dofile("testsupport.lua")
+
+local host, port, index_file, index, back, err, ret
+
+local t = socket.gettime()
+
+host = host or "localhost"
+index_file = "index.html"
+
+
+-- a function that returns a directory listing
+local function nlst(u)
+    local t = {}
+    local p = url.parse(u)
+    p.command = "nlst"
+    p.sink = ltn12.sink.table(t)
+    local r, e = ftp.get(p)
+    return r and table.concat(t), e
+end
+
+-- function that removes a remote file
+local function dele(u)
+    local p = url.parse(u)
+    p.command = "dele"
+    p.argument = string.gsub(p.path, "^/", "")
+    if p.argumet == "" then p.argument = nil end
+    p.check = 250
+    return ftp.command(p)
+end
+
+-- read index with CRLF convention
+
+io.write("testing wrong scheme: ")
+back, err = ftp.get("wrong://banana.com/lixo")
+assert(not back and err == "wrong scheme 'wrong'", err)
+print("ok")
+
+io.write("testing invalid url: ")
+back, err = ftp.get("localhost/dir1/index.html;type=i")
+assert(not back and err)
+print("ok")
+
+back, err = socket.ftp.get("ftp://" .. host .. "/pub/index.html;type=i")
+assert(not err and back == index, err)
+print("ok")
+
+ret, err = dele("ftp://luasocket:pedrovian@" .. host .. "/index.up.html")
+if not ret then print(err)
+else print("ok") end
+
+ret, err = ftp.put("ftp://luasocket:pedrovian@" .. host .. "/index.up.html;type=i", index)
+assert(ret and not err, err)
+print("ok")
+
+back, err = ftp.get("ftp://luasocket:pedrovian@" .. host .. "/index.up.html;type=i")
+assert(ret and not err and index == back, err)
+print("ok")
+
+ret, err = dele("ftp://luasocket:pedrovian@" .. host .. "/index.up.html")
+assert(ret and not err, err)
+print("ok")
+
+io.write("testing weird-character translation: ")
+back, err = ftp.get("ftp://luasocket:pedrovian@" .. host .. "/%23%3f;type=i")
+assert(not err and back == index, err)
+print("ok")
+
+io.write("testing parameter overriding: ")
+local back = {}
+ret, err = ftp.get{
+    url = "//stupid:mistake@" .. host .. "/index.html",
+    user = "luasocket",
+    type = "i",
+    sink = ltn12.sink.table(back)
+}
+assert(ret and not err and table.concat(back) == index, err)
+print("ok")
+
+ret, err = ftp.put("ftp://" .. host .. "/index.up.html;type=a", index)
+assert(not ret and err, "should have failed")
+print(err)
+
+io.write("testing authentication failure: ")
+ret, err = ftp.get("ftp://luasocket:wrong@".. host .. "/index.html;type=a")
+assert(not ret and err, "should have failed")
+print(err)
+
+io.write("testing wrong file: ")
+back, err = ftp.get("ftp://".. host .. "/index.wrong.html;type=a")
+assert(not back and err, "should have failed")
+print(err)
+
+print("passed all tests")
+print(string.format("done in %.2fs", socket.gettime() - t))
diff -up luasocket-2.0.2/test/hello.lua.21 luasocket-2.0.2/test/hello.lua
--- luasocket-2.0.2/test/hello.lua.21	2013-05-10 13:49:50.369679160 -0400
+++ luasocket-2.0.2/test/hello.lua	2013-05-10 13:49:50.369679160 -0400
@@ -0,0 +1,3 @@
+require"socket"
+require"mime"
+print("Hello from " .. socket._VERSION .. " and " .. mime._VERSION .. "!")
diff -up luasocket-2.0.2/test/httptest.lua.21 luasocket-2.0.2/test/httptest.lua
--- luasocket-2.0.2/test/httptest.lua.21	2013-05-10 13:49:50.370679160 -0400
+++ luasocket-2.0.2/test/httptest.lua	2013-05-10 13:49:50.370679160 -0400
@@ -0,0 +1,441 @@
+-- needs Alias from /home/c/diego/tec/luasocket/test to
+-- "/luasocket-test" and "/luasocket-test/"
+-- needs ScriptAlias from /home/c/diego/tec/luasocket/test/cgi
+-- to "/luasocket-test-cgi" and "/luasocket-test-cgi/"
+-- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth
+local socket = require("socket")
+local http = require("socket.http")
+local url = require("socket.url")
+
+local mime = require("mime")
+local ltn12 = require("ltn12")
+
+-- override protection to make sure we see all errors
+-- socket.protect = function(s) return s end
+
+dofile("testsupport.lua")
+
+local host, proxy, request, response, index_file
+local ignore, expect, index, prefix, cgiprefix, index_crlf
+
+http.TIMEOUT = 10
+
+local t = socket.gettime()
+
+--host = host or "diego.student.princeton.edu"
+--host = host or "diego.student.princeton.edu"
+host = host or "localhost"
+proxy = proxy or "http://localhost:3128"
+prefix = prefix or "/luasocket-test"
+cgiprefix = cgiprefix or "/luasocket-test-cgi"
+index_file = "index.html"
+
+-- read index with CRLF convention
+
+local check_result = function(response, expect, ignore)
+    for i,v in pairs(response) do
+        if not ignore[i] then
+            if v ~= expect[i] then
+                local f = io.open("err", "w")
+                f:write(tostring(v), "\n\n versus\n\n", tostring(expect[i]))
+                f:close()
+                fail(i .. " differs!")
+            end
+        end
+    end
+    for i,v in pairs(expect) do
+        if not ignore[i] then
+            if v ~= response[i] then
+                local f = io.open("err", "w")
+                f:write(tostring(response[i]), "\n\n versus\n\n", tostring(v))
+                v = string.sub(type(v) == "string" and v or "", 1, 70)
+                f:close()
+                fail(i .. " differs!")
+            end
+        end
+    end
+    print("ok")
+end
+
+local check_request = function(request, expect, ignore)
+    local t
+    if not request.sink then request.sink, t = ltn12.sink.table() end
+    request.source = request.source or
+        (request.body and ltn12.source.string(request.body))
+    local response = {}
+        socket.skip(1, http.request(request))
+    if t and #t > 0 then response.body = table.concat(t) end
+    check_result(response, expect, ignore)
+end
+
+------------------------------------------------------------------------
+io.write("testing request uri correctness: ")
+local forth = cgiprefix .. "/request-uri?" .. "this+is+the+query+string"
+local back, c, h = http.request("http://" .. host .. forth)
+if not back then fail(c) end
+back = url.parse(back)
+if similar(back.query, "this+is+the+query+string") then print("ok")
+else fail(back.query) end
+
+------------------------------------------------------------------------
+io.write("testing query string correctness: ")
+forth = "this+is+the+query+string"
+back = http.request("http://" .. host .. cgiprefix ..
+    "/query-string?" .. forth)
+if similar(back, forth) then print("ok")
+else fail("failed!") end
+
+------------------------------------------------------------------------
+io.write("testing document retrieval: ")
+request = {
+    url = "http://" .. host .. prefix .. "/index.html"
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing redirect loop: ")
+request = {
+    url = "http://" .. host .. cgiprefix .. "/redirect-loop"
+}
+expect = {
+    code = 302
+}
+ignore = {
+    status = 1,
+    body = 1
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing invalid url: ")
+local r, e = http.request{url = host .. prefix}
+assert(r == nil and e == "invalid host ''")
+r, re = http.request(host .. prefix)
+assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) ..
+    " vs " .. tostring(e))
+print("ok")
+
+io.write("testing invalid empty port: ")
+request = {
+    url = "http://" .. host .. ":" .. prefix .. "/index.html"
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing post method: ")
+-- wanted to test chunked post, but apache doesn't support it...
+request = {
+    url = "http://" .. host .. cgiprefix .. "/cat",
+    method = "POST",
+    body = index,
+    -- remove content-length header to send chunked body
+    headers = { ["content-length"] = string.len(index) }
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+--[[
+io.write("testing proxy with post method: ")
+request = {
+    url = "http://" .. host .. cgiprefix .. "/cat",
+    method = "POST",
+    body = index,
+    headers = { ["content-length"] = string.len(index) },
+    proxy= proxy
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+]]
+
+------------------------------------------------------------------------
+io.write("testing simple post function: ")
+back = http.request("http://" .. host .. cgiprefix .. "/cat", index)
+assert(back == index)
+print("ok")
+
+------------------------------------------------------------------------
+io.write("testing ltn12.(sink|source).file: ")
+request = {
+    url = "http://" .. host .. cgiprefix .. "/cat",
+    method = "POST",
+    source = ltn12.source.file(io.open(index_file, "rb")),
+    sink = ltn12.sink.file(io.open(index_file .. "-back", "wb")),
+    headers = { ["content-length"] = string.len(index) }
+}
+expect = {
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+assert(back == index)
+os.remove(index_file .. "-back")
+
+------------------------------------------------------------------------
+io.write("testing ltn12.(sink|source).chain and mime.(encode|decode): ")
+
+local function b64length(len)
+    local a = math.ceil(len/3)*4
+    local l = math.ceil(a/76)
+    return a + l*2
+end
+
+local source = ltn12.source.chain(
+    ltn12.source.file(io.open(index_file, "rb")),
+    ltn12.filter.chain(
+        mime.encode("base64"),
+        mime.wrap("base64")
+    )
+)
+
+local sink = ltn12.sink.chain(
+    mime.decode("base64"),
+    ltn12.sink.file(io.open(index_file .. "-back", "wb"))
+)
+
+request = {
+    url = "http://" .. host .. cgiprefix .. "/cat",
+    method = "POST",
+    source = source,
+    sink = sink,
+    headers = { ["content-length"] = b64length(string.len(index)) }
+}
+expect = {
+    code = 200
+}
+ignore = {
+    body_cb = 1,
+    status = 1,
+}
+check_request(request, expect, ignore)
+assert(back == index)
+os.remove(index_file .. "-back")
+
+------------------------------------------------------------------------
+io.write("testing http redirection: ")
+request = {
+    url = "http://" .. host .. prefix
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+--[[
+io.write("testing proxy with redirection: ")
+request = {
+    url = "http://" .. host .. prefix,
+    proxy = proxy
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+]]
+
+------------------------------------------------------------------------
+io.write("testing automatic auth failure: ")
+request = {
+    url = "http://really:wrong@" .. host .. prefix .. "/auth/index.html"
+}
+expect = {
+    code = 401
+}
+ignore = {
+    body = 1,
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing http redirection failure: ")
+request = {
+    url = "http://" .. host .. prefix,
+    redirect = false
+}
+expect = {
+    code = 301
+}
+ignore = {
+    body = 1,
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+request = {
+    url = "http://" .. host .. "/wrongdocument.html"
+}
+expect = {
+    code = 404
+}
+ignore = {
+    body = 1,
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing auth failure: ")
+request = {
+    url = "http://" .. host .. prefix .. "/auth/index.html"
+}
+expect = {
+    code = 401
+}
+ignore = {
+    body = 1,
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing manual basic auth: ")
+request = {
+    url = "http://" .. host .. prefix .. "/auth/index.html",
+        authorization = "Basic " .. (mime.b64("luasocket:password"))
+    }
+}
+expect = {
+    code = 200,
+    body = index
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing automatic basic auth: ")
+request = {
+    url = "http://luasocket:password@" .. host .. prefix .. "/auth/index.html"
+}
+expect = {
+    code = 200,
+    body = index
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing auth info overriding: ")
+request = {
+    url = "http://really:wrong@" .. host .. prefix .. "/auth/index.html",
+    user = "luasocket",
+}
+expect = {
+    code = 200,
+    body = index
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+io.write("testing cgi output retrieval (probably chunked...): ")
+request = {
+    url = "http://" .. host .. cgiprefix .. "/cat-index-html"
+}
+expect = {
+    body = index,
+    code = 200
+}
+ignore = {
+    status = 1,
+}
+check_request(request, expect, ignore)
+
+------------------------------------------------------------------------
+local body
+io.write("testing simple request function: ")
+body = http.request("http://" .. host .. prefix .. "/index.html")
+assert(body == index)
+print("ok")
+
+------------------------------------------------------------------------
+local r, c, h = http.request {
+  url = "http://www.tecgraf.puc-rio.br/~diego/"
+}
+assert(r and h and (c == 200), c)
+print("ok")
+
+------------------------------------------------------------------------
+local c, e = socket.connect("example.invalid", 80)
+local r, re = http.request{url = "http://example.invalid/does/not/exist"}
+assert(r == nil and e == re, tostring(r) .. " " .. tostring(re))
+r, re = http.request("http://example.invalid/does/not/exist")
+assert(r == nil and e == re)
+print("ok")
+
+------------------------------------------------------------------------
+print("passed all tests")
+os.remove("err")
+
+print(string.format("done in %.2fs", socket.gettime() - t))
diff -up luasocket-2.0.2/test/index.html.21 luasocket-2.0.2/test/index.html
--- luasocket-2.0.2/test/index.html.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/index.html	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,3002 @@
+<html>
+<body>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+This document can contain anything, as long as it is long enough! <br>
+</body>
+</html>
diff -up luasocket-2.0.2/test/ltn12test.lua.21 luasocket-2.0.2/test/ltn12test.lua
--- luasocket-2.0.2/test/ltn12test.lua.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/ltn12test.lua	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,274 @@
+local ltn12 = require("ltn12")
+
+dofile("testsupport.lua")
+
+local function format(chunk)
+    if chunk then
+        if chunk == "" then return "''"
+        else return string.len(chunk) end
+    else return "nil" end
+end
+
+local function show(name, input, output)
+    local sin = format(input)
+    local sout = format(output)
+    io.write(name, ": ", sin, " -> ", sout, "\n")
+end
+
+local function chunked(length)
+    local tmp
+    return function(chunk)
+        local ret
+        if chunk and chunk ~= "" then
+            tmp = chunk
+        end
+        ret = string.sub(tmp, 1, length)
+        tmp = string.sub(tmp, length+1)
+        if not chunk and ret == "" then ret = nil end
+        return ret
+    end
+end
+
+local function named(f, name)
+    return function(chunk)
+        local ret = f(chunk)
+        show(name, chunk, ret)
+        return ret
+    end
+end
+
+--------------------------------
+local function split(size)
+    local buffer = ""
+    local last_out = ""
+    local last_in = ""
+    local function output(chunk)
+        local part = string.sub(buffer, 1, size)
+        buffer = string.sub(buffer, size+1)
+        last_out = (part ~= "" or chunk) and part
+        last_in = chunk
+        return last_out
+    end
+    return function(chunk, done)
+        if done then
+            return not last_in and not last_out
+        end
+        -- check if argument is consistent with state
+        if not chunk then
+            if last_in and last_in ~= "" and last_out ~= "" then
+                error("nil chunk following data chunk", 2)
+            end
+            if not last_out then error("extra nil chunk", 2) end
+            return output(chunk)
+        elseif chunk == "" then
+            if last_out == "" then error('extra "" chunk', 2) end
+            if not last_out then error('"" chunk following nil return', 2) end
+            if not last_in then error('"" chunk following nil chunk', 2) end
+            return output(chunk)
+        else
+            if not last_in  then error("data chunk following nil chunk", 2) end
+            if last_in ~= "" and last_out ~= "" then
+                error("data chunk following data chunk", 2)
+            end
+            buffer = chunk
+            return output(chunk)
+        end
+    end
+end
+
+--------------------------------
+local function format(chunk)
+    if chunk then
+        if chunk == "" then return "''"
+        else return string.len(chunk) end
+    else return "nil" end
+end
+
+--------------------------------
+local function merge(size)
+    local buffer = ""
+    local last_out = ""
+    local last_in = ""
+    local function output(chunk)
+        local part
+        if string.len(buffer) >= size or not chunk then
+            part = buffer
+            buffer = ""
+        else
+            part = ""
+        end
+        last_out = (part ~= "" or chunk) and part
+        last_in = chunk
+        return last_out
+    end
+    return function(chunk, done)
+        if done then
+            return not last_in and not last_out
+        end
+        -- check if argument is consistent with state
+        if not chunk then
+            if last_in and last_in ~= "" and last_out ~= "" then
+                error("nil chunk following data chunk", 2)
+            end
+            if not last_out then error("extra nil chunk", 2) end
+            return output(chunk)
+        elseif chunk == "" then
+            if last_out == "" then error('extra "" chunk', 2) end
+            if not last_out then error('"" chunk following nil return', 2) end
+            if not last_in then error('"" chunk following nil chunk', 2) end
+            return output(chunk)
+        else
+            if not last_in  then error("data chunk following nil chunk", 2) end
+            if last_in ~= "" and last_out ~= "" then
+                error("data chunk following data chunk", 2)
+            end
+            buffer = buffer .. chunk
+            return output(chunk)
+        end
+    end
+end
+
+--------------------------------
+io.write("testing sink.table: ")
+local sink, t = ltn12.sink.table()
+local s, c = "", ""
+for i = 0, 10 do
+    c = string.rep(string.char(i), i)
+    s = s .. c
+    assert(sink(c), "returned error")
+end
+assert(sink(nil), "returned error")
+assert(table.concat(t) == s, "mismatch")
+print("ok")
+
+--------------------------------
+io.write("testing sink.chain (with split): ")
+sink, t = ltn12.sink.table()
+local filter = split(3)
+sink = ltn12.sink.chain(filter, sink)
+s = "123456789012345678901234567890"
+assert(sink(s), "returned error")
+assert(sink(s), "returned error")
+assert(sink(nil), "returned error")
+assert(table.concat(t) == s .. s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+print("ok")
+
+--------------------------------
+io.write("testing sink.chain (with merge): ")
+sink, t = ltn12.sink.table()
+filter = merge(10)
+sink = ltn12.sink.chain(filter, sink)
+s = string.rep("123", 30)
+s = s .. string.rep("4321", 30)
+for i = 1, 30 do
+    assert(sink("123"), "returned error")
+end
+for i = 1, 30 do
+    assert(sink("4321"), "returned error")
+end
+assert(sink(nil), "returned error")
+assert(filter(nil, 1), "filter not empty")
+assert(table.concat(t) == s, "mismatch")
+print("ok")
+
+--------------------------------
+io.write("testing source.string and pump.all: ")
+local source = ltn12.source.string(s)
+sink, t = ltn12.sink.table()
+assert(ltn12.pump.all(source, sink), "returned error")
+assert(table.concat(t) == s, "mismatch")
+print("ok")
+
+--------------------------------
+io.write("testing source.chain (with split): ")
+source = ltn12.source.string(s)
+filter = split(5)
+source = ltn12.source.chain(source, filter)
+sink, t = ltn12.sink.table()
+assert(ltn12.pump.all(source, sink), "returned error")
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+print("ok")
+
+--------------------------------
+io.write("testing source.chain (with split) and sink.chain (with merge): ")
+source = ltn12.source.string(s)
+filter = split(5)
+source = ltn12.source.chain(source, filter)
+local filter2 = merge(13)
+sink, t = ltn12.sink.table()
+sink = ltn12.sink.chain(filter2, sink)
+assert(ltn12.pump.all(source, sink), "returned error")
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+assert(filter2(nil, 1), "filter2 not empty")
+print("ok")
+
+--------------------------------
+io.write("testing filter.chain (and sink.chain, with split, merge): ")
+source = ltn12.source.string(s)
+filter = split(5)
+filter2 = merge(13)
+local chain = ltn12.filter.chain(filter, filter2)
+sink, t = ltn12.sink.table()
+sink = ltn12.sink.chain(chain, sink)
+assert(ltn12.pump.all(source, sink), "returned error")
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+assert(filter2(nil, 1), "filter2 not empty")
+print("ok")
+
+--------------------------------
+io.write("testing filter.chain (and sink.chain, a bunch): ")
+source = ltn12.source.string(s)
+filter = split(5)
+filter2 = merge(13)
+local filter3 = split(7)
+local filter4 = merge(11)
+local filter5 = split(10)
+chain = ltn12.filter.chain(filter, filter2, filter3, filter4, filter5)
+sink, t = ltn12.sink.table()
+sink = ltn12.sink.chain(chain, sink)
+assert(ltn12.pump.all(source, sink))
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+assert(filter2(nil, 1), "filter2 not empty")
+assert(filter3(nil, 1), "filter3 not empty")
+assert(filter4(nil, 1), "filter4 not empty")
+assert(filter5(nil, 1), "filter5 not empty")
+print("ok")
+
+--------------------------------
+io.write("testing filter.chain (and source.chain, with split, merge): ")
+source = ltn12.source.string(s)
+filter = split(5)
+filter2 = merge(13)
+local chain = ltn12.filter.chain(filter, filter2)
+sink, t = ltn12.sink.table()
+source = ltn12.source.chain(source, chain)
+assert(ltn12.pump.all(source, sink), "returned error")
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+assert(filter2(nil, 1), "filter2 not empty")
+print("ok")
+
+--------------------------------
+io.write("testing filter.chain (and source.chain, a bunch): ")
+source = ltn12.source.string(s)
+filter = split(5)
+filter2 = merge(13)
+local filter3 = split(7)
+local filter4 = merge(11)
+local filter5 = split(10)
+chain = ltn12.filter.chain(filter, filter2, filter3, filter4, filter5)
+sink, t = ltn12.sink.table()
+source = ltn12.source.chain(source, chain)
+assert(ltn12.pump.all(source, sink))
+assert(table.concat(t) == s, "mismatch")
+assert(filter(nil, 1), "filter not empty")
+assert(filter2(nil, 1), "filter2 not empty")
+assert(filter3(nil, 1), "filter3 not empty")
+assert(filter4(nil, 1), "filter4 not empty")
+assert(filter5(nil, 1), "filter5 not empty")
+print("ok")
diff -up luasocket-2.0.2/test/mimetest.lua.21 luasocket-2.0.2/test/mimetest.lua
--- luasocket-2.0.2/test/mimetest.lua.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/mimetest.lua	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,297 @@
+local socket = require("socket")
+local ltn12 = require("ltn12")
+local mime = require("mime")
+
+dofile("testsupport.lua")
+
+local qptest = "qptest.bin"
+local eqptest = "qptest.bin2"
+local dqptest = "qptest.bin3"
+
+local b64test = "b64test.bin"
+local eb64test = "b64test.bin2"
+local db64test = "b64test.bin3"
+
+
+-- from Machado de Assis, "A Mсo e a Rosa"
+local mao = [[
+    Cursavam estes dois moуos a academia de S. Paulo, estando
+    Luьs Alves no quarto ano e EstЖvсo no terceiro.
+    Conheceram-se na academia, e ficaram amigos ьntimos, tanto
+    quanto podiam sЖ-lo dois espьritos diferentes, ou talvez por
+    isso mesmo que o eram. EstЖvсo, dotado de extrema
+    sensibilidade, e nсo menor fraqueza de Рnimo, afetuoso e
+    bom, nсo daquela bondade varonil, que ж apanрgio de uma alma
+    forte, mas dessa outra bondade mole e de cera, que vai Я
+    mercЖ de todas as circunstРncias, tinha, alжm de tudo isso,
+    o infortЩnio de trazer ainda sobre o nariz os зculos
+    cor-de-rosa de suas virginais ilusшes. Luьs Alves via bem
+    com os olhos da cara. Nсo era mau rapaz, mas tinha o seu
+    grсo de egoьsmo, e se nсo era incapaz de afeiушes, sabia
+    regЖ-las, moderр-las, e sobretudo guiр-las ao seu prзprio
+    interesse.  Entre estes dois homens travara-se amizade
+    ьntima, nascida para um na simpatia, para outro no costume.
+    Eram eles os naturais confidentes um do outro, com a
+    diferenуa que Luьs Alves dava menos do que recebia, e, ainda
+    assim, nem tudo o que dava exprimia grande confianуa.
+]]
+
+local function random(handle, io_err)
+    if handle then
+        return function()
+            if not handle then error("source is empty!", 2) end
+            local len = math.random(0, 1024)
+            if not chunk then
+                handle:close()
+                handle = nil
+            end
+            return chunk
+        end
+    else return ltn12.source.empty(io_err or "unable to open file") end
+end
+
+
+local function named(f)
+    return f
+end
+
+local what = nil
+local function transform(input, output, filter)
+    local source = random(io.open(input, "rb"))
+    local sink = ltn12.sink.file(io.open(output, "wb"))
+    if what then
+        sink = ltn12.sink.chain(filter, sink)
+    else
+        source = ltn12.source.chain(source, filter)
+    end
+    --what = not what
+    ltn12.pump.all(source, sink)
+end
+
+local function encode_qptest(mode)
+    local encode = mime.encode("quoted-printable", mode)
+    local split = mime.wrap("quoted-printable")
+    local chain = ltn12.filter.chain(encode, split)
+    transform(qptest, eqptest, chain)
+end
+
+local function compare_qptest()
+io.write("testing qp encoding and wrap: ")
+    compare(qptest, dqptest)
+end
+
+local function decode_qptest()
+    local decode = mime.decode("quoted-printable")
+    transform(eqptest, dqptest, decode)
+end
+
+local function create_qptest()
+    local f, err = io.open(qptest, "wb")
+    if not f then fail(err) end
+    -- try all characters
+    for i = 0, 255 do
+        f:write(string.char(i))
+    end
+    -- try all characters and different line sizes
+    for i = 0, 255 do
+        for j = 0, i do
+            f:write(string.char(i))
+        end
+        f:write("\r\n")
+    end
+    -- test latin text
+    f:write(mao)
+    -- force soft line breaks and treatment of space/tab in end of line
+    local tab
+    f:write(string.gsub(mao, "(%s)", function(c)
+        if tab then
+            tab = nil
+            return "\t"
+        else
+            tab = 1
+            return " "
+        end
+    end))
+    -- test crazy end of line conventions
+    local eol = { "\r\n", "\r", "\n", "\n\r" }
+    local which = 0
+    f:write(string.gsub(mao, "(\n)", function(c)
+        which = which + 1
+        if which > 4 then which = 1 end
+        return eol[which]
+    end))
+    for i = 1, 4 do
+        for j = 1, 4 do
+            f:write(eol[i])
+            f:write(eol[j])
+        end
+    end
+    -- try long spaced and tabbed lines
+    f:write("\r\n")
+    for i = 0, 255 do
+        f:write(string.char(9))
+    end
+    f:write("\r\n")
+    for i = 0, 255 do
+        f:write(' ')
+    end
+    f:write("\r\n")
+    for i = 0, 255 do
+        f:write(string.char(9),' ')
+    end
+    f:write("\r\n")
+    for i = 0, 255 do
+        f:write(' ',string.char(32))
+    end
+    f:write("\r\n")
+
+    f:close()
+end
+
+local function cleanup_qptest()
+    os.remove(qptest)
+    os.remove(eqptest)
+    os.remove(dqptest)
+end
+
+-- create test file
+local function create_b64test()
+    local f = assert(io.open(b64test, "wb"))
+    local t = {}
+    for j = 1, 100 do
+        for i = 1, 100 do
+            t[i] = math.random(0, 255)
+        end
+        f:write(string.char(unpack(t)))
+    end
+    f:close()
+end
+
+local function encode_b64test()
+    local e1 = mime.encode("base64")
+    local e2 = mime.encode("base64")
+    local e3 = mime.encode("base64")
+    local e4 = mime.encode("base64")
+    local sp4 = mime.wrap()
+    local sp3 = mime.wrap(59)
+    local sp2 = mime.wrap("base64", 30)
+    local sp1 = mime.wrap(27)
+    local chain = ltn12.filter.chain(e1, sp1, e2, sp2, e3, sp3, e4, sp4)
+    transform(b64test, eb64test, chain)
+end
+
+local function decode_b64test()
+    local d1 = named(mime.decode("base64"), "d1")
+    local d2 = named(mime.decode("base64"), "d2")
+    local d3 = named(mime.decode("base64"), "d3")
+    local d4 = named(mime.decode("base64"), "d4")
+    local chain = named(ltn12.filter.chain(d1, d2, d3, d4), "chain")
+    transform(eb64test, db64test, chain)
+end
+
+local function cleanup_b64test()
+    os.remove(b64test)
+    os.remove(eb64test)
+    os.remove(db64test)
+end
+
+local function compare_b64test()
+io.write("testing b64 chained encode: ")
+    compare(b64test, db64test)
+end
+
+local function identity_test()
+io.write("testing identity: ")
+    local chain = named(ltn12.filter.chain(
+        named(mime.encode("quoted-printable"), "1 eq"),
+        named(mime.encode("base64"), "2 eb"),
+        named(mime.decode("base64"), "3 db"),
+        named(mime.decode("quoted-printable"), "4 dq")
+    ), "chain")
+    transform(b64test, eb64test, chain)
+    compare(b64test, eb64test)
+    os.remove(eb64test)
+end
+
+
+    local e = (mime.b64(original))
+    local d = (mime.unb64(encoded))
+    if e ~= encoded then fail("encoding failed") end
+    if d ~= original then fail("decoding failed") end
+end
+
+local function chunkcheck(original, encoded)
+    local len = string.len(original)
+    for i = 0, len do
+        local a = string.sub(original, 1, i)
+        local b = string.sub(original, i+1)
+        local e, r = mime.b64(a, b)
+        local f = (mime.b64(r))
+        if (e .. (f or "") ~= encoded) then fail(e .. (f or "")) end
+    end
+end
+
+    chunkcheck("abcdefgh", "YWJjZGVmZ2g=")
+    chunkcheck("abcdefghi", "YWJjZGVmZ2hp")
+    chunkcheck("abcdefghij", "YWJjZGVmZ2hpag==")
+    print("ok")
+end
+
+local function test_b64lowlevel()
+io.write("testing b64 low-level: ")
+    local a, b
+    a, b = mime.b64("", "")
+    assert(a == "" and b == "")
+    a, b = mime.b64(nil, "blablabla")
+    assert(a == nil and b == nil)
+    a, b = mime.b64("", nil)
+    assert(a == nil and b == nil)
+    a, b = mime.unb64("", "")
+    assert(a == "" and b == "")
+    a, b = mime.unb64(nil, "blablabla")
+    assert(a == nil and b == nil)
+    a, b = mime.unb64("", nil)
+    assert(a == nil and b == nil)
+    local binary=string.char(0x00,0x44,0x1D,0x14,0x0F,0xF4,0xDA,0x11,0xA9,0x78,0x00,0x14,0x38,0x50,0x60,0xCE)
+    local encoded = mime.b64(binary)
+    local decoded=mime.unb64(encoded)
+    assert(binary == decoded)
+    print("ok")
+end
+
+local t = socket.gettime()
+
+create_b64test()
+identity_test()
+encode_b64test()
+decode_b64test()
+compare_b64test()
+cleanup_b64test()
+test_b64lowlevel()
+
+create_qptest()
+encode_qptest()
+decode_qptest()
+compare_qptest()
+encode_qptest("binary")
+decode_qptest()
+compare_qptest()
+cleanup_qptest()
+
+
+print(string.format("done in %.2fs", socket.gettime() - t))
@@ -8,5 +8,7 @@ The files provided are:

To run these tests, just run lua on the server and then on the client.

+    hello.lua               -- run to verify if installation worked
+
Good luck,
Diego.
diff -up luasocket-2.0.2/test/smtptest.lua.21 luasocket-2.0.2/test/smtptest.lua
--- luasocket-2.0.2/test/smtptest.lua.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/smtptest.lua	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,259 @@
+local sent = {}
+
+local from = "diego@localhost"
+local server = "localhost"
+local rcpt = "luasocket@localhost"
+
+local files = {
+    "/var/spool/mail/luasocket",
+    "/var/spool/mail/luasock1",
+    "/var/spool/mail/luasock2",
+    "/var/spool/mail/luasock3",
+}
+
+local t = socket.time()
+local err
+
+dofile("mbox.lua")
+local parse = mbox.parse
+dofile("testsupport.lua")
+
+local total = function()
+    local t = 0
+    for i = 1, #sent do
+        t = t + sent[i].count
+    end
+    return t
+end
+
+local similar = function(s1, s2)
+    return
+    string.lower(string.gsub(s1, "%s", "")) ==
+    string.lower(string.gsub(s2, "%s", ""))
+end
+
+local fail = function(s)
+    s = s or "failed!"
+    print(s)
+    os.exit()
+end
+
+    local f = io.open(name, "r")
+    if not f then
+        fail("unable to open file!")
+        return nil
+    end
+    f:close()
+    return s
+end
+
+local empty = function()
+    for i,v in ipairs(files) do
+        local f = io.open(v, "w")
+        if not f then
+            fail("unable to open file!")
+        end
+        f:close()
+    end
+end
+
+local get = function()
+    local s = ""
+    for i,v in ipairs(files) do
+        s = s .. "\n" .. readfile(v)
+    end
+    return s
+end
+
+    sent = sent or {}
+    got = got or {}
+    for i,v in pairs(sent) do
+        if not similar(v, got[i]) then fail("header " .. v .. "failed!") end
+    end
+end
+
+local check_body = function(sent, got)
+    sent = sent or ""
+    got = got or ""
+    if not similar(sent, got) then fail("bodies differ!") end
+end
+
+local check = function(sent, m)
+    io.write("checking ", m.headers.title, ": ")
+    for i = 1, #sent do
+        local s = sent[i]
+        if s.title == m.headers.title and s.count > 0 then
+            check_body(s.body, m.body)
+            s.count = s.count - 1
+            print("ok")
+            return
+        end
+    end
+end
+
+local insert = function(sent, message)
+    if type(message.rcpt) == "table" then
+        message.count = #message.rcpt
+    else message.count = 1 end
+    table.insert(sent, message)
+end
+
+local mark = function()
+    local time = socket.time()
+    return { time = time }
+end
+
+local wait = function(sentinel, n)
+    local to
+    io.write("waiting for ", n, " messages: ")
+    while 1 do
+        local mbox = parse(get())
+        if n == #mbox then break end
+        if socket.time() - sentinel.time > 50 then
+            to = 1
+            break
+        end
+        socket.sleep(1)
+        io.write(".")
+        io.stdout:flush()
+    end
+    if to then fail("timeout")
+    else print("ok") end
+end
+
+local stuffed_body = [[
+This message body needs to be
+stuffed because it has a dot
+.
+by itself on a line.
+Otherwise the mailer would
+think that the dot
+.
+is the end of the message
+and the remaining text would cause
+a lot of trouble.
+]]
+
+insert(sent, {
+    from = from,
+    rcpt = {
+        "luasocket@localhost",
+        "luasock3@dell-diego.cs.princeton.edu",
+        "luasock1@dell-diego.cs.princeton.edu"
+    },
+    body = "multiple rcpt body",
+    title = "multiple rcpt",
+})
+
+insert(sent, {
+    from = from,
+    rcpt = {
+        "luasock2@localhost",
+        "luasock3",
+        "luasock1"
+    },
+    },
+    body = stuffed_body,
+    title = "complex message",
+})
+
+insert(sent, {
+    from = from,
+    rcpt = rcpt,
+    server = server,
+    body = "simple message body",
+    title = "simple message"
+})
+
+insert(sent, {
+    from = from,
+    rcpt = rcpt,
+    server = server,
+    body = stuffed_body,
+    title = "stuffed message body"
+})
+
+insert(sent, {
+    from = from,
+    rcpt = rcpt,
+    },
+})
+
+insert(sent, {
+    from = from,
+    rcpt = rcpt,
+    title = "minimum message"
+})
+
+local c, e = socket.connect("wrong.host", 25)
+local ret, err = socket.smtp.mail{
+    from = from,
+    rcpt = rcpt,
+    server = "wrong.host"
+}
+if ret or e ~= err then fail("wrong error message")
+else print("ok") end
+
+io.write("testing invalid from: ")
+local ret, err = socket.smtp.mail{
+    from = ' " " (( _ * ',
+    rcpt = rcpt,
+}
+if ret or not err then fail("wrong error message")
+else print(err) end
+
+io.write("testing no rcpt: ")
+local ret, err = socket.smtp.mail{
+    from = from,
+}
+if ret or not err then fail("wrong error message")
+else print(err) end
+
+io.write("clearing mailbox: ")
+empty()
+print("ok")
+
+io.write("sending messages: ")
+for i = 1, #sent do
+    ret, err = socket.smtp.mail(sent[i])
+    if not ret then fail(err) end
+    io.write("+")
+    io.stdout:flush()
+end
+print("ok")
+
+wait(mark(), total())
+
+io.write("parsing mailbox: ")
+local mbox = parse(get())
+print(#mbox .. " messages found!")
+
+for i = 1, #mbox do
+    check(sent, mbox[i])
+end
+
+print("passed all tests")
+print(string.format("done in %.2fs", socket.time() - t))
diff -up luasocket-2.0.2/test/stufftest.lua.21 luasocket-2.0.2/test/stufftest.lua
--- luasocket-2.0.2/test/stufftest.lua.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/stufftest.lua	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,21 @@
+local mime = require("mime")
+
+function test_dot(original, right)
+    local result, n = mime.dot(2, original)
+    assert(result == right, "->" .. result .. "<-")
+    print("ok")
+end
+
+function test_stuff(original, right)
+    local result, n = mime.dot(2, original)
+    assert(result == right, "->" .. result .. "<-")
+    print("ok")
+end
+
+test_dot("abc", "abc")
+test_dot("", "")
+test_dot("\r\n", "\r\n")
+test_dot("\r\n.", "\r\n..")
+test_dot(".\r\n.", "..\r\n..")
+test_dot(".\r\n.", "..\r\n..")
+test_dot("abcd.\r\n.", "abcd.\r\n..")
diff -up luasocket-2.0.2/test/tcp-getoptions.21 luasocket-2.0.2/test/tcp-getoptions
--- luasocket-2.0.2/test/tcp-getoptions.21	2013-05-10 13:49:50.372679159 -0400
+++ luasocket-2.0.2/test/tcp-getoptions	2013-05-10 13:49:50.372679159 -0400
@@ -0,0 +1,41 @@
+#!/usr/bin/env lua
+
+require"socket"
+
+port = 8765
+
+function options(o)
+    print("options for", o)
+
+    for _, opt in ipairs{"keepalive", "reuseaddr", "tcp-nodelay"} do
+        print("getoption", opt, o:getoption(opt))
+    end
+
+    print("getoption", "linger",
+        "on", o:getoption("linger").on,
+        "timeout", o:getoption("linger").timeout)
+end
+
+local m = socket.tcp()
+
+options(m)
+
+assert(m:bind("*", port))
+assert(m:listen())
+
+options(m)
+
+m:close()
+
+local m = socket.bind("*", port)
+
+options(m)
+
+local c = socket.connect("localhost", port)
+
+options(c)
+
+local s = m:accept()
+
+options(s)
+
diff -up luasocket-2.0.2/test/testclnt.lua.21 luasocket-2.0.2/test/testclnt.lua
--- luasocket-2.0.2/test/testclnt.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/test/testclnt.lua	2013-05-10 13:49:50.373679159 -0400
@@ -3,25 +3,29 @@ local socket = require"socket"
host = host or "localhost"
port = port or "8383"

+function printf(...)
+    io.stderr:write(string.format(...))
+end
+
function pass(...)
-    local s = string.format(unpack(arg))
-    io.stderr:write(s, "\n")
+    printf(...)
+    io.stderr:write("\n")
end

function fail(...)
-    local s = string.format(unpack(arg))
-    io.stderr:write("ERROR: ", s, "!\n")
-socket.sleep(3)
+    io.stderr:write("ERROR: ")
+    printf(...)
+    io.stderr:write("!\n")
os.exit()
end

function warn(...)
-    local s = string.format(unpack(arg))
+    local s = string.format(...)
io.stderr:write("WARNING: ", s, "\n")
end

function remote(...)
-    local s = string.format(unpack(arg))
+    local s = string.format(...)
s = string.gsub(s, "\n", ";")
s = string.gsub(s, "%s+", " ")
s = string.gsub(s, "^%s*", "")
@@ -80,7 +84,6 @@ io.stderr:write("-----------------------
start = socket.gettime()

function reconnect()
-    io.stderr:write("attempting data connection... ")
if data then data:close() end
remote [[
if data then data:close() data = nil end
@@ -88,12 +91,11 @@ function reconnect()
data:setoption("tcp-nodelay", true)
]]
data, err = socket.connect(host, port)
-    if not data then fail(err)
-    else pass("connected!") end
+    if not data then fail(err) end
data:setoption("tcp-nodelay", true)
end

-pass("attempting control connection...")
+printf("attempting control connection...")
control, err = socket.connect(host, port)
if err then fail(err)
else pass("connected!") end
@@ -112,6 +114,7 @@ end
------------------------------------------------------------------------
function test_mixed(len)
reconnect()
+    io.stderr:write("length " .. len .. ": ")
local inter = math.ceil(len/4)
local p1 = "unix " .. string.rep("x", inter) .. "line\n"
local p2 = "dos " .. string.rep("y", inter) .. "line\r\n"
@@ -137,8 +140,12 @@ remote "data:send(str); data:close()"
end

------------------------------------------------------------------------
+if not math.mod then
+	math.mod = math.fmod
+end
function test_asciiline(len)
reconnect()
+    io.stderr:write("length " .. len .. ": ")
local str, str10, back, err
str = string.rep("x", math.mod(len, 10))
str10 = string.rep("aZb.c#dAe?", math.floor(len/10))
@@ -156,6 +163,7 @@ end
------------------------------------------------------------------------
function test_rawline(len)
reconnect()
+    io.stderr:write("length " .. len .. ": ")
local str, str10, back, err
str = string.rep(string.char(47), math.mod(len, 10))
str10 = string.rep(string.char(120,21,77,4,5,0,7,36,44,100),
@@ -174,6 +182,7 @@ end
------------------------------------------------------------------------
function test_raw(len)
reconnect()
+    io.stderr:write("length " .. len .. ": ")
local half = math.floor(len/2)
local s1, s2, back, err
s1 = string.rep("x", half)
@@ -194,7 +203,7 @@ end
reconnect()
local str, err, partial
-    pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl)
+    printf("%d bytes, %ds total timeout, %ds pause: ", len, tm, sl)
remote (string.format ([[
data:settimeout(%d)
str = string.rep('a', %d)
@@ -215,7 +224,7 @@ end
function test_totaltimeoutsend(len, tm, sl)
reconnect()
local str, err, total
-    pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl)
+    printf("%d bytes, %ds total timeout, %ds pause: ", len, tm, sl)
remote (string.format ([[
data:settimeout(%d)
@@ -235,7 +244,7 @@ end
reconnect()
local str, err, partial
-    pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl)
+    printf("%d bytes, %ds blocking timeout, %ds pause: ", len, tm, sl)
remote (string.format ([[
data:settimeout(%d)
str = string.rep('a', %d)
@@ -255,7 +264,7 @@ end
function test_blockingtimeoutsend(len, tm, sl)
reconnect()
local str, err, total
-    pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl)
+    printf("%d bytes, %ds blocking timeout, %ds pause: ", len, tm, sl)
remote (string.format ([[
data:settimeout(%d)
@@ -273,6 +282,7 @@ end

------------------------------------------------------------------------
function empty_connect()
+    printf("empty connect: ")
reconnect()
if data then data:close() data = nil end
remote [[
@@ -284,7 +294,7 @@ function empty_connect()
pass("ok")
data = socket.connect(host, port)
else
-		pass("gethostbyname returns localhost on empty string...")
+        pass("gethostbyname returns localhost on empty string...")
end
end

@@ -311,7 +321,7 @@ function test_closed()
local back, partial, err
local str = 'little string'
reconnect()
remote (string.format ([[
data:send('%s')
data:close()
@@ -324,7 +334,7 @@ function test_closed()
elseif str ~= partial then fail("didn't receive partial result.")
reconnect()
-    pass("trying write detection")
+    printf("trying write detection: ")
remote [[
data:close()
data = nil
@@ -352,15 +362,28 @@ function test_selectbugs()
(e == "timeout" or e == "error"))
pass("closed sockets: ok")
e = pcall(socket.select, "wrong", 1, 0.1)
-    assert(e == false)
+    assert(e == false, tostring(e))
e = pcall(socket.select, {}, 1, 0.1)
-    assert(e == false)
+    assert(e == false, tostring(e))
pass("invalid input: ok")
+    local toomany = {}
+    for i = 1, socket._SETSIZE+1 do
+        toomany[#toomany+1] = socket.udp()
+    end
+    if #toomany > socket._SETSIZE then
+        local e = pcall(socket.select, toomany, nil, 0.1)
+        assert(e == false, tostring(e))
+        pass("too many sockets (" .. #toomany .. "): ok")
+    else
+        pass("unable to create enough sockets (max was "..#toomany..")")
+        pass("try using ulimit")
+    end
+    for _, c in ipairs(toomany) do c:close() end
end

------------------------------------------------------------------------
function accept_timeout()
-    io.stderr:write("accept with timeout (if it hangs, it failed): ")
+    printf("accept with timeout (if it hangs, it failed): ")
local s, e = socket.bind("*", 0, 0)
assert(s, e)
local t = socket.gettime()
@@ -376,23 +399,22 @@ end

------------------------------------------------------------------------
function connect_timeout()
-    io.stderr:write("connect with timeout (if it hangs, it failed!): ")
+    printf("connect with timeout (if it hangs, it failed!): ")
local t = socket.gettime()
local c, e = socket.tcp()
assert(c, e)
c:settimeout(0.1)
local t = socket.gettime()
local r, e = c:connect("10.0.0.1", 81)
-print(r, e)
assert(not r, "should not connect")
assert(socket.gettime() - t < 2, "took too long to give up.")
c:close()
-    print("ok")
+    pass("ok")
end

------------------------------------------------------------------------
function accept_errors()
-    io.stderr:write("not listening: ")
+    printf("not listening: ")
local d, e = socket.bind("*", 0)
assert(d, e);
local c, e = socket.tcp();
@@ -401,31 +423,35 @@ function accept_errors()
d:settimeout(2)
local r, e = d:accept()
assert(not r and e)
-    print("ok: ", e)
-    io.stderr:write("not supported: ")
+    pass("ok")
+    printf("not supported: ")
local c, e = socket.udp()
assert(c, e);
d:setfd(c:getfd())
local r, e = d:accept()
assert(not r and e)
-    print("ok: ", e)
+    pass("ok")
end

------------------------------------------------------------------------
function connect_errors()
-    io.stderr:write("connection refused: ")
+    printf("connection refused: ")
local c, e = socket.connect("localhost", 1);
assert(not c and e)
-    print("ok: ", e)
+    pass("ok")
local c, e = socket.connect("host.is.invalid", 1);
assert(not c and e, e)
-    print("ok: ", e)
+    pass("ok")
end

------------------------------------------------------------------------
function rebind_test()
-    local c = socket.bind("localhost", 0)
+    --local c ,c1 = socket.bind("localhost", 0)
+   local c ,c1 = socket.bind("127.0.0.1", 0)
+    if not c then pass ("failed to bind! " .. tostring(c) .. ' ' .. tostring(c1))  return end
+	assert(c,c1)
+
local i, p = c:getsockname()
local s, e = socket.tcp()
assert(s, e)
@@ -433,7 +459,7 @@ function rebind_test()
r, e = s:bind("localhost", p)
assert(not r, "managed to rebind!")
assert(e)
-    print("ok: ", e)
+    pass("ok")
end

------------------------------------------------------------------------
@@ -455,14 +481,14 @@ function getstats_test()
assert(s == t, "sent count failed" .. tostring(s)
.. "/" .. tostring(t))
end
-    print("ok")
+    pass("ok")
end

------------------------------------------------------------------------
function test_nonblocking(size)
reconnect()
-print("Testing "  .. 2*size .. " bytes")
+    printf("testing "  .. 2*size .. " bytes: ")
remote(string.format([[
data:send(string.rep("a", %d))
socket.sleep(0.5)
@@ -494,7 +520,7 @@ remote(string.format([[
data:settimeout(-1)
assert(back == str, "'" .. back .. "' vs '" .. str .. "'")
-    print("ok")
+    pass("ok")
end

------------------------------------------------------------------------
@@ -502,7 +528,7 @@ function test_readafterclose()
local back, partial, err
local str = 'little string'
reconnect()
-    pass("trying repeated '*a' pattern")
+    printf("trying repeated '*a' pattern")
remote (string.format ([[
data:send('%s')
data:close()
@@ -512,9 +538,9 @@ function test_readafterclose()
assert(back == str, "unexpected data read")
assert(back == nil and err == "closed", "should have returned 'closed'")
-    print("ok")
+    pass("ok")
reconnect()
-    pass("trying active close before '*a'")
+    printf("trying active close before '*a'")
remote (string.format ([[
data:close()
data = nil
@@ -522,9 +548,9 @@ function test_readafterclose()
data:close()
assert(back == nil and err == "closed", "should have returned 'closed'")
-    print("ok")
+    pass("ok")
reconnect()
-    pass("trying active close before '*l'")
+    printf("trying active close before '*l'")
remote (string.format ([[
data:close()
data = nil
@@ -532,9 +558,9 @@ function test_readafterclose()
data:close()
assert(back == nil and err == "closed", "should have returned 'closed'")
-    print("ok")
+    pass("ok")
reconnect()
-    pass("trying active close before raw 1")
+    printf("trying active close before raw 1")
remote (string.format ([[
data:close()
data = nil
@@ -542,9 +568,9 @@ function test_readafterclose()
data:close()
assert(back == nil and err == "closed", "should have returned 'closed'")
-    print("ok")
+    pass("ok")
reconnect()
-    pass("trying active close before raw 0")
+    printf("trying active close before raw 0")
remote (string.format ([[
data:close()
data = nil
@@ -552,17 +578,55 @@ function test_readafterclose()
data:close()
assert(back == nil and err == "closed", "should have returned 'closed'")
-    print("ok")
+    pass("ok")
end

+------------------------------------------------------------------------
+function test_writeafterclose()
+    local str = 'little string'
+    reconnect()
+    remote (string.format ([[
+        data:close()
+        data = nil
+    ]]))
+    local sent, err, errsent
+    while not err do
+        sent, err, errsent, time = data:send(str)
+    end
+    assert(err == "closed", "should have returned 'closed'")
+    pass("ok")
+end
+
+------------------------------------------------------------------------
+
+function test_partialrecv()
+    local str = 'little string'
+    reconnect()
+remote([[
+    data:send("7890")
+]])
+    data:settimeout(1)
+    back, err = data:receive(10, "123456")
+    assert(back == "1234567890", "failed on exact mixed length")
+    back, err = data:receive(8, "87654321")
+    assert(back == "87654321", "failed on exact length")
+    back, err = data:receive(4, "87654321")
+    assert(back == "87654321", "failed on smaller length")
+    pass("ok")
+end
+
+------------------------------------------------------------------------
test("method registration")
-test_methods(socket.tcp(), {
+
+local tcp_methods = {
"accept",
"bind",
"close",
"connect",
"dirty",
+    "getfamily",
"getfd",
+    "getoption",
"getpeername",
"getsockname",
"getstats",
@@ -576,13 +640,16 @@ test_methods(socket.tcp(), {
"setsockname",
"settimeout",
"shutdown",
-})
+}
+test_methods(socket.tcp(), tcp_methods)
+test_methods(socket.tcp6(), tcp_methods)

-test_methods(socket.udp(), {
+local udp_methods = {
"close",
-    "getpeername",
"dirty",
+    "getfamily",
"getfd",
+    "getoption",
"getpeername",
"getsockname",
@@ -594,14 +661,25 @@ test_methods(socket.udp(), {
"setpeername",
"setsockname",
"settimeout"
-})
+}

+
+------------------------------------------------------------------------
+test_methods(socket.udp(), udp_methods)
+test_methods(socket.udp6(), udp_methods)
+
+test_partialrecv()

test("select function")
test_selectbugs()

+
+test("write after close")
+test_writeafterclose()
+
test("connect function")
connect_timeout()
empty_connect()
@@ -710,4 +788,8 @@ test_blockingtimeoutreceive(800091, 2, 3

+test("shutting server down")
+reconnect()
+remote("os.exit()")
+
test(string.format("done in %.2fs", socket.gettime() - start))
diff -up luasocket-2.0.2/test/testmesg.lua.21 luasocket-2.0.2/test/testmesg.lua
--- luasocket-2.0.2/test/testmesg.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/testmesg.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,96 @@
+-- load the smtp support and its friends
+local smtp = require("socket.smtp")
+local mime = require("mime")
+local ltn12 = require("ltn12")
+
+function filter(s)
+    if s then io.write(s) end
+    return s
+end
+
+source = smtp.message {
+    headers = { ['content-type'] = 'multipart/alternative' },
+    body = {
+        [1] = {
+            headers = { ['Content-type'] = 'text/html' },
+            body = "<html> <body> Hi, <b>there</b>...</body> </html>"
+        },
+        [2] = {
+            headers = { ['content-type'] = 'text/plain' },
+            body = "Hi, there..."
+        }
+    }
+}
+
+r, e = smtp.send{
+    rcpt = {"<diego@tecgraf.puc-rio.br>",
+            "<diego@princeton.edu>" },
+    from = "<diego@princeton.edu>",
+    source = ltn12.source.chain(source, filter),
+    --server = "mail.cs.princeton.edu"
+    server = "localhost",
+    port = 2525
+}
+
+print(r, e)
+
+-- creates a source to send a message with two parts. The first part is
+-- plain text, the second part is a PNG image, encoded as base64.
+source = smtp.message{
+     -- Remember that headers are *ignored* by smtp.send.
+     from = "Sicrano <sicrano@tecgraf.puc-rio.br>",
+     to = "Fulano <fulano@tecgraf.puc-rio.br>",
+     subject = "Here is a message with attachments"
+  },
+  body = {
+    preamble = "If your client doesn't understand attachments, \r\n" ..
+               "it will still display the preamble and the epilogue.\r\n" ..
+               "Preamble might show up even in a MIME enabled client.",
+    -- first part: No headers means plain text, us-ascii.
+    -- The mime.eol low-level filter normalizes end-of-line markers.
+    [1] = {
+      body = mime.eol(0, [[
+        Lines in a message body should always end with CRLF.
+        The smtp module will *NOT* perform translation. It will
+        perform necessary stuffing, though.
+      ]])
+    },
+    -- second part: Headers describe content the to be an image,
+    -- sent under the base64 transfer content encoding.
+    -- Notice that nothing happens until the message is sent. Small
+    -- chunks are loaded into memory and translation happens on the fly.
+    [2] = {
+        ["ConTenT-tYpE"] = 'image/png; name="luasocket.png"',
+        ["content-disposition"] = 'attachment; filename="luasocket.png"',
+        ["content-description"] = 'our logo',
+        ["content-transfer-encoding"] = "BASE64"
+      },
+      body = ltn12.source.chain(
+        ltn12.source.file(io.open("luasocket.png", "rb")),
+        ltn12.filter.chain(
+          mime.encode("base64"),
+          mime.wrap()
+        )
+      )
+    },
+    epilogue = "This might also show up, but after the attachments"
+  }
+}
+
+
+r, e = smtp.send{
+    rcpt = {"<diego@tecgraf.puc-rio.br>",
+            "<diego@princeton.edu>" },
+    from = "<diego@princeton.edu>",
+    source = ltn12.source.chain(source, filter),
+    --server = "mail.cs.princeton.edu",
+    --port = 25
+    server = "localhost",
+    port = 2525
+}
+
+print(r, e)
+
+
diff -up luasocket-2.0.2/test/testsrvr.lua.21 luasocket-2.0.2/test/testsrvr.lua
--- luasocket-2.0.2/test/testsrvr.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/test/testsrvr.lua	2013-05-10 13:49:50.373679159 -0400
@@ -7,9 +7,14 @@ while 1 do
print("server: waiting for client connection...");
control = assert(server:accept());
while 1 do
+        if emsg == "closed" then
+            control:close()
+            break
+        end
+        assert(command, emsg)
assert(control:send(ack));
print(command);
end
end
diff -up luasocket-2.0.2/test/testsupport.lua.21 luasocket-2.0.2/test/testsupport.lua
--- luasocket-2.0.2/test/testsupport.lua.21	2007-10-15 00:21:05.000000000 -0400
+++ luasocket-2.0.2/test/testsupport.lua	2013-05-10 13:49:50.373679159 -0400
@@ -1,13 +1,13 @@
-	local f = io.open(name, "rb")
-	if not f then return nil end
-	f:close()
-	return s
+    local f = io.open(name, "rb")
+    if not f then return nil end
+    f:close()
+    return s
end

function similar(s1, s2)
-	return string.lower(string.gsub(s1 or "", "%s", "")) ==
+    return string.lower(string.gsub(s1 or "", "%s", "")) ==
string.lower(string.gsub(s2 or "", "%s", ""))
end

@@ -28,7 +28,7 @@ local set = rawset
local warn = print

local setglobal = function(table, key, value)
-	warn("changed " .. key)
+    warn("changed " .. key)
set(table, key, value)
end

diff -up luasocket-2.0.2/test/tftptest.lua.21 luasocket-2.0.2/test/tftptest.lua
--- luasocket-2.0.2/test/tftptest.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/tftptest.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,20 @@
+local tftp = require("socket.tftp")
+
+-- needs tftp server running on localhost, with root pointing to
+-- a directory with index.html in it
+
+    local f = io.open(file, "r")
+    if not f then return nil end
+    f:close()
+    return a
+end
+
+host = host or "diego.student.princeton.edu"
+retrieved, err = tftp.get("tftp://" .. host .."/index.html")
+assert(not err, err)
+assert(original == retrieved, "files differ!")
+print("passed")
diff -up luasocket-2.0.2/test/udpconnectclnt.lua.21 luasocket-2.0.2/test/udpconnectclnt.lua
--- luasocket-2.0.2/test/udpconnectclnt.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/udpconnectclnt.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,19 @@
+local socket = require"socket"
+local udp = socket.udp
+local localhost = "127.0.0.1"
+local port = arg[1]
+
+se:setsockname(localhost, 5062)
+print("se", se:getsockname())
+sc:setsockname(localhost, 5061)
+print("sc", sc:getsockname())
+
+se:sendto("this is a test from se", localhost, port)
+socket.sleep(1)
+sc:sendto("this is a test from sc", localhost, port)
+socket.sleep(1)
+se:sendto("this is a test from se", localhost, port)
+socket.sleep(1)
+sc:sendto("this is a test from sc", localhost, port)
diff -up luasocket-2.0.2/test/udpconnectsrvr.lua.21 luasocket-2.0.2/test/udpconnectsrvr.lua
--- luasocket-2.0.2/test/udpconnectsrvr.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/udpconnectsrvr.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,16 @@
+local socket = require"socket"
+local udp = socket.udp
+local localhost = "127.0.0.1"
+local s = assert(udp())
+assert(tostring(s):find("udp{unconnected}"))
+print("setpeername", s:setpeername(localhost, 5061))
+print("getsockname", s:getsockname())
+assert(tostring(s):find("udp{connected}"))
+print("setpeername", s:setpeername("*"))
+print("getsockname", s:getsockname())
+s:sendto("a", localhost, 12345)
+print("getsockname", s:getsockname())
+assert(tostring(s):find("udp{unconnected}"))
+s:close()
diff -up luasocket-2.0.2/test/udp-zero-length-send.21 luasocket-2.0.2/test/udp-zero-length-send
--- luasocket-2.0.2/test/udp-zero-length-send.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/udp-zero-length-send	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,25 @@
+#!/usr/bin/lua
+
+--[[
+Show that luasocket returns an error message on zero-length UDP sends,
+even though the send is valid, and in fact the UDP packet is sent
+to the peer:
+
+% sudo tcpdump -i lo -n
+tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
+listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
+13:40:16.652808 IP 127.0.0.1.56573 > 127.0.0.1.5432: UDP, length 0
+
+]]
+
+require"socket"
+
+s = assert(socket.udp())
+r = assert(socket.udp())
+assert(r:setsockname("*", 5432))
+assert(s:setpeername("127.0.0.1", 5432))
+
+ssz, emsg = s:send("")
+
+print(ssz == 0 and "OK" or "FAIL",[[send:("")]], ssz, emsg)
+
diff -up luasocket-2.0.2/test/udp-zero-length-send-recv.21 luasocket-2.0.2/test/udp-zero-length-send-recv
--- luasocket-2.0.2/test/udp-zero-length-send-recv.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/udp-zero-length-send-recv	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,37 @@
+#!/usr/bin/lua
+
+--[[
+Show that luasocket returns an error message on zero-length UDP sends,
+even though the send is valid, and in fact the UDP packet is sent
+to the peer:
+
+% sudo tcpdump -i lo -n
+tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
+listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
+13:40:16.652808 IP 127.0.0.1.56573 > 127.0.0.1.5432: UDP, length 0
+
+]]
+
+require"socket"
+
+s = assert(socket.udp())
+r = assert(socket.udp())
+assert(r:setsockname("*", 5432))
+assert(s:setpeername("127.0.0.1", 5432))
+
+ok, emsg = s:send("")
+if ok ~= 0 then
+    print("send of zero failed with:", ok, emsg)
+end
+
+assert(r:settimeout(2))
+
+
+if not ok or string.len(ok) ~= 0 then
+    print("fail - receive of zero failed with:", ok, emsg)
+    os.exit(1)
+end
+
+print"ok"
+
diff -up luasocket-2.0.2/test/unixclnt.lua.21 luasocket-2.0.2/test/unixclnt.lua
--- luasocket-2.0.2/test/unixclnt.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/unixclnt.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,8 @@
+socket = require"socket"
+socket.unix = require"socket.unix"
+c = assert(socket.unix())
+assert(c:connect("/tmp/foo"))
+while 1 do
+    assert(c:send(l .. "\n"))
+end
diff -up luasocket-2.0.2/test/unixsrvr.lua.21 luasocket-2.0.2/test/unixsrvr.lua
--- luasocket-2.0.2/test/unixsrvr.lua.21	2013-05-10 13:49:50.373679159 -0400
+++ luasocket-2.0.2/test/unixsrvr.lua	2013-05-10 13:49:50.373679159 -0400
@@ -0,0 +1,9 @@
+    socket = require"socket"
+    socket.unix = require"socket.unix"
+    u = assert(socket.unix())
+    assert(u:bind("/tmp/foo"))
+    assert(u:listen())
+    c = assert(u:accept())
+    while 1 do
+    end
@@ -0,0 +1,15 @@
+<html>
+<title>POST test</title>
+<body>
+
+<form action='http://localhost/luasocket-cgi-bin/cat-stdin' enctype='multipart/form-data' method=POST>
+<center>
+<input type="file" name="attach">
+<p>
+<input type=submit name=sendmail value="send">
+</center>
+</form>
+</body>
+</html>
diff -up luasocket-2.0.2/test/urltest.lua.21 luasocket-2.0.2/test/urltest.lua
--- luasocket-2.0.2/test/urltest.lua.21	2013-05-10 13:49:50.374679159 -0400
+++ luasocket-2.0.2/test/urltest.lua	2013-05-10 13:49:50.374679159 -0400
@@ -0,0 +1,635 @@
+local socket = require("socket")
+socket.url = require("socket.url")
+dofile("testsupport.lua")
+
+local check_build_url = function(parsed)
+    local built = socket.url.build(parsed)
+    if built ~= parsed.url then
+        print("built is different from expected")
+        print(built)
+        print(expected)
+        os.exit()
+    end
+end
+
+local check_protect = function(parsed, path, unsafe)
+    local built = socket.url.build_path(parsed, unsafe)
+    if built ~= path then
+        print(built, path)
+        print("path composition failed.")
+        os.exit()
+    end
+end
+
+local check_invert = function(url)
+    local parsed = socket.url.parse(url)
+    parsed.path = socket.url.build_path(socket.url.parse_path(parsed.path))
+    local rebuilt = socket.url.build(parsed)
+    if rebuilt ~= url then
+        print(url, rebuilt)
+        print("original and rebuilt are different")
+        os.exit()
+    end
+end
+
+local check_parse_path = function(path, expect)
+    local parsed = socket.url.parse_path(path)
+    for i = 1, math.max(#parsed, #expect) do
+        if parsed[i] ~= expect[i] then
+            print(path)
+            os.exit()
+        end
+    end
+    if expect.is_directory ~= parsed.is_directory then
+        print(path)
+        print("is_directory mismatch")
+        os.exit()
+    end
+    if expect.is_absolute ~= parsed.is_absolute then
+        print(path)
+        print("is_absolute mismatch")
+        os.exit()
+    end
+    local built = socket.url.build_path(expect)
+    if built ~= path then
+        print(built, path)
+        print("path composition failed.")
+        os.exit()
+    end
+end
+
+local check_absolute_url = function(base, relative, absolute)
+    local res = socket.url.absolute(base, relative)
+    if res ~= absolute then
+        io.write("absolute: In test for '", relative, "' expected '",
+            absolute, "' but got '", res, "'\n")
+        os.exit()
+    end
+end
+
+local check_parse_url = function(gaba)
+    local url = gaba.url
+    gaba.url = nil
+    local parsed = socket.url.parse(url)
+    for i, v in pairs(gaba) do
+        if v ~= parsed[i] then
+            io.write("parse: In test for '", url, "' expected ", i, " = '",
+                   v, "' but got '", tostring(parsed[i]), "'\n")
+            for i,v in pairs(parsed) do print(i,v) end
+            os.exit()
+        end
+    end
+    for i, v in pairs(parsed) do
+        if v ~= gaba[i] then
+            io.write("parse: In test for '", url, "' expected ", i, " = '",
+                   tostring(gaba[i]), "' but got '", v, "'\n")
+            for i,v in pairs(parsed) do print(i,v) end
+            os.exit()
+        end
+    end
+end
+
+print("testing URL parsing")
+check_parse_url{
+    url = "scheme://userinfo@host:port/path;params?query#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    scheme = "scheme",
+    host = "host",
+    port = "port",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment",
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/path;params?query#",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = ""
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/path;params?#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/path;params#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/path;?query#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/path?query#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port/;params?query#fragment",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "scheme://userinfo@host:port",
+    scheme = "scheme",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+}
+
+check_parse_url{
+    url = "//userinfo@host:port/path;params?query#fragment",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    url = "//userinfo@host:port/path",
+    authority = "userinfo@host:port",
+    host = "host",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//userinfo@host/path",
+    authority = "userinfo@host",
+    host = "host",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+}
+
+check_parse_url{
+    host = "host",
+    user = "user",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//user:@host/path",
+    authority = "user:@host",
+    host = "host",
+    userinfo = "user:",
+    user = "user",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//user@host:port/path",
+    authority = "user@host:port",
+    host = "host",
+    userinfo = "user",
+    user = "user",
+    port = "port",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//host:port/path",
+    authority = "host:port",
+    port = "port",
+    host = "host",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//host/path",
+    authority = "host",
+    host = "host",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "//host",
+    authority = "host",
+    host = "host",
+}
+
+check_parse_url{
+    url = "/path",
+    path = "/path",
+}
+
+check_parse_url{
+    url = "path",
+    path = "path",
+}
+
+-- IPv6 tests
+
+check_parse_url{
+    url = "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html",
+    scheme = "http",
+    host = "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210",
+    authority = "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80",
+    port = "80",
+    path = "/index.html"
+}
+
+check_parse_url{
+    url = "http://[1080:0:0:0:8:800:200C:417A]/index.html",
+    scheme = "http",
+    host = "1080:0:0:0:8:800:200C:417A",
+    authority = "[1080:0:0:0:8:800:200C:417A]",
+    path = "/index.html"
+}
+
+check_parse_url{
+    url = "http://[3ffe:2a00:100:7031::1]",
+    scheme = "http",
+    host = "3ffe:2a00:100:7031::1",
+    authority = "[3ffe:2a00:100:7031::1]",
+}
+
+check_parse_url{
+    url = "http://[1080::8:800:200C:417A]/foo",
+    scheme = "http",
+    host = "1080::8:800:200C:417A",
+    authority = "[1080::8:800:200C:417A]",
+    path = "/foo"
+}
+
+check_parse_url{
+    url = "http://[::192.9.5.5]/ipng",
+    scheme = "http",
+    host = "::192.9.5.5",
+    authority = "[::192.9.5.5]",
+    path = "/ipng"
+}
+
+check_parse_url{
+    url = "http://[::FFFF:129.144.52.38]:80/index.html",
+    scheme = "http",
+    host = "::FFFF:129.144.52.38",
+    port = "80",
+    authority = "[::FFFF:129.144.52.38]:80",
+    path = "/index.html"
+}
+
+check_parse_url{
+    url = "http://[2010:836B:4179::836B:4179]",
+    scheme = "http",
+    host = "2010:836B:4179::836B:4179",
+    authority = "[2010:836B:4179::836B:4179]",
+}
+
+check_parse_url{
+    url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment",
+    authority = "userinfo@[::FFFF:129.144.52.38]:port",
+    host = "::FFFF:129.144.52.38",
+    port = "port",
+    userinfo = "userinfo",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_parse_url{
+    scheme = "scheme",
+    host = "::192.9.5.5",
+    port = "port",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+print("testing URL building")
+check_build_url {
+    scheme = "scheme",
+    host = "host",
+    port = "port",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url{
+    url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment",
+    host = "::FFFF:129.144.52.38",
+    port = "port",
+    user = "userinfo",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url{
+    scheme = "scheme",
+    host = "::192.9.5.5",
+    port = "port",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    scheme = "scheme",
+    host = "host",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    url = "scheme://user@host/path;params?query#fragment",
+    scheme = "scheme",
+    host = "host",
+    user = "user",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    url = "scheme://host/path;params?query#fragment",
+    scheme = "scheme",
+    host = "host",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    url = "scheme://host/path;params#fragment",
+    scheme = "scheme",
+    host = "host",
+    path = "/path",
+    params = "params",
+    fragment = "fragment"
+}
+
+check_build_url {
+    url = "scheme://host/path#fragment",
+    scheme = "scheme",
+    host = "host",
+    path = "/path",
+    fragment = "fragment"
+}
+
+check_build_url {
+    url = "scheme://host/path",
+    scheme = "scheme",
+    host = "host",
+    path = "/path",
+}
+
+check_build_url {
+    url = "//host/path",
+    host = "host",
+    path = "/path",
+}
+
+check_build_url {
+    url = "/path",
+    path = "/path",
+}
+
+check_build_url {
+    scheme = "scheme",
+    host = "host",
+    port = "port",
+    user = "user",
+    userinfo = "not used",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    scheme = "scheme",
+    host = "host",
+    port = "port",
+    user = "user",
+    userinfo = "not used",
+    authority = "not used",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    scheme = "scheme",
+    host = "host",
+    port = "port",
+    authority = "not used",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+check_build_url {
+    scheme = "scheme",
+    path = "/path",
+    params = "params",
+    query = "query",
+    fragment = "fragment"
+}
+
+-- standard RFC tests
+print("testing absolute resolution")
+check_absolute_url("http://a/b/c/d;p?q#f", "g:h", "g:h")
+check_absolute_url("http://a/b/c/d;p?q#f", "g", "http://a/b/c/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "./g", "http://a/b/c/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "g/", "http://a/b/c/g/")
+check_absolute_url("http://a/b/c/d;p?q#f", "/g", "http://a/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "//g", "http://g")
+check_absolute_url("http://a/b/c/d;p?q#f", "?y", "http://a/b/c/d;p?y")
+check_absolute_url("http://a/b/c/d;p?q#f", "g?y", "http://a/b/c/g?y")
+check_absolute_url("http://a/b/c/d;p?q#f", "g?y/./x", "http://a/b/c/g?y/./x")
+check_absolute_url("http://a/b/c/d;p?q#f", "#s", "http://a/b/c/d;p?q#s")
+check_absolute_url("http://a/b/c/d;p?q#f", "g#s", "http://a/b/c/g#s")
+check_absolute_url("http://a/b/c/d;p?q#f", "g#s/./x", "http://a/b/c/g#s/./x")
+check_absolute_url("http://a/b/c/d;p?q#f", "g?y#s", "http://a/b/c/g?y#s")
+check_absolute_url("http://a/b/c/d;p?q#f", ";x", "http://a/b/c/d;x")
+check_absolute_url("http://a/b/c/d;p?q#f", "g;x", "http://a/b/c/g;x")
+check_absolute_url("http://a/b/c/d;p?q#f", "g;x?y#s", "http://a/b/c/g;x?y#s")
+check_absolute_url("http://a/b/c/d;p?q#f", ".", "http://a/b/c/")
+check_absolute_url("http://a/b/c/d;p?q#f", "./", "http://a/b/c/")
+check_absolute_url("http://a/b/c/d;p?q#f", "..", "http://a/b/")
+check_absolute_url("http://a/b/c/d;p?q#f", "../", "http://a/b/")
+check_absolute_url("http://a/b/c/d;p?q#f", "../g", "http://a/b/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "../..", "http://a/")
+check_absolute_url("http://a/b/c/d;p?q#f", "../../", "http://a/")
+check_absolute_url("http://a/b/c/d;p?q#f", "../../g", "http://a/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "", "http://a/b/c/d;p?q#f")
+check_absolute_url("http://a/b/c/d;p?q#f", "/./g", "http://a/./g")
+check_absolute_url("http://a/b/c/d;p?q#f", "/../g", "http://a/../g")
+check_absolute_url("http://a/b/c/d;p?q#f", "g.", "http://a/b/c/g.")
+check_absolute_url("http://a/b/c/d;p?q#f", ".g", "http://a/b/c/.g")
+check_absolute_url("http://a/b/c/d;p?q#f", "g..", "http://a/b/c/g..")
+check_absolute_url("http://a/b/c/d;p?q#f", "..g", "http://a/b/c/..g")
+check_absolute_url("http://a/b/c/d;p?q#f", "./../g", "http://a/b/g")
+check_absolute_url("http://a/b/c/d;p?q#f", "./g/.", "http://a/b/c/g/")
+check_absolute_url("http://a/b/c/d;p?q#f", "g/./h", "http://a/b/c/g/h")
+check_absolute_url("http://a/b/c/d;p?q#f", "g/../h", "http://a/b/c/h")
+
+-- extra tests
+check_absolute_url("//a/b/c/d;p?q#f", "d/e/f", "//a/b/c/d/e/f")
+check_absolute_url("/a/b/c/d;p?q#f", "d/e/f", "/a/b/c/d/e/f")
+check_absolute_url("a/b/c/d", "d/e/f", "a/b/c/d/e/f")
+check_absolute_url("a/b/c/d/../", "d/e/f", "a/b/c/d/e/f")
+check_absolute_url("http://velox.telemar.com.br", "/dashboard/index.html",
+   "http://velox.telemar.com.br/dashboard/index.html")
+
+print("testing path parsing and composition")
+check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 })
+check_parse_path("/eu/", { "eu"; is_absolute = 1, is_directory = 1 })
+check_parse_path("eu/tu/ele/nos/vos/eles/",
+    { "eu", "tu", "ele", "nos", "vos", "eles"; is_directory = 1})
+check_parse_path("/", { is_absolute = 1, is_directory = 1})
+check_parse_path("", { })
+check_parse_path("eu%01/%02tu/e%03l%04e/nos/vos%05/e%12les/",
+    { "eu\1", "\2tu", "e\3l\4e", "nos", "vos\5", "e\18les"; is_directory = 1})
+check_parse_path("eu/tu", { "eu", "tu" })
+
+print("testing path protection")
+check_protect({ "eu", "-_.!~*'():@&=+$,", "tu" }, "eu/-_.!~*'():@&=+$,/tu")
+check_protect({ "eu ", "~diego" }, "eu%20/~diego")
+check_protect({ "/eu>", "<diego?" }, "%2feu%3e/%3cdiego%3f")
+check_protect({ "\\eu]", "[diego" }, "%5ceu%5d/%5bdiego%60")
+check_protect({ "{eu}", "|diego\127" }, "%7beu%7d/%7cdiego%7f")
+check_protect({ "eu ", "~diego" }, "eu /~diego", 1)
+check_protect({ "/eu>", "<diego?" }, "/eu>/<diego?", 1)
+check_protect({ "\\eu]", "[diego" }, "\\eu]/[diego", 1)
+check_protect({ "{eu}", "|diego\127" }, "{eu}/|diego\127", 1)
+
+print("testing inversion")
+check_invert("http:")
+check_invert("a/b/c/d.html")
+check_invert("//net_loc")
+check_invert("http:a/b/d/c.html")
+check_invert("//net_loc/a/b/d/c.html")
+check_invert("http://net_loc/a/b/d/c.html")
+check_invert("//who:isit@net_loc")
+check_invert("http://he:man@boo.bar/a/b/c/i.html;type=moo?this=that#mark")
+check_invert("/b/c/d#fragment")
+check_invert("/b/c/d;param#fragment")
+check_invert("/b/c/d;param?query#fragment")
+check_invert("/b/c/d?query")
+check_invert("/b/c/d;param?query")
+check_invert("http://he:man@[::192.168.1.1]/a/b/c/i.html;type=moo?this=that#mark")
+
+print("the library passed all tests")
diff -up luasocket-2.0.2/test/utestclnt.lua.21 luasocket-2.0.2/test/utestclnt.lua
--- luasocket-2.0.2/test/utestclnt.lua.21	2013-05-10 13:49:50.374679159 -0400
+++ luasocket-2.0.2/test/utestclnt.lua	2013-05-10 13:49:50.374679159 -0400
@@ -0,0 +1,644 @@
+require"socket"
+local socket = require"socket.unix"
+
+host = "luasocket"
+
+function pass(...)
+    local s = string.format(...)
+    io.stderr:write(s, "\n")
+end
+
+function fail(...)
+    local s = string.format(...)
+    io.stderr:write("ERROR: ", s, "!\n")
+socket.sleep(3)
+    os.exit()
+end
+
+function warn(...)
+    local s = string.format(...)
+    io.stderr:write("WARNING: ", s, "\n")
+end
+
+function remote(...)
+    local s = string.format(...)
+    s = string.gsub(s, "\n", ";")
+    s = string.gsub(s, "%s+", " ")
+    s = string.gsub(s, "^%s*", "")
+    control:send(s .. "\n")
+end
+
+function test(test)
+    io.stderr:write("----------------------------------------------\n",
+        "testing: ", test, "\n",
+        "----------------------------------------------\n")
+end
+
+function uconnect(path)
+    local u = assert(socket.unix())
+    assert(u:connect(path))
+    return u
+end
+
+function ubind(path)
+    local u = assert(socket.unix())
+    assert(u:bind(path))
+    assert(u:listen(5))
+    return u
+end
+
+function check_timeout(tm, sl, elapsed, err, opp, mode, alldone)
+    if tm < sl then
+        if opp == "send" then
+            if not err then warn("must be buffered")
+            elseif err == "timeout" then pass("proper timeout")
+            else fail("unexpected error '%s'", err) end
+        else
+            if err ~= "timeout" then fail("should have timed out")
+            else pass("proper timeout") end
+        end
+    else
+        if mode == "total" then
+            if elapsed > tm then
+                if err ~= "timeout" then fail("should have timed out")
+                else pass("proper timeout") end
+            elseif elapsed < tm then
+                if err then fail(err)
+                else pass("ok") end
+            else
+                if alldone then
+                    if err then fail("unexpected error '%s'", err)
+                    else pass("ok") end
+                else
+                    if err ~= "timeout" then fail(err)
+                    else pass("proper timeoutk") end
+                end
+            end
+        else
+            if err then fail(err)
+            else pass("ok") end
+        end
+    end
+end
+
+if not socket.DEBUG then
+    fail("Please define LUASOCKET_DEBUG and recompile LuaSocket")
+end
+
+io.stderr:write("----------------------------------------------\n",
+"LuaSocket Test Procedures\n",
+"----------------------------------------------\n")
+
+start = socket.gettime()
+
+function reconnect()
+    io.stderr:write("attempting data connection... ")
+    if data then data:close() end
+    remote [[
+        i = i or 1
+        if data then data:close() data = nil end
+        print("accepting")
+        data = server:accept()
+        i = i + 1
+        print("done " .. i)
+    ]]
+    data, err = uconnect(host, port)
+    if not data then fail(err)
+    else pass("connected!") end
+end
+
+pass("attempting control connection...")
+control, err = uconnect(host, port)
+if err then fail(err)
+else pass("connected!") end
+
+------------------------------------------------------------------------
+function test_methods(sock, methods)
+    for _, v in methods do
+        if type(sock[v]) ~= "function" then
+            fail(sock.class .. " method '" .. v .. "' not registered")
+        end
+    end
+    pass(sock.class .. " methods are ok")
+end
+
+------------------------------------------------------------------------
+function test_mixed(len)
+    reconnect()
+    local inter = math.ceil(len/4)
+    local p1 = "unix " .. string.rep("x", inter) .. "line\n"
+    local p2 = "dos " .. string.rep("y", inter) .. "line\r\n"
+    local p3 = "raw " .. string.rep("z", inter) .. "bytes"
+    local p4 = "end" .. string.rep("w", inter) .. "bytes"
+    local bp1, bp2, bp3, bp4
+            string.len(p1)+string.len(p2)+string.len(p3)+string.len(p4)))
+    sent, err = data:send(p1..p2..p3..p4)
+    if err then fail(err) end
+remote "data:send(str); data:close()"
+    if err then fail(err) end
+    if err then fail(err) end
+    if err then fail(err) end
+    if err then fail(err) end
+    if bp1.."\n" == p1 and bp2.."\r\n" == p2 and bp3 == p3 and bp4 == p4 then
+        pass("patterns match")
+    else fail("patterns don't match") end
+end
+
+------------------------------------------------------------------------
+function test_asciiline(len)
+    reconnect()
+    local str, str10, back, err
+    str = string.rep("x", math.mod(len, 10))
+    str10 = string.rep("aZb.c#dAe?", math.floor(len/10))
+    str = str .. str10
+    sent, err = data:send(str.."\n")
+    if err then fail(err) end
+remote "data:send(str ..'\\n')"
+    if err then fail(err) end
+    if back == str then pass("lines match")
+    else fail("lines don't match") end
+end
+
+------------------------------------------------------------------------
+function test_rawline(len)
+    reconnect()
+    local str, str10, back, err
+    str = string.rep(string.char(47), math.mod(len, 10))
+    str10 = string.rep(string.char(120,21,77,4,5,0,7,36,44,100),
+            math.floor(len/10))
+    str = str .. str10
+    sent, err = data:send(str.."\n")
+    if err then fail(err) end
+remote "data:send(str..'\\n')"
+    if err then fail(err) end
+    if back == str then pass("lines match")
+    else fail("lines don't match") end
+end
+
+------------------------------------------------------------------------
+function test_raw(len)
+    reconnect()
+    local half = math.floor(len/2)
+    local s1, s2, back, err
+    s1 = string.rep("x", half)
+    s2 = string.rep("y", len-half)
+    sent, err = data:send(s1)
+    if err then fail(err) end
+    sent, err = data:send(s2)
+    if err then fail(err) end
+remote "data:send(str)"
+    if err then fail(err) end
+    if back == s1..s2 then pass("blocks match")
+    else fail("blocks don't match") end
+end
+
+------------------------------------------------------------------------
+    reconnect()
+    local str, err, partial
+    pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl)
+    remote (string.format ([[
+        data:settimeout(%d)
+        str = string.rep('a', %d)
+        data:send(str)
+        print('server: sleeping for %ds')
+        socket.sleep(%d)
+        print('server: woke up')
+        data:send(str)
+    ]], 2*tm, len, sl, sl))
+    data:settimeout(tm, "total")
+local t = socket.gettime()
+    str, err, partial, elapsed = data:receive(2*len)
+    check_timeout(tm, sl, elapsed, err, "receive", "total",
+        string.len(str or partial) == 2*len)
+end
+
+------------------------------------------------------------------------
+function test_totaltimeoutsend(len, tm, sl)
+    reconnect()
+    local str, err, total
+    pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl)
+    remote (string.format ([[
+        data:settimeout(%d)
+        print('server: sleeping for %ds')
+        socket.sleep(%d)
+        print('server: woke up')
+    ]], 2*tm, len, sl, sl, len))
+    data:settimeout(tm, "total")
+    str = string.rep("a", 2*len)
+    total, err, partial, elapsed = data:send(str)
+    check_timeout(tm, sl, elapsed, err, "send", "total",
+        total == 2*len)
+end
+
+------------------------------------------------------------------------
+    reconnect()
+    local str, err, partial
+    pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl)
+    remote (string.format ([[
+        data:settimeout(%d)
+        str = string.rep('a', %d)
+        data:send(str)
+        print('server: sleeping for %ds')
+        socket.sleep(%d)
+        print('server: woke up')
+        data:send(str)
+    ]], 2*tm, len, sl, sl))
+    data:settimeout(tm)
+    str, err, partial, elapsed = data:receive(2*len)
+    check_timeout(tm, sl, elapsed, err, "receive", "blocking",
+        string.len(str or partial) == 2*len)
+end
+
+------------------------------------------------------------------------
+function test_blockingtimeoutsend(len, tm, sl)
+    reconnect()
+    local str, err, total
+    pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl)
+    remote (string.format ([[
+        data:settimeout(%d)
+        print('server: sleeping for %ds')
+        socket.sleep(%d)
+        print('server: woke up')
+    ]], 2*tm, len, sl, sl, len))
+    data:settimeout(tm)
+    str = string.rep("a", 2*len)
+    total, err,  partial, elapsed = data:send(str)
+    check_timeout(tm, sl, elapsed, err, "send", "blocking",
+        total == 2*len)
+end
+
+------------------------------------------------------------------------
+function empty_connect()
+    reconnect()
+    if data then data:close() data = nil end
+    remote [[
+        if data then data:close() data = nil end
+        data = server:accept()
+    ]]
+    data, err = socket.connect("", port)
+    if not data then
+        pass("ok")
+        data = socket.connect(host, port)
+    else
+        pass("gethostbyname returns localhost on empty string...")
+    end
+end
+
+------------------------------------------------------------------------
+function isclosed(c)
+    return c:getfd() == -1 or c:getfd() == (2^32-1)
+end
+
+function active_close()
+    reconnect()
+    if isclosed(data) then fail("should not be closed") end
+    data:close()
+    if not isclosed(data) then fail("should be closed") end
+    data = nil
+    local udp = socket.udp()
+    if isclosed(udp) then fail("should not be closed") end
+    udp:close()
+    if not isclosed(udp) then fail("should be closed") end
+    pass("ok")
+end
+
+------------------------------------------------------------------------
+function test_closed()
+    local back, partial, err
+    local str = 'little string'
+    reconnect()
+    remote (string.format ([[
+        data:send('%s')
+        data:close()
+        data = nil
+    ]], str))
+    -- try to get a line
+    back, err, partial = data:receive()
+    if not err then fail("should have gotten 'closed'.")
+    elseif err ~= "closed" then fail("got '"..err.."' instead of 'closed'.")
+    elseif str ~= partial then fail("didn't receive partial result.")
+    else pass("graceful 'closed' received") end
+    reconnect()
+    pass("trying write detection")
+    remote [[
+        data:close()
+        data = nil
+    ]]
+    total, err, partial = data:send(string.rep("ugauga", 100000))
+    if not err then
+        pass("failed: output buffer is at least %d bytes long!", total)
+    elseif err ~= "closed" then
+        fail("got '"..err.."' instead of 'closed'.")
+    else
+        pass("graceful 'closed' received after %d bytes were sent", partial)
+    end
+end
+
+------------------------------------------------------------------------
+function test_selectbugs()
+    local r, s, e = socket.select(nil, nil, 0.1)
+    assert(type(r) == "table" and type(s) == "table" and
+        (e == "timeout" or e == "error"))
+    pass("both nil: ok")
+    local udp = socket.udp()
+    udp:close()
+    r, s, e = socket.select({ udp }, { udp }, 0.1)
+    assert(type(r) == "table" and type(s) == "table" and
+        (e == "timeout" or e == "error"))
+    pass("closed sockets: ok")
+    e = pcall(socket.select, "wrong", 1, 0.1)
+    assert(e == false)
+    e = pcall(socket.select, {}, 1, 0.1)
+    assert(e == false)
+    pass("invalid input: ok")
+end
+
+------------------------------------------------------------------------
+function accept_timeout()
+    io.stderr:write("accept with timeout (if it hangs, it failed): ")
+    local s, e = socket.bind("*", 0, 0)
+    assert(s, e)
+    local t = socket.gettime()
+    s:settimeout(1)
+    local c, e = s:accept()
+    assert(not c, "should not accept")
+    assert(e == "timeout", string.format("wrong error message (%s)", e))
+    t = socket.gettime() - t
+    assert(t < 2, string.format("took to long to give up (%gs)", t))
+    s:close()
+    pass("good")
+end
+
+------------------------------------------------------------------------
+function connect_timeout()
+    io.stderr:write("connect with timeout (if it hangs, it failed!): ")
+    local t = socket.gettime()
+    local c, e = socket.tcp()
+    assert(c, e)
+    c:settimeout(0.1)
+    local t = socket.gettime()
+    local r, e = c:connect("127.0.0.2", 80)
+    assert(not r, "should not connect")
+    assert(socket.gettime() - t < 2, "took too long to give up.")
+    c:close()
+    print("ok")
+end
+
+------------------------------------------------------------------------
+function accept_errors()
+    io.stderr:write("not listening: ")
+    local d, e = socket.bind("*", 0)
+    assert(d, e);
+    local c, e = socket.tcp();
+    assert(c, e);
+    d:setfd(c:getfd())
+    d:settimeout(2)
+    local r, e = d:accept()
+    assert(not r and e)
+    print("ok: ", e)
+    io.stderr:write("not supported: ")
+    local c, e = socket.udp()
+    assert(c, e);
+    d:setfd(c:getfd())
+    local r, e = d:accept()
+    assert(not r and e)
+    print("ok: ", e)
+end
+
+------------------------------------------------------------------------
+function connect_errors()
+    io.stderr:write("connection refused: ")
+    local c, e = socket.connect("localhost", 1);
+    assert(not c and e)
+    print("ok: ", e)
+    local c, e = socket.connect("host.is.invalid", 1);
+    assert(not c and e, e)
+    print("ok: ", e)
+end
+
+------------------------------------------------------------------------
+function rebind_test()
+    local c = socket.bind("localhost", 0)
+    local i, p = c:getsockname()
+    local s, e = socket.tcp()
+    assert(s, e)
+    r, e = s:bind("localhost", p)
+    assert(not r, "managed to rebind!")
+    assert(e)
+    print("ok: ", e)
+end
+
+------------------------------------------------------------------------
+function getstats_test()
+    reconnect()
+    local t = 0
+    for i = 1, 25 do
+        local c = math.random(1, 100)
+        remote (string.format ([[
+            data:send(str)
+        ]], c))
+        data:send(string.rep("a", c))
+        t = t + c
+        local r, s, a = data:getstats()
+        assert(r == t, "received count failed" .. tostring(r)
+            .. "/" .. tostring(t))
+        assert(s == t, "sent count failed" .. tostring(s)
+            .. "/" .. tostring(t))
+    end
+    print("ok")
+end
+
+
+------------------------------------------------------------------------
+function test_nonblocking(size)
+    reconnect()
+print("Testing "  .. 2*size .. " bytes")
+remote(string.format([[
+    data:send(string.rep("a", %d))
+    socket.sleep(0.5)
+    data:send(string.rep("b", %d) .. "\n")
+]], size, size))
+    local err = "timeout"
+    local part = ""
+    local str
+    data:settimeout(0)
+    while 1 do
+        str, err, part = data:receive("*l", part)
+        if err ~= "timeout" then break end
+    end
+    assert(str == (string.rep("a", size) .. string.rep("b", size)))
+    reconnect()
+remote(string.format([[
+    socket.sleep(0.5)
+    data:send(str)
+]], size, size))
+    data:settimeout(0)
+    local start = 0
+    while 1 do
+        ret, err, start = data:send(str, start+1)
+        if err ~= "timeout" then break end
+    end
+    data:send("\n")
+    data:settimeout(-1)
+    assert(back == str, "'" .. back .. "' vs '" .. str .. "'")
+    print("ok")
+end
+
+------------------------------------------------------------------------
+
+test("method registration")
+test_methods(socket.unix(), {
+    "accept",
+    "bind",
+    "close",
+    "connect",
+    "dirty",
+    "getfd",
+    "getstats",
+    "setstats",
+    "listen",
+    "send",
+    "setfd",
+    "setoption",
+    "setpeername",
+    "setsockname",
+    "settimeout",
+    "shutdown",
+})
+
+test("connect function")
+--connect_timeout()
+--empty_connect()
+--connect_errors()
+
+--test("rebinding: ")
+--rebind_test()
+
+test("active close: ")
+active_close()
+
+test("closed connection detection: ")
+test_closed()
+
+test("accept function: ")
+accept_timeout()
+accept_errors()
+
+test("getstats test")
+getstats_test()
+
+test("character line")
+test_asciiline(1)
+test_asciiline(17)
+test_asciiline(200)
+test_asciiline(4091)
+test_asciiline(80199)
+test_asciiline(8000000)
+test_asciiline(80199)
+test_asciiline(4091)
+test_asciiline(200)
+test_asciiline(17)
+test_asciiline(1)
+
+test("mixed patterns")
+test_mixed(1)
+test_mixed(17)
+test_mixed(200)
+test_mixed(4091)
+test_mixed(801990)
+test_mixed(4091)
+test_mixed(200)
+test_mixed(17)
+test_mixed(1)
+
+test("binary line")
+test_rawline(1)
+test_rawline(17)
+test_rawline(200)
+test_rawline(4091)
+test_rawline(80199)
+test_rawline(8000000)
+test_rawline(80199)
+test_rawline(4091)
+test_rawline(200)
+test_rawline(17)
+test_rawline(1)
+
+test("raw transfer")
+test_raw(1)
+test_raw(17)
+test_raw(200)
+test_raw(4091)
+test_raw(80199)
+test_raw(8000000)
+test_raw(80199)
+test_raw(4091)
+test_raw(200)
+test_raw(17)
+test_raw(1)
+
+test("non-blocking transfer")
+test_nonblocking(1)
+test_nonblocking(17)
+test_nonblocking(200)
+test_nonblocking(4091)
+test_nonblocking(80199)
+test_nonblocking(8000000)
+test_nonblocking(80199)
+test_nonblocking(4091)
+test_nonblocking(200)
+test_nonblocking(17)
+test_nonblocking(1)
+
+test("total timeout on send")
+test_totaltimeoutsend(800091, 1, 3)
+test_totaltimeoutsend(800091, 2, 3)
+test_totaltimeoutsend(800091, 5, 2)
+test_totaltimeoutsend(800091, 3, 1)
+
+
+test("blocking timeout on send")
+test_blockingtimeoutsend(800091, 1, 3)
+test_blockingtimeoutsend(800091, 2, 3)
+test_blockingtimeoutsend(800091, 3, 2)
+test_blockingtimeoutsend(800091, 3, 1)
+
+
+test(string.format("done in %.2fs", socket.gettime() - start))
diff -up luasocket-2.0.2/test/utestsrvr.lua.21 luasocket-2.0.2/test/utestsrvr.lua
--- luasocket-2.0.2/test/utestsrvr.lua.21	2013-05-10 13:49:50.374679159 -0400
+++ luasocket-2.0.2/test/utestsrvr.lua	2013-05-10 13:49:50.374679159 -0400
@@ -0,0 +1,17 @@
+require("socket");
+os.remove("/tmp/luasocket")
+socket = require("socket.unix");
+host = "luasocket";
+server = socket.unix()
+print(server:bind(host))
+print(server:listen(5))
+ack = "\n";
+while 1 do
+    print("server: waiting for client connection...");
+    control = assert(server:accept());
+    while 1 do
+        assert(control:send(ack));
+    end
+end
diff -up luasocket-2.0.2/TODO.21 luasocket-2.0.2/TODO
--- luasocket-2.0.2/TODO.21	2013-05-10 13:49:50.374679159 -0400
+++ luasocket-2.0.2/TODO	2013-05-10 13:49:50.374679159 -0400
@@ -0,0 +1,81 @@
+- bizarre default values for getnameinfo should throw error instead!
+
+> It's just too bad it can't talk to gmail -
+> reason 1: they absolutely want TLS
+> reason 2: unlike all the other SMTP implementations, they
+> don't
+> tolerate missing < > around adresses
+
+- document the new bind and connect behavior.
+- shouldn't we instead make the code compatible to Lua 5.2
+  without any compat stuff, and use a compatibility layer to
+  make it work on 5.1?
+- add what's new to manual
+- should there be an equivalent to tohostname for IPv6?
+- Maybe the sockaddr to presentation conversion should be done with getnameinfo()?
+
+- add http POST sample to manual
+  people keep asking stupid questions
+- documentation of dirty/getfd/setfd is problematic because of portability
+  same for unix and serial.
+- fix makefile with decent defaults?
+
+Done:
+
+- added IPv6 support to getsockname
+- simplified getpeername implementation
+- added family to return of getsockname and getpeername
+  and added modification to the manual to describe
+
+- remove RCSID from files?
+- move version to 2.1 rather than 2.1.1?
+- fixed url package to support ipv6 hosts
+- changed domain to family
+- implement getfamily methods.
+
+- remove references to Lua 5.0 from documentation, add 5.2?
+- update lua and luasocket version in samples in documentation
+- document ipv5_v6only default option being set?
+- document tcp6 and udp6
+- documented zero-sized datagram change?
+  no.
+- document unix socket and serial socket? add raw support?
+  no.
+- document getoption
+- merge luaL_typeerror into auxiliar to avoid using luaL prefix?
+
+
+
+
+
+
+
+
+
+
+replace \r\n with \0xD\0xA in everything
+New mime support
+
+ftp send should return server replies?
+make sure there are no object files in the distribution tarball
+http handling of 100-continue, see DB patch
+DB ftp.lua bug.
+test unix.c to return just a function and works with require"unix"
+get rid of setmetatable(, nil) since packages don't need this anymore in 5.1
+compat-5.1 novo
+ajeitar pra lua-5.1
+
+adicionar exemplos de expansсo: pipe, local, named pipe
+testar os options!
+
+
+inet_ntoa(), strerror(),
+
diff -up luasocket-2.0.2/WISH.21 luasocket-2.0.2/WISH
--- luasocket-2.0.2/WISH.21	2013-05-10 13:49:50.374679159 -0400
+++ luasocket-2.0.2/WISH	2013-05-10 13:49:50.374679159 -0400
@@ -0,0 +1,22 @@
+... as an l-value to get all results of a function call?
+at least ...[i] and #...
+extend to full tuples?
+
+__and __or __not metamethods
+
+lua_tostring, lua_tonumber, lua_touseradta etc push values in stack
+__tostring,__tonumber, __touserdata metamethods are checked
+and expected to push an object of correct type on stack
+
+lua_rawtostring, lua_rawtonumber, lua_rawtouserdata don't
+push anything on stack, return data of appropriate type,
+skip metamethods and throw error if object not of exact type
+
+package.findfile exported
+module not polluting the global namespace
+
+coxpcall with a coroutine pool for efficiency (reusing coroutines)
+
+exception mechanism formalized? just like the package system was.
+
+a nice bitlib in the core