rubyfox-server 2.3.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/bin/smartfox +7 -0
- data/lib/rubyfox/server/cli.rb +59 -0
- data/lib/rubyfox/server/data/config/.keep +0 -0
- data/lib/rubyfox/server/data/config/_backups/.keep +0 -0
- data/lib/rubyfox/server/data/config/ascii/boot.txt +5 -0
- data/lib/rubyfox/server/data/config/ascii/ready.txt +9 -0
- data/lib/rubyfox/server/data/config/core.xml +44 -0
- data/lib/rubyfox/server/data/config/crossdomain.xml +10 -0
- data/lib/rubyfox/server/data/config/descriptors/.keep +0 -0
- data/lib/rubyfox/server/data/config/descriptors/config_room.txt +323 -0
- data/lib/rubyfox/server/data/config/descriptors/config_server.txt +621 -0
- data/lib/rubyfox/server/data/config/descriptors/config_zone.txt +1021 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_game.txt +63 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_room.txt +377 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_user.txt +589 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_zone.txt +354 -0
- data/lib/rubyfox/server/data/config/jetty/.keep +0 -0
- data/lib/rubyfox/server/data/config/jetty/jetty.xml +214 -0
- data/lib/rubyfox/server/data/config/jetty/realm.properties +21 -0
- data/lib/rubyfox/server/data/config/jetty/webdefault.xml +410 -0
- data/lib/rubyfox/server/data/config/log4j.properties +75 -0
- data/lib/rubyfox/server/data/config/myprop.properties +5 -0
- data/lib/rubyfox/server/data/config/server.xml +65 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.unix.txt +12 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.windows.txt +1 -0
- data/lib/rubyfox/server/data/config/templates/vmoptions.txt +3 -0
- data/lib/rubyfox/server/data/config/wordsFile.txt +13 -0
- data/lib/rubyfox/server/data/data/bannedusers/.keep +0 -0
- data/lib/rubyfox/server/data/data/bannedusers/users.bin +0 -0
- data/lib/rubyfox/server/data/data/buddylists/.keep +0 -0
- data/lib/rubyfox/server/data/data/buddylists/BasicExamples/7364666773646667 +0 -0
- data/lib/rubyfox/server/data/extensions/.keep +0 -0
- data/lib/rubyfox/server/data/extensions/__lib__/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/ant-1.6.5.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/core-3.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-util-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-api-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/BaseHTTPServer.py +484 -0
- data/lib/rubyfox/server/data/lib/Lib/CGIHTTPServer.py +325 -0
- data/lib/rubyfox/server/data/lib/Lib/ConfigParser.py +472 -0
- data/lib/rubyfox/server/data/lib/Lib/Cookie.py +742 -0
- data/lib/rubyfox/server/data/lib/Lib/HTMLParser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/MimeWriter.py +181 -0
- data/lib/rubyfox/server/data/lib/Lib/Queue.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleHTTPServer.py +198 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleXMLRPCServer.py +274 -0
- data/lib/rubyfox/server/data/lib/Lib/SocketServer.py +576 -0
- data/lib/rubyfox/server/data/lib/Lib/StringIO.py +239 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/UserList.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/UserString.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/aifc.py +961 -0
- data/lib/rubyfox/server/data/lib/Lib/anydbm.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/atexit.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/base64.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/bdb.py +563 -0
- data/lib/rubyfox/server/data/lib/Lib/binhex.py +531 -0
- data/lib/rubyfox/server/data/lib/Lib/bisect.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/calendar.py +246 -0
- data/lib/rubyfox/server/data/lib/Lib/cgi.py +1040 -0
- data/lib/rubyfox/server/data/lib/Lib/chunk.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/cmd.py +336 -0
- data/lib/rubyfox/server/data/lib/Lib/code$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/code.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs.py +636 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/colorsys.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/commands.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/compileall.py +148 -0
- data/lib/rubyfox/server/data/lib/Lib/copy.py +330 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime.py +2007 -0
- data/lib/rubyfox/server/data/lib/Lib/dbexts.py +726 -0
- data/lib/rubyfox/server/data/lib/Lib/difflib.py +1088 -0
- data/lib/rubyfox/server/data/lib/Lib/dircache.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/doctest.py +1173 -0
- data/lib/rubyfox/server/data/lib/Lib/dospath.py +341 -0
- data/lib/rubyfox/server/data/lib/Lib/dumbdbm.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Charset.py +393 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Encoders.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Errors.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Generator.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Header.py +515 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Iterators.py +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEAudio.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEBase.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEImage.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMessage.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMultipart.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMENonMultipart.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEText.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Message.py +837 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Parser.py +292 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Utils.py +340 -0
- data/lib/rubyfox/server/data/lib/Lib/email/__init__.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat21.py +69 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat22.py +70 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_parseaddr.py +480 -0
- data/lib/rubyfox/server/data/lib/Lib/email/base64MIME.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/email/quopriMIME.py +323 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/__init__.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_21.txt +20 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_24.txt +10 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_25.txt +117 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_26.txt +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_27.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_28.txt +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_29.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_30.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_31.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_32.txt +14 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_33.txt +29 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_34.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_35.txt +4 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email.py +2718 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_codecs.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_torture.py +136 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/ascii.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/base64_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/charmap.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp037.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1006.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1026.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1140.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1250.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1251.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1252.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1253.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1254.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1255.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1256.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1257.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1258.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp424.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp437.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp500.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp737.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp775.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp850.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp852.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp855.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp856.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp857.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp860.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp861.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp862.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp863.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp864.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp865.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp866.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp869.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp874.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp875.py +281 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/hex_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_1.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_10.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_13.py +100 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_14.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_15.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_2.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_3.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_4.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_5.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_6.py +137 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_7.py +124 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_8.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_9.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_r.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_u.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/latin_1.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_cyrillic.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_greek.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_iceland.py +166 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_latin2.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_roman.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_turkish.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mbcs.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/quopri_codec.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/raw_unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/rot_13.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/undefined.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_internal.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_be.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_le.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_7.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/uu_codec.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/zlib_codec.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/fileinput.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/fnmatch.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/formatter.py +454 -0
- data/lib/rubyfox/server/data/lib/Lib/fpformat.py +142 -0
- data/lib/rubyfox/server/data/lib/Lib/ftplib.py +804 -0
- data/lib/rubyfox/server/data/lib/Lib/getopt.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/glob.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/gopherlib.py +205 -0
- data/lib/rubyfox/server/data/lib/Lib/gzip.py +390 -0
- data/lib/rubyfox/server/data/lib/Lib/hmac.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/htmlentitydefs.py +257 -0
- data/lib/rubyfox/server/data/lib/Lib/htmllib.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/httplib.py +1238 -0
- data/lib/rubyfox/server/data/lib/Lib/imaplib.py +1208 -0
- data/lib/rubyfox/server/data/lib/Lib/imghdr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect.py +787 -0
- data/lib/rubyfox/server/data/lib/Lib/isql.py +238 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos.py +395 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/javashell.py +194 -0
- data/lib/rubyfox/server/data/lib/Lib/jreload.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/DiscardHelp.java +59 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/JavaLoaderFactory.java +9 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PackageManager.java +58 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFS.java +98 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFSJavaLoader.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/keyword.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/macpath.py +242 -0
- data/lib/rubyfox/server/data/lib/Lib/macurl2path.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/mailbox.py +313 -0
- data/lib/rubyfox/server/data/lib/Lib/mailcap.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/markupbase.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/marshal.py +315 -0
- data/lib/rubyfox/server/data/lib/Lib/mhlib.py +1003 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetools.py +226 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetypes.py +435 -0
- data/lib/rubyfox/server/data/lib/Lib/mimify.py +464 -0
- data/lib/rubyfox/server/data/lib/Lib/multifile.py +160 -0
- data/lib/rubyfox/server/data/lib/Lib/mutex.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/netrc.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/nntplib.py +575 -0
- data/lib/rubyfox/server/data/lib/Lib/ntpath.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/nturl2path.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/__init__.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/colors.py +144 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/swing.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/pdb.py +979 -0
- data/lib/rubyfox/server/data/lib/Lib/pickle.py +990 -0
- data/lib/rubyfox/server/data/lib/Lib/pipes.py +297 -0
- data/lib/rubyfox/server/data/lib/Lib/popen2.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/poplib.py +335 -0
- data/lib/rubyfox/server/data/lib/Lib/posixfile.py +240 -0
- data/lib/rubyfox/server/data/lib/Lib/posixpath.py +414 -0
- data/lib/rubyfox/server/data/lib/Lib/pprint.py +310 -0
- data/lib/rubyfox/server/data/lib/Lib/profile.py +556 -0
- data/lib/rubyfox/server/data/lib/Lib/pstats.py +641 -0
- data/lib/rubyfox/server/data/lib/Lib/pyclbr.py +337 -0
- data/lib/rubyfox/server/data/lib/Lib/quopri.py +237 -0
- data/lib/rubyfox/server/data/lib/Lib/random$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/random.py +779 -0
- data/lib/rubyfox/server/data/lib/Lib/re$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/re.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/reconvert.py +192 -0
- data/lib/rubyfox/server/data/lib/Lib/reindex$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/repr.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/rfc822.py +1010 -0
- data/lib/rubyfox/server/data/lib/Lib/sched.py +106 -0
- data/lib/rubyfox/server/data/lib/Lib/select.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/setsfactory.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/sfs2x-lms.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sgmllib.py +516 -0
- data/lib/rubyfox/server/data/lib/Lib/shelve.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/shlex.py +209 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/site.py +263 -0
- data/lib/rubyfox/server/data/lib/Lib/smtplib.py +729 -0
- data/lib/rubyfox/server/data/lib/Lib/sndhdr.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/socket.py +902 -0
- data/lib/rubyfox/server/data/lib/Lib/sre$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile.py +455 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse.py +738 -0
- data/lib/rubyfox/server/data/lib/Lib/stat$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/stat.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/string$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/string.py +437 -0
- data/lib/rubyfox/server/data/lib/Lib/symbol.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/telnetlib.py +662 -0
- data/lib/rubyfox/server/data/lib/Lib/tempfile.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/test/Graph.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/README +372 -0
- data/lib/rubyfox/server/data/lib/Lib/test/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/autotest.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future3.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future4.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future5.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future6.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future7.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_nocaret.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/blob.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs100.py +139 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/jdkbugs.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr101.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr104.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr112.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr119.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr127.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/test.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr134.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr139.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr142.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr144.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr148.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr149.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr155.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr170.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr171.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr174.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr178.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr183.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr186.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr191.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr192.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr195.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr208.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr233.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr234.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr235.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr239.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr241.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr242.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_21.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/double_const.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/greyrgb.uue +1547 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/AnonInner.java +20 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/Foo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/JOverload.java +132 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/ListTest.java +638 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/SubFoo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/__init__.py +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/jser2_classes.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_MimeWriter +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_array +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_asynchat +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_augassign +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_binascii +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_builtin +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cfgparser +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cgi +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_charmapcodec +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_class +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_coercion +1054 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compare +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compile +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cookie +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_exceptions +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_extcall +112 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_frozen +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_future +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_gettext +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_global +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_grammar +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_httplib +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_janoninner +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_javalist +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jbasic +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jser +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jsubclass +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_linuxaudiodev +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_longexp +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_math +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_md5 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_methods +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mimetools +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mmap +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_new +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_nis +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_opcodes +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_openpty +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_operations +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pkg +45 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_poll +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_popen2 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_posixpath +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pow +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_profile +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pty +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pwd +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pyexpat +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_re +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_regex +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rgbimg +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_richcmp +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rotor +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_scope +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_signal +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_string +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_thread +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_threadedtempfile +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_time +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_tokenize +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_types +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_ucn +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode_file +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicodedata +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unpack +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_urlparse +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winreg +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winsound +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_xreadline +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pickletester.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pydocfodder.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pystone.py +252 -0
- data/lib/rubyfox/server/data/lib/Lib/test/re_tests.py +590 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regex_tests.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regrtest.py +1096 -0
- data/lib/rubyfox/server/data/lib/Lib/test/reperf.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/sortperf.py +141 -0
- data/lib/rubyfox/server/data/lib/Lib/test/string_tests.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml.out +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_MimeWriter.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_SimpleXMLRPCServer.py +88 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_StringIO.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___all__.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___future__.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_al.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_array.py +438 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_asynchat.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_atexit.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_audioop.py +264 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_augassign.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b1.py +632 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b2.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_base64.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bastion.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binascii.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binhex.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binop.py +328 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bisect.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bsddb.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bufio.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bugfixes.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_builtin.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_calendar.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_call.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_capi.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cd.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cfgparser.py +284 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cgi.py +188 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_charmapcodec.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cl.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_class.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cmath.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codecs.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codeop.py +190 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_coercion.py +118 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_commands.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compare.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compile.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_complex.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_contains.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cookie.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_copy_reg.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cpickle.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_crypt.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_curses.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_datetime.py +2958 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dbm.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descr.py +4094 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descrtut.py +501 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_difflib.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dircache.py +74 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dl.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest2.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dospath.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dumbdbm.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email_codecs.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_enumerate.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_errno.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_exceptions.py +206 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_extcall.py +268 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fcntl.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_file.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fileinput.py +159 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fnmatch.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fork1.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_format.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fpformat.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_frozen.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_funcattrs.py +384 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future1.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future2.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future3.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gc.py +346 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gdbm.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_generators.py +1385 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getargs.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getopt.py +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gettext.py +200 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gl.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_glob.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_global.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grammar.py +732 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grp.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gzip.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hash.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hmac.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hotshot.py +117 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmllib.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmlparser.py +294 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_httplib.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imageop.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imgfile.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_import.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_importhooks.py +215 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_inspect.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_iter.py +784 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_janoninner.py +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javalist.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javashell.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jbasic.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_joverload.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jreload.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser2.py +93 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jsubclass.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_compile.py +168 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_generators.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_internals.py +130 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_largefile.py +169 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_linuxaudiodev.py +89 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_locale.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long.py +445 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_future.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_int_args.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_longexp.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mailbox.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_marshal.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_math.py +153 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_md5.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_methods.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mhlib.py +353 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetools.py +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetypes.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_minidom.py +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mmap.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_module.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_multifile.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mutants.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_netrc.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_new.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_nis.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ntpath.py +114 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_opcodes.py +65 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_openpty.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operations.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operator.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_os.py +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_parser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pep247.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pickle.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkg.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkgimport.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_poll.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_popen2.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_posixpath.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pow.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pprint.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profilehooks.py +360 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pty.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pwd.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyclbr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyexpat.py +202 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_queue.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_quopri.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_random.py +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_re.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_regex.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_repr.py +278 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rfc822.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rgbimg.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_richcmp.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rotor.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sax.py +727 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_scope.py +530 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select_new.py +229 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sets.py +793 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sgmllib.py +314 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sha.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_signal.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket.py +1116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket_ssl.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socketserver.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sre.py +434 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_str2unicode.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strftime.py +146 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_string.py +223 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strop.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_struct.py +441 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_structseq.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_subclasses.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sunaudiodev.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sundry.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_support.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_symtable.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tempfile.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_thread.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threaded_import.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threadedtempfile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threading.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_time.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_timing.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tokenize.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_trace.py +219 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_traceback.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_types.py +762 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ucn.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unary.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode.py +815 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode_file.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicodedata.py +125 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unpack.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib.py +109 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib2.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urlparse.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userdict.py +120 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userlist.py +269 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userstring.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_uu.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_wave.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_weakref.py +573 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winreg.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winsound.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmllib.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xreadline.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zipfile.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zlib.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testall.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testcodec.py +48 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimg.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimgr.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testrgb.uue +971 -0
- data/lib/rubyfox/server/data/lib/Lib/test/tokenize_tests.py +175 -0
- data/lib/rubyfox/server/data/lib/Lib/test/whrandom.py +96 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/dbextstest.py +266 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/jndi.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/runner.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/sptest.py +227 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test.xml +363 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test_zxjdbc_dbapi20.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/zxtest.py +1242 -0
- data/lib/rubyfox/server/data/lib/Lib/this.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/threading.py +698 -0
- data/lib/rubyfox/server/data/lib/Lib/token$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/token.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback.py +301 -0
- data/lib/rubyfox/server/data/lib/Lib/tzparse.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/unittest.py +723 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib.py +1465 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib2.py +1144 -0
- data/lib/rubyfox/server/data/lib/Lib/urlparse.py +276 -0
- data/lib/rubyfox/server/data/lib/Lib/user.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/uu.py +195 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings.py +258 -0
- data/lib/rubyfox/server/data/lib/Lib/weakref.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/whichdb.py +87 -0
- data/lib/rubyfox/server/data/lib/Lib/whrandom.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/xdrlib.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/FtCore.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/Uri.py +380 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/__init__.py +41 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/MessageSource.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/NodeFilter.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/__init__.py +232 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/domreg.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minicompat.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minidom.py +1943 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/pulldom.py +350 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/xmlbuilder.py +388 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/__init__.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/_exceptions.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/drv_javasax.py +333 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/handler.py +345 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxlib.py +430 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxutils.py +813 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/xmlreader.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/xmllib.py +926 -0
- data/lib/rubyfox/server/data/lib/Lib/xmlrpclib.py +1019 -0
- data/lib/rubyfox/server/data/lib/Lib/zipfile.py +586 -0
- data/lib/rubyfox/server/data/lib/Lib/zlib.py +156 -0
- data/lib/rubyfox/server/data/lib/boot.jar +0 -0
- data/lib/rubyfox/server/data/lib/cachedir/.keep +0 -0
- data/lib/rubyfox/server/data/lib/commons-beanutils-1.7.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-collections-3.2.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-dbcp-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-io-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-lang-2.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-logging-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-pool-1.5.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-vfs-1.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/ezmorph-1.0.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpclient-4.0.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpcore-4.0.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/imap.jar +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/COPYING.txt +504 -0
- data/lib/rubyfox/server/data/lib/jconsole/bug_test_case.py +49 -0
- data/lib/rubyfox/server/data/lib/jconsole/console$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/console.py +439 -0
- data/lib/rubyfox/server/data/lib/jconsole/history$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/history.py +82 -0
- data/lib/rubyfox/server/data/lib/jconsole/history_test_case.py +133 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect.py +373 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect_test_case.py +19 -0
- data/lib/rubyfox/server/data/lib/jconsole/issue_17_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect.py +316 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect_test_case.py +107 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup.py +178 -0
- data/lib/rubyfox/server/data/lib/jconsole/run_tests.py +8 -0
- data/lib/rubyfox/server/data/lib/jconsole/static_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/testcase.py +38 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip.py +47 -0
- data/lib/rubyfox/server/data/lib/jmx-util-1.2.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/joda-time-1.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/js.jar +0 -0
- data/lib/rubyfox/server/data/lib/json-lib-2.2.3-jdk15.jar +0 -0
- data/lib/rubyfox/server/data/lib/jython.jar +0 -0
- data/lib/rubyfox/server/data/lib/log4j-1.2.15.jar +0 -0
- data/lib/rubyfox/server/data/lib/logs-backup-app.jar +0 -0
- data/lib/rubyfox/server/data/lib/mailapi.jar +0 -0
- data/lib/rubyfox/server/data/lib/pop3.jar +0 -0
- data/lib/rubyfox/server/data/lib/scala-library.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-util.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-api-1.5.10.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-log4j12.jar +0 -0
- data/lib/rubyfox/server/data/lib/smtp.jar +0 -0
- data/lib/rubyfox/server/data/lib/terracotta-api-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/ws-engine.jar +0 -0
- data/lib/rubyfox/server/data/lib/xpp3_min-1.1.4c.jar +0 -0
- data/lib/rubyfox/server/data/lib/xstream-1.3.1.jar +0 -0
- data/lib/rubyfox/server/data/logs/.keep +0 -0
- data/lib/rubyfox/server/data/logs/bluebox/.keep +0 -0
- data/lib/rubyfox/server/data/logs/boot/.keep +0 -0
- data/lib/rubyfox/server/data/logs/http/.keep +0 -0
- data/lib/rubyfox/server/data/logs/smartfox.log +295 -0
- data/lib/rubyfox/server/data/root/.keep +0 -0
- data/lib/rubyfox/server/data/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/ReleaseNotes.txt +29 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/root/index.html +63 -0
- data/lib/rubyfox/server/data/sfs2x-service +435 -0
- data/lib/rubyfox/server/data/sfs2x-service.vmoptions +5 -0
- data/lib/rubyfox/server/data/sfs2x.sh +12 -0
- data/lib/rubyfox/server/data/www/.keep +0 -0
- data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
- data/lib/rubyfox/server/data/www/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/www/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/ReleaseNotes.txt +63 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/hTML5WebSockets.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/Dashboard.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/www/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/www/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/www/root/examples/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/examples/index.html +43 -0
- data/lib/rubyfox/server/data/www/root/index.html +63 -0
- data/lib/rubyfox/server/data/zones/.keep +0 -0
- data/lib/rubyfox/server/environment.rb +31 -0
- data/lib/rubyfox/server/version.rb +5 -0
- data/lib/rubyfox/server.rb +9 -0
- data/rubyfox-server.gemspec +22 -0
- metadata +1076 -0
@@ -0,0 +1,1238 @@
|
|
1
|
+
"""HTTP/1.1 client library
|
2
|
+
|
3
|
+
<intro stuff goes here>
|
4
|
+
<other stuff, too>
|
5
|
+
|
6
|
+
HTTPConnection go through a number of "states", which defines when a client
|
7
|
+
may legally make another request or fetch the response for a particular
|
8
|
+
request. This diagram details these state transitions:
|
9
|
+
|
10
|
+
(null)
|
11
|
+
|
|
12
|
+
| HTTPConnection()
|
13
|
+
v
|
14
|
+
Idle
|
15
|
+
|
|
16
|
+
| putrequest()
|
17
|
+
v
|
18
|
+
Request-started
|
19
|
+
|
|
20
|
+
| ( putheader() )* endheaders()
|
21
|
+
v
|
22
|
+
Request-sent
|
23
|
+
|
|
24
|
+
| response = getresponse()
|
25
|
+
v
|
26
|
+
Unread-response [Response-headers-read]
|
27
|
+
|\____________________
|
28
|
+
| |
|
29
|
+
| response.read() | putrequest()
|
30
|
+
v v
|
31
|
+
Idle Req-started-unread-response
|
32
|
+
______/|
|
33
|
+
/ |
|
34
|
+
response.read() | | ( putheader() )* endheaders()
|
35
|
+
v v
|
36
|
+
Request-started Req-sent-unread-response
|
37
|
+
|
|
38
|
+
| response.read()
|
39
|
+
v
|
40
|
+
Request-sent
|
41
|
+
|
42
|
+
This diagram presents the following rules:
|
43
|
+
-- a second request may not be started until {response-headers-read}
|
44
|
+
-- a response [object] cannot be retrieved until {request-sent}
|
45
|
+
-- there is no differentiation between an unread response body and a
|
46
|
+
partially read response body
|
47
|
+
|
48
|
+
Note: this enforcement is applied by the HTTPConnection class. The
|
49
|
+
HTTPResponse class does not enforce this state machine, which
|
50
|
+
implies sophisticated clients may accelerate the request/response
|
51
|
+
pipeline. Caution should be taken, though: accelerating the states
|
52
|
+
beyond the above pattern may imply knowledge of the server's
|
53
|
+
connection-close behavior for certain requests. For example, it
|
54
|
+
is impossible to tell whether the server will close the connection
|
55
|
+
UNTIL the response headers have been read; this means that further
|
56
|
+
requests cannot be placed into the pipeline until it is known that
|
57
|
+
the server will NOT be closing the connection.
|
58
|
+
|
59
|
+
Logical State __state __response
|
60
|
+
------------- ------- ----------
|
61
|
+
Idle _CS_IDLE None
|
62
|
+
Request-started _CS_REQ_STARTED None
|
63
|
+
Request-sent _CS_REQ_SENT None
|
64
|
+
Unread-response _CS_IDLE <response_class>
|
65
|
+
Req-started-unread-response _CS_REQ_STARTED <response_class>
|
66
|
+
Req-sent-unread-response _CS_REQ_SENT <response_class>
|
67
|
+
"""
|
68
|
+
|
69
|
+
import errno
|
70
|
+
import mimetools
|
71
|
+
import socket
|
72
|
+
from urlparse import urlsplit
|
73
|
+
|
74
|
+
try:
|
75
|
+
from cStringIO import StringIO
|
76
|
+
except ImportError:
|
77
|
+
from StringIO import StringIO
|
78
|
+
|
79
|
+
__all__ = ["HTTP", "HTTPResponse", "HTTPConnection", "HTTPSConnection",
|
80
|
+
"HTTPException", "NotConnected", "UnknownProtocol",
|
81
|
+
"UnknownTransferEncoding", "UnimplementedFileMode",
|
82
|
+
"IncompleteRead", "InvalidURL", "ImproperConnectionState",
|
83
|
+
"CannotSendRequest", "CannotSendHeader", "ResponseNotReady",
|
84
|
+
"BadStatusLine", "error"]
|
85
|
+
|
86
|
+
HTTP_PORT = 80
|
87
|
+
HTTPS_PORT = 443
|
88
|
+
|
89
|
+
_UNKNOWN = 'UNKNOWN'
|
90
|
+
|
91
|
+
# connection states
|
92
|
+
_CS_IDLE = 'Idle'
|
93
|
+
_CS_REQ_STARTED = 'Request-started'
|
94
|
+
_CS_REQ_SENT = 'Request-sent'
|
95
|
+
|
96
|
+
class HTTPMessage(mimetools.Message):
|
97
|
+
|
98
|
+
def addheader(self, key, value):
|
99
|
+
"""Add header for field key handling repeats."""
|
100
|
+
prev = self.dict.get(key)
|
101
|
+
if prev is None:
|
102
|
+
self.dict[key] = value
|
103
|
+
else:
|
104
|
+
combined = ", ".join((prev, value))
|
105
|
+
self.dict[key] = combined
|
106
|
+
|
107
|
+
def addcontinue(self, key, more):
|
108
|
+
"""Add more field data from a continuation line."""
|
109
|
+
prev = self.dict[key]
|
110
|
+
self.dict[key] = prev + "\n " + more
|
111
|
+
|
112
|
+
def readheaders(self):
|
113
|
+
"""Read header lines.
|
114
|
+
|
115
|
+
Read header lines up to the entirely blank line that terminates them.
|
116
|
+
The (normally blank) line that ends the headers is skipped, but not
|
117
|
+
included in the returned list. If a non-header line ends the headers,
|
118
|
+
(which is an error), an attempt is made to backspace over it; it is
|
119
|
+
never included in the returned list.
|
120
|
+
|
121
|
+
The variable self.status is set to the empty string if all went well,
|
122
|
+
otherwise it is an error message. The variable self.headers is a
|
123
|
+
completely uninterpreted list of lines contained in the header (so
|
124
|
+
printing them will reproduce the header exactly as it appears in the
|
125
|
+
file).
|
126
|
+
|
127
|
+
If multiple header fields with the same name occur, they are combined
|
128
|
+
according to the rules in RFC 2616 sec 4.2:
|
129
|
+
|
130
|
+
Appending each subsequent field-value to the first, each separated
|
131
|
+
by a comma. The order in which header fields with the same field-name
|
132
|
+
are received is significant to the interpretation of the combined
|
133
|
+
field value.
|
134
|
+
"""
|
135
|
+
# XXX The implementation overrides the readheaders() method of
|
136
|
+
# rfc822.Message. The base class design isn't amenable to
|
137
|
+
# customized behavior here so the method here is a copy of the
|
138
|
+
# base class code with a few small changes.
|
139
|
+
|
140
|
+
self.dict = {}
|
141
|
+
self.unixfrom = ''
|
142
|
+
self.headers = list = []
|
143
|
+
self.status = ''
|
144
|
+
headerseen = ""
|
145
|
+
firstline = 1
|
146
|
+
startofline = unread = tell = None
|
147
|
+
if hasattr(self.fp, 'unread'):
|
148
|
+
unread = self.fp.unread
|
149
|
+
elif self.seekable:
|
150
|
+
tell = self.fp.tell
|
151
|
+
while 1:
|
152
|
+
if tell:
|
153
|
+
try:
|
154
|
+
startofline = tell()
|
155
|
+
except IOError:
|
156
|
+
startofline = tell = None
|
157
|
+
self.seekable = 0
|
158
|
+
line = self.fp.readline()
|
159
|
+
if not line:
|
160
|
+
self.status = 'EOF in headers'
|
161
|
+
break
|
162
|
+
# Skip unix From name time lines
|
163
|
+
if firstline and line.startswith('From '):
|
164
|
+
self.unixfrom = self.unixfrom + line
|
165
|
+
continue
|
166
|
+
firstline = 0
|
167
|
+
if headerseen and line[0] in ' \t':
|
168
|
+
# XXX Not sure if continuation lines are handled properly
|
169
|
+
# for http and/or for repeating headers
|
170
|
+
# It's a continuation line.
|
171
|
+
list.append(line)
|
172
|
+
x = self.dict[headerseen] + "\n " + line.strip()
|
173
|
+
self.addcontinue(headerseen, line.strip())
|
174
|
+
continue
|
175
|
+
elif self.iscomment(line):
|
176
|
+
# It's a comment. Ignore it.
|
177
|
+
continue
|
178
|
+
elif self.islast(line):
|
179
|
+
# Note! No pushback here! The delimiter line gets eaten.
|
180
|
+
break
|
181
|
+
headerseen = self.isheader(line)
|
182
|
+
if headerseen:
|
183
|
+
# It's a legal header line, save it.
|
184
|
+
list.append(line)
|
185
|
+
self.addheader(headerseen, line[len(headerseen)+1:].strip())
|
186
|
+
continue
|
187
|
+
else:
|
188
|
+
# It's not a header line; throw it back and stop here.
|
189
|
+
if not self.dict:
|
190
|
+
self.status = 'No headers'
|
191
|
+
else:
|
192
|
+
self.status = 'Non-header line where header expected'
|
193
|
+
# Try to undo the read.
|
194
|
+
if unread:
|
195
|
+
unread(line)
|
196
|
+
elif tell:
|
197
|
+
self.fp.seek(startofline)
|
198
|
+
else:
|
199
|
+
self.status = self.status + '; bad seek'
|
200
|
+
break
|
201
|
+
|
202
|
+
class HTTPResponse:
|
203
|
+
|
204
|
+
# strict: If true, raise BadStatusLine if the status line can't be
|
205
|
+
# parsed as a valid HTTP/1.0 or 1.1 status line. By default it is
|
206
|
+
# false because it prevents clients from talking to HTTP/0.9
|
207
|
+
# servers. Note that a response with a sufficiently corrupted
|
208
|
+
# status line will look like an HTTP/0.9 response.
|
209
|
+
|
210
|
+
# See RFC 2616 sec 19.6 and RFC 1945 sec 6 for details.
|
211
|
+
|
212
|
+
def __init__(self, sock, debuglevel=0, strict=0):
|
213
|
+
self.fp = sock.makefile('rb', 0)
|
214
|
+
self.debuglevel = debuglevel
|
215
|
+
self.strict = strict
|
216
|
+
|
217
|
+
self.msg = None
|
218
|
+
|
219
|
+
# from the Status-Line of the response
|
220
|
+
self.version = _UNKNOWN # HTTP-Version
|
221
|
+
self.status = _UNKNOWN # Status-Code
|
222
|
+
self.reason = _UNKNOWN # Reason-Phrase
|
223
|
+
|
224
|
+
self.chunked = _UNKNOWN # is "chunked" being used?
|
225
|
+
self.chunk_left = _UNKNOWN # bytes left to read in current chunk
|
226
|
+
self.length = _UNKNOWN # number of bytes left in response
|
227
|
+
self.will_close = _UNKNOWN # conn will close at end of response
|
228
|
+
|
229
|
+
def _read_status(self):
|
230
|
+
# Initialize with Simple-Response defaults
|
231
|
+
line = self.fp.readline()
|
232
|
+
if self.debuglevel > 0:
|
233
|
+
print "reply:", repr(line)
|
234
|
+
if not line:
|
235
|
+
# Presumably, the server closed the connection before
|
236
|
+
# sending a valid response.
|
237
|
+
raise BadStatusLine(line)
|
238
|
+
try:
|
239
|
+
[version, status, reason] = line.split(None, 2)
|
240
|
+
except ValueError:
|
241
|
+
try:
|
242
|
+
[version, status] = line.split(None, 1)
|
243
|
+
reason = ""
|
244
|
+
except ValueError:
|
245
|
+
# empty version will cause next test to fail and status
|
246
|
+
# will be treated as 0.9 response.
|
247
|
+
version = ""
|
248
|
+
if not version.startswith('HTTP/'):
|
249
|
+
if self.strict:
|
250
|
+
self.close()
|
251
|
+
raise BadStatusLine(line)
|
252
|
+
else:
|
253
|
+
# assume it's a Simple-Response from an 0.9 server
|
254
|
+
self.fp = LineAndFileWrapper(line, self.fp)
|
255
|
+
return "HTTP/0.9", 200, ""
|
256
|
+
|
257
|
+
# The status code is a three-digit number
|
258
|
+
try:
|
259
|
+
status = int(status)
|
260
|
+
if status < 100 or status > 999:
|
261
|
+
raise BadStatusLine(line)
|
262
|
+
except ValueError:
|
263
|
+
raise BadStatusLine(line)
|
264
|
+
return version, status, reason
|
265
|
+
|
266
|
+
def begin(self):
|
267
|
+
if self.msg is not None:
|
268
|
+
# we've already started reading the response
|
269
|
+
return
|
270
|
+
|
271
|
+
# read until we get a non-100 response
|
272
|
+
while 1:
|
273
|
+
version, status, reason = self._read_status()
|
274
|
+
if status != 100:
|
275
|
+
break
|
276
|
+
# skip the header from the 100 response
|
277
|
+
while 1:
|
278
|
+
skip = self.fp.readline().strip()
|
279
|
+
if not skip:
|
280
|
+
break
|
281
|
+
if self.debuglevel > 0:
|
282
|
+
print "header:", skip
|
283
|
+
|
284
|
+
self.status = status
|
285
|
+
self.reason = reason.strip()
|
286
|
+
if version == 'HTTP/1.0':
|
287
|
+
self.version = 10
|
288
|
+
elif version.startswith('HTTP/1.'):
|
289
|
+
self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1
|
290
|
+
elif version == 'HTTP/0.9':
|
291
|
+
self.version = 9
|
292
|
+
else:
|
293
|
+
raise UnknownProtocol(version)
|
294
|
+
|
295
|
+
if self.version == 9:
|
296
|
+
self.chunked = 0
|
297
|
+
self.will_close = 1
|
298
|
+
self.msg = HTTPMessage(StringIO())
|
299
|
+
return
|
300
|
+
|
301
|
+
self.msg = HTTPMessage(self.fp, 0)
|
302
|
+
if self.debuglevel > 0:
|
303
|
+
for hdr in self.msg.headers:
|
304
|
+
print "header:", hdr,
|
305
|
+
|
306
|
+
# don't let the msg keep an fp
|
307
|
+
self.msg.fp = None
|
308
|
+
|
309
|
+
# are we using the chunked-style of transfer encoding?
|
310
|
+
tr_enc = self.msg.getheader('transfer-encoding')
|
311
|
+
if tr_enc and tr_enc.lower() == "chunked":
|
312
|
+
self.chunked = 1
|
313
|
+
self.chunk_left = None
|
314
|
+
else:
|
315
|
+
self.chunked = 0
|
316
|
+
|
317
|
+
# will the connection close at the end of the response?
|
318
|
+
conn = self.msg.getheader('connection')
|
319
|
+
if conn:
|
320
|
+
conn = conn.lower()
|
321
|
+
# a "Connection: close" will always close the connection. if we
|
322
|
+
# don't see that and this is not HTTP/1.1, then the connection will
|
323
|
+
# close unless we see a Keep-Alive header.
|
324
|
+
self.will_close = conn.find('close') != -1 or \
|
325
|
+
( self.version != 11 and \
|
326
|
+
not self.msg.getheader('keep-alive') )
|
327
|
+
else:
|
328
|
+
# for HTTP/1.1, the connection will always remain open
|
329
|
+
# otherwise, it will remain open IFF we see a Keep-Alive header
|
330
|
+
self.will_close = self.version != 11 and \
|
331
|
+
not self.msg.getheader('keep-alive')
|
332
|
+
|
333
|
+
# do we have a Content-Length?
|
334
|
+
# NOTE: RFC 2616, S4.4, #3 says we ignore this if tr_enc is "chunked"
|
335
|
+
length = self.msg.getheader('content-length')
|
336
|
+
if length and not self.chunked:
|
337
|
+
try:
|
338
|
+
self.length = int(length)
|
339
|
+
except ValueError:
|
340
|
+
self.length = None
|
341
|
+
else:
|
342
|
+
self.length = None
|
343
|
+
|
344
|
+
# does the body have a fixed length? (of zero)
|
345
|
+
if (status == 204 or # No Content
|
346
|
+
status == 304 or # Not Modified
|
347
|
+
100 <= status < 200): # 1xx codes
|
348
|
+
self.length = 0
|
349
|
+
|
350
|
+
# if the connection remains open, and we aren't using chunked, and
|
351
|
+
# a content-length was not provided, then assume that the connection
|
352
|
+
# WILL close.
|
353
|
+
if not self.will_close and \
|
354
|
+
not self.chunked and \
|
355
|
+
self.length is None:
|
356
|
+
self.will_close = 1
|
357
|
+
|
358
|
+
def close(self):
|
359
|
+
if self.fp:
|
360
|
+
self.fp.close()
|
361
|
+
self.fp = None
|
362
|
+
|
363
|
+
def isclosed(self):
|
364
|
+
# NOTE: it is possible that we will not ever call self.close(). This
|
365
|
+
# case occurs when will_close is TRUE, length is None, and we
|
366
|
+
# read up to the last byte, but NOT past it.
|
367
|
+
#
|
368
|
+
# IMPLIES: if will_close is FALSE, then self.close() will ALWAYS be
|
369
|
+
# called, meaning self.isclosed() is meaningful.
|
370
|
+
return self.fp is None
|
371
|
+
|
372
|
+
def read(self, amt=None):
|
373
|
+
if self.fp is None:
|
374
|
+
return ''
|
375
|
+
|
376
|
+
if self.chunked:
|
377
|
+
return self._read_chunked(amt)
|
378
|
+
|
379
|
+
if amt is None:
|
380
|
+
# unbounded read
|
381
|
+
if self.will_close:
|
382
|
+
s = self.fp.read()
|
383
|
+
else:
|
384
|
+
s = self._safe_read(self.length)
|
385
|
+
self.close() # we read everything
|
386
|
+
return s
|
387
|
+
|
388
|
+
if self.length is not None:
|
389
|
+
if amt > self.length:
|
390
|
+
# clip the read to the "end of response"
|
391
|
+
amt = self.length
|
392
|
+
self.length -= amt
|
393
|
+
|
394
|
+
# we do not use _safe_read() here because this may be a .will_close
|
395
|
+
# connection, and the user is reading more bytes than will be provided
|
396
|
+
# (for example, reading in 1k chunks)
|
397
|
+
s = self.fp.read(amt)
|
398
|
+
|
399
|
+
return s
|
400
|
+
|
401
|
+
def _read_chunked(self, amt):
|
402
|
+
assert self.chunked != _UNKNOWN
|
403
|
+
chunk_left = self.chunk_left
|
404
|
+
value = ''
|
405
|
+
|
406
|
+
# XXX This accumulates chunks by repeated string concatenation,
|
407
|
+
# which is not efficient as the number or size of chunks gets big.
|
408
|
+
while 1:
|
409
|
+
if chunk_left is None:
|
410
|
+
line = self.fp.readline()
|
411
|
+
i = line.find(';')
|
412
|
+
if i >= 0:
|
413
|
+
line = line[:i] # strip chunk-extensions
|
414
|
+
chunk_left = int(line, 16)
|
415
|
+
if chunk_left == 0:
|
416
|
+
break
|
417
|
+
if amt is None:
|
418
|
+
value += self._safe_read(chunk_left)
|
419
|
+
elif amt < chunk_left:
|
420
|
+
value += self._safe_read(amt)
|
421
|
+
self.chunk_left = chunk_left - amt
|
422
|
+
return value
|
423
|
+
elif amt == chunk_left:
|
424
|
+
value += self._safe_read(amt)
|
425
|
+
self._safe_read(2) # toss the CRLF at the end of the chunk
|
426
|
+
self.chunk_left = None
|
427
|
+
return value
|
428
|
+
else:
|
429
|
+
value += self._safe_read(chunk_left)
|
430
|
+
amt -= chunk_left
|
431
|
+
|
432
|
+
# we read the whole chunk, get another
|
433
|
+
self._safe_read(2) # toss the CRLF at the end of the chunk
|
434
|
+
chunk_left = None
|
435
|
+
|
436
|
+
# read and discard trailer up to the CRLF terminator
|
437
|
+
### note: we shouldn't have any trailers!
|
438
|
+
while 1:
|
439
|
+
line = self.fp.readline()
|
440
|
+
if line == '\r\n':
|
441
|
+
break
|
442
|
+
|
443
|
+
# we read everything; close the "file"
|
444
|
+
# XXX Shouldn't the client close the file?
|
445
|
+
self.close()
|
446
|
+
|
447
|
+
return value
|
448
|
+
|
449
|
+
def _safe_read(self, amt):
|
450
|
+
"""Read the number of bytes requested, compensating for partial reads.
|
451
|
+
|
452
|
+
Normally, we have a blocking socket, but a read() can be interrupted
|
453
|
+
by a signal (resulting in a partial read).
|
454
|
+
|
455
|
+
Note that we cannot distinguish between EOF and an interrupt when zero
|
456
|
+
bytes have been read. IncompleteRead() will be raised in this
|
457
|
+
situation.
|
458
|
+
|
459
|
+
This function should be used when <amt> bytes "should" be present for
|
460
|
+
reading. If the bytes are truly not available (due to EOF), then the
|
461
|
+
IncompleteRead exception can be used to detect the problem.
|
462
|
+
"""
|
463
|
+
s = ''
|
464
|
+
while amt > 0:
|
465
|
+
chunk = self.fp.read(amt)
|
466
|
+
if not chunk:
|
467
|
+
raise IncompleteRead(s)
|
468
|
+
s = s + chunk
|
469
|
+
amt = amt - len(chunk)
|
470
|
+
return s
|
471
|
+
|
472
|
+
def getheader(self, name, default=None):
|
473
|
+
if self.msg is None:
|
474
|
+
raise ResponseNotReady()
|
475
|
+
return self.msg.getheader(name, default)
|
476
|
+
|
477
|
+
|
478
|
+
class HTTPConnection:
|
479
|
+
|
480
|
+
_http_vsn = 11
|
481
|
+
_http_vsn_str = 'HTTP/1.1'
|
482
|
+
|
483
|
+
response_class = HTTPResponse
|
484
|
+
default_port = HTTP_PORT
|
485
|
+
auto_open = 1
|
486
|
+
debuglevel = 0
|
487
|
+
strict = 0
|
488
|
+
|
489
|
+
def __init__(self, host, port=None, strict=None):
|
490
|
+
self.sock = None
|
491
|
+
self._buffer = []
|
492
|
+
self.__response = None
|
493
|
+
self.__state = _CS_IDLE
|
494
|
+
|
495
|
+
self._set_hostport(host, port)
|
496
|
+
if strict is not None:
|
497
|
+
self.strict = strict
|
498
|
+
|
499
|
+
def _set_hostport(self, host, port):
|
500
|
+
if port is None:
|
501
|
+
i = host.find(':')
|
502
|
+
if i >= 0:
|
503
|
+
try:
|
504
|
+
port = int(host[i+1:])
|
505
|
+
except ValueError:
|
506
|
+
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
|
507
|
+
host = host[:i]
|
508
|
+
else:
|
509
|
+
port = self.default_port
|
510
|
+
self.host = host
|
511
|
+
self.port = port
|
512
|
+
|
513
|
+
def set_debuglevel(self, level):
|
514
|
+
self.debuglevel = level
|
515
|
+
|
516
|
+
def connect(self):
|
517
|
+
"""Connect to the host and port specified in __init__."""
|
518
|
+
msg = "getaddrinfo returns an empty list"
|
519
|
+
for res in socket.getaddrinfo(self.host, self.port, 0,
|
520
|
+
socket.SOCK_STREAM):
|
521
|
+
af, socktype, proto, canonname, sa = res
|
522
|
+
try:
|
523
|
+
self.sock = socket.socket(af, socktype, proto)
|
524
|
+
if self.debuglevel > 0:
|
525
|
+
print "connect: (%s, %s)" % (self.host, self.port)
|
526
|
+
self.sock.connect(sa)
|
527
|
+
except socket.error, msg:
|
528
|
+
if self.debuglevel > 0:
|
529
|
+
print 'connect fail:', (self.host, self.port)
|
530
|
+
if self.sock:
|
531
|
+
self.sock.close()
|
532
|
+
self.sock = None
|
533
|
+
continue
|
534
|
+
break
|
535
|
+
if not self.sock:
|
536
|
+
raise socket.error, msg
|
537
|
+
|
538
|
+
def close(self):
|
539
|
+
"""Close the connection to the HTTP server."""
|
540
|
+
if self.sock:
|
541
|
+
self.sock.close() # close it manually... there may be other refs
|
542
|
+
self.sock = None
|
543
|
+
if self.__response:
|
544
|
+
self.__response.close()
|
545
|
+
self.__response = None
|
546
|
+
self.__state = _CS_IDLE
|
547
|
+
|
548
|
+
def send(self, str):
|
549
|
+
"""Send `str' to the server."""
|
550
|
+
if self.sock is None:
|
551
|
+
if self.auto_open:
|
552
|
+
self.connect()
|
553
|
+
else:
|
554
|
+
raise NotConnected()
|
555
|
+
|
556
|
+
# send the data to the server. if we get a broken pipe, then close
|
557
|
+
# the socket. we want to reconnect when somebody tries to send again.
|
558
|
+
#
|
559
|
+
# NOTE: we DO propagate the error, though, because we cannot simply
|
560
|
+
# ignore the error... the caller will know if they can retry.
|
561
|
+
if self.debuglevel > 0:
|
562
|
+
print "send:", repr(str)
|
563
|
+
try:
|
564
|
+
self.sock.sendall(str)
|
565
|
+
except socket.error, v:
|
566
|
+
if v[0] == 32: # Broken pipe
|
567
|
+
self.close()
|
568
|
+
raise
|
569
|
+
|
570
|
+
def _output(self, s):
|
571
|
+
"""Add a line of output to the current request buffer.
|
572
|
+
|
573
|
+
Assumes that the line does *not* end with \\r\\n.
|
574
|
+
"""
|
575
|
+
self._buffer.append(s)
|
576
|
+
|
577
|
+
def _send_output(self):
|
578
|
+
"""Send the currently buffered request and clear the buffer.
|
579
|
+
|
580
|
+
Appends an extra \\r\\n to the buffer.
|
581
|
+
"""
|
582
|
+
self._buffer.extend(("", ""))
|
583
|
+
msg = "\r\n".join(self._buffer)
|
584
|
+
del self._buffer[:]
|
585
|
+
self.send(msg)
|
586
|
+
|
587
|
+
def putrequest(self, method, url, skip_host=0):
|
588
|
+
"""Send a request to the server.
|
589
|
+
|
590
|
+
`method' specifies an HTTP request method, e.g. 'GET'.
|
591
|
+
`url' specifies the object being requested, e.g. '/index.html'.
|
592
|
+
"""
|
593
|
+
|
594
|
+
# check if a prior response has been completed
|
595
|
+
# XXX What if it hasn't?
|
596
|
+
if self.__response and self.__response.isclosed():
|
597
|
+
self.__response = None
|
598
|
+
|
599
|
+
#
|
600
|
+
# in certain cases, we cannot issue another request on this connection.
|
601
|
+
# this occurs when:
|
602
|
+
# 1) we are in the process of sending a request. (_CS_REQ_STARTED)
|
603
|
+
# 2) a response to a previous request has signalled that it is going
|
604
|
+
# to close the connection upon completion.
|
605
|
+
# 3) the headers for the previous response have not been read, thus
|
606
|
+
# we cannot determine whether point (2) is true. (_CS_REQ_SENT)
|
607
|
+
#
|
608
|
+
# if there is no prior response, then we can request at will.
|
609
|
+
#
|
610
|
+
# if point (2) is true, then we will have passed the socket to the
|
611
|
+
# response (effectively meaning, "there is no prior response"), and
|
612
|
+
# will open a new one when a new request is made.
|
613
|
+
#
|
614
|
+
# Note: if a prior response exists, then we *can* start a new request.
|
615
|
+
# We are not allowed to begin fetching the response to this new
|
616
|
+
# request, however, until that prior response is complete.
|
617
|
+
#
|
618
|
+
if self.__state == _CS_IDLE:
|
619
|
+
self.__state = _CS_REQ_STARTED
|
620
|
+
else:
|
621
|
+
raise CannotSendRequest()
|
622
|
+
|
623
|
+
if not url:
|
624
|
+
url = '/'
|
625
|
+
str = '%s %s %s' % (method, url, self._http_vsn_str)
|
626
|
+
|
627
|
+
self._output(str)
|
628
|
+
|
629
|
+
if self._http_vsn == 11:
|
630
|
+
# Issue some standard headers for better HTTP/1.1 compliance
|
631
|
+
|
632
|
+
if not skip_host:
|
633
|
+
# this header is issued *only* for HTTP/1.1
|
634
|
+
# connections. more specifically, this means it is
|
635
|
+
# only issued when the client uses the new
|
636
|
+
# HTTPConnection() class. backwards-compat clients
|
637
|
+
# will be using HTTP/1.0 and those clients may be
|
638
|
+
# issuing this header themselves. we should NOT issue
|
639
|
+
# it twice; some web servers (such as Apache) barf
|
640
|
+
# when they see two Host: headers
|
641
|
+
|
642
|
+
# If we need a non-standard port,include it in the
|
643
|
+
# header. If the request is going through a proxy,
|
644
|
+
# but the host of the actual URL, not the host of the
|
645
|
+
# proxy.
|
646
|
+
|
647
|
+
netloc = ''
|
648
|
+
if url.startswith('http'):
|
649
|
+
nil, netloc, nil, nil, nil = urlsplit(url)
|
650
|
+
|
651
|
+
if netloc:
|
652
|
+
self.putheader('Host', netloc)
|
653
|
+
elif self.port == HTTP_PORT:
|
654
|
+
self.putheader('Host', self.host)
|
655
|
+
else:
|
656
|
+
self.putheader('Host', "%s:%s" % (self.host, self.port))
|
657
|
+
|
658
|
+
# note: we are assuming that clients will not attempt to set these
|
659
|
+
# headers since *this* library must deal with the
|
660
|
+
# consequences. this also means that when the supporting
|
661
|
+
# libraries are updated to recognize other forms, then this
|
662
|
+
# code should be changed (removed or updated).
|
663
|
+
|
664
|
+
# we only want a Content-Encoding of "identity" since we don't
|
665
|
+
# support encodings such as x-gzip or x-deflate.
|
666
|
+
self.putheader('Accept-Encoding', 'identity')
|
667
|
+
|
668
|
+
# we can accept "chunked" Transfer-Encodings, but no others
|
669
|
+
# NOTE: no TE header implies *only* "chunked"
|
670
|
+
#self.putheader('TE', 'chunked')
|
671
|
+
|
672
|
+
# if TE is supplied in the header, then it must appear in a
|
673
|
+
# Connection header.
|
674
|
+
#self.putheader('Connection', 'TE')
|
675
|
+
|
676
|
+
else:
|
677
|
+
# For HTTP/1.0, the server will assume "not chunked"
|
678
|
+
pass
|
679
|
+
|
680
|
+
def putheader(self, header, value):
|
681
|
+
"""Send a request header line to the server.
|
682
|
+
|
683
|
+
For example: h.putheader('Accept', 'text/html')
|
684
|
+
"""
|
685
|
+
if self.__state != _CS_REQ_STARTED:
|
686
|
+
raise CannotSendHeader()
|
687
|
+
|
688
|
+
str = '%s: %s' % (header, value)
|
689
|
+
self._output(str)
|
690
|
+
|
691
|
+
def endheaders(self):
|
692
|
+
"""Indicate that the last header line has been sent to the server."""
|
693
|
+
|
694
|
+
if self.__state == _CS_REQ_STARTED:
|
695
|
+
self.__state = _CS_REQ_SENT
|
696
|
+
else:
|
697
|
+
raise CannotSendHeader()
|
698
|
+
|
699
|
+
self._send_output()
|
700
|
+
|
701
|
+
def request(self, method, url, body=None, headers={}):
|
702
|
+
"""Send a complete request to the server."""
|
703
|
+
|
704
|
+
try:
|
705
|
+
self._send_request(method, url, body, headers)
|
706
|
+
except socket.error, v:
|
707
|
+
# trap 'Broken pipe' if we're allowed to automatically reconnect
|
708
|
+
if v[0] != 32 or not self.auto_open:
|
709
|
+
raise
|
710
|
+
# try one more time
|
711
|
+
self._send_request(method, url, body, headers)
|
712
|
+
|
713
|
+
def _send_request(self, method, url, body, headers):
|
714
|
+
# If headers already contains a host header, then define the
|
715
|
+
# optional skip_host argument to putrequest(). The check is
|
716
|
+
# harder because field names are case insensitive.
|
717
|
+
if 'Host' in (headers
|
718
|
+
or [k for k in headers.iterkeys() if k.lower() == "host"]):
|
719
|
+
self.putrequest(method, url, skip_host=1)
|
720
|
+
else:
|
721
|
+
self.putrequest(method, url)
|
722
|
+
|
723
|
+
if body:
|
724
|
+
self.putheader('Content-Length', str(len(body)))
|
725
|
+
for hdr, value in headers.items():
|
726
|
+
self.putheader(hdr, value)
|
727
|
+
self.endheaders()
|
728
|
+
|
729
|
+
if body:
|
730
|
+
self.send(body)
|
731
|
+
|
732
|
+
def getresponse(self):
|
733
|
+
"Get the response from the server."
|
734
|
+
|
735
|
+
# check if a prior response has been completed
|
736
|
+
if self.__response and self.__response.isclosed():
|
737
|
+
self.__response = None
|
738
|
+
|
739
|
+
#
|
740
|
+
# if a prior response exists, then it must be completed (otherwise, we
|
741
|
+
# cannot read this response's header to determine the connection-close
|
742
|
+
# behavior)
|
743
|
+
#
|
744
|
+
# note: if a prior response existed, but was connection-close, then the
|
745
|
+
# socket and response were made independent of this HTTPConnection
|
746
|
+
# object since a new request requires that we open a whole new
|
747
|
+
# connection
|
748
|
+
#
|
749
|
+
# this means the prior response had one of two states:
|
750
|
+
# 1) will_close: this connection was reset and the prior socket and
|
751
|
+
# response operate independently
|
752
|
+
# 2) persistent: the response was retained and we await its
|
753
|
+
# isclosed() status to become true.
|
754
|
+
#
|
755
|
+
if self.__state != _CS_REQ_SENT or self.__response:
|
756
|
+
raise ResponseNotReady()
|
757
|
+
|
758
|
+
if self.debuglevel > 0:
|
759
|
+
response = self.response_class(self.sock, self.debuglevel,
|
760
|
+
strict=self.strict)
|
761
|
+
else:
|
762
|
+
response = self.response_class(self.sock, strict=self.strict)
|
763
|
+
|
764
|
+
response.begin()
|
765
|
+
assert response.will_close != _UNKNOWN
|
766
|
+
self.__state = _CS_IDLE
|
767
|
+
|
768
|
+
if response.will_close:
|
769
|
+
# this effectively passes the connection to the response
|
770
|
+
self.close()
|
771
|
+
else:
|
772
|
+
# remember this, so we can tell when it is complete
|
773
|
+
self.__response = response
|
774
|
+
|
775
|
+
return response
|
776
|
+
|
777
|
+
# The next several classes are used to define FakeSocket,a socket-like
|
778
|
+
# interface to an SSL connection.
|
779
|
+
|
780
|
+
# The primary complexity comes from faking a makefile() method. The
|
781
|
+
# standard socket makefile() implementation calls dup() on the socket
|
782
|
+
# file descriptor. As a consequence, clients can call close() on the
|
783
|
+
# parent socket and its makefile children in any order. The underlying
|
784
|
+
# socket isn't closed until they are all closed.
|
785
|
+
|
786
|
+
# The implementation uses reference counting to keep the socket open
|
787
|
+
# until the last client calls close(). SharedSocket keeps track of
|
788
|
+
# the reference counting and SharedSocketClient provides an constructor
|
789
|
+
# and close() method that call incref() and decref() correctly.
|
790
|
+
|
791
|
+
class SharedSocket:
|
792
|
+
|
793
|
+
def __init__(self, sock):
|
794
|
+
self.sock = sock
|
795
|
+
self._refcnt = 0
|
796
|
+
|
797
|
+
def incref(self):
|
798
|
+
self._refcnt += 1
|
799
|
+
|
800
|
+
def decref(self):
|
801
|
+
self._refcnt -= 1
|
802
|
+
assert self._refcnt >= 0
|
803
|
+
if self._refcnt == 0:
|
804
|
+
self.sock.close()
|
805
|
+
|
806
|
+
def __del__(self):
|
807
|
+
self.sock.close()
|
808
|
+
|
809
|
+
class SharedSocketClient:
|
810
|
+
|
811
|
+
def __init__(self, shared):
|
812
|
+
self._closed = 0
|
813
|
+
self._shared = shared
|
814
|
+
self._shared.incref()
|
815
|
+
self._sock = shared.sock
|
816
|
+
|
817
|
+
def close(self):
|
818
|
+
if not self._closed:
|
819
|
+
self._shared.decref()
|
820
|
+
self._closed = 1
|
821
|
+
self._shared = None
|
822
|
+
|
823
|
+
class SSLFile(SharedSocketClient):
|
824
|
+
"""File-like object wrapping an SSL socket."""
|
825
|
+
|
826
|
+
BUFSIZE = 8192
|
827
|
+
|
828
|
+
def __init__(self, sock, ssl, bufsize=None):
|
829
|
+
SharedSocketClient.__init__(self, sock)
|
830
|
+
self._ssl = ssl
|
831
|
+
self._buf = ''
|
832
|
+
self._bufsize = bufsize or self.__class__.BUFSIZE
|
833
|
+
|
834
|
+
def _read(self):
|
835
|
+
buf = ''
|
836
|
+
# put in a loop so that we retry on transient errors
|
837
|
+
while 1:
|
838
|
+
try:
|
839
|
+
buf = self._ssl.read(self._bufsize)
|
840
|
+
except socket.sslerror, err:
|
841
|
+
if (err[0] == socket.SSL_ERROR_WANT_READ
|
842
|
+
or err[0] == socket.SSL_ERROR_WANT_WRITE):
|
843
|
+
continue
|
844
|
+
if (err[0] == socket.SSL_ERROR_ZERO_RETURN
|
845
|
+
or err[0] == socket.SSL_ERROR_EOF):
|
846
|
+
break
|
847
|
+
raise
|
848
|
+
except socket.error, err:
|
849
|
+
if err[0] == errno.EINTR:
|
850
|
+
continue
|
851
|
+
if err[0] == errno.EBADF:
|
852
|
+
# XXX socket was closed?
|
853
|
+
break
|
854
|
+
raise
|
855
|
+
else:
|
856
|
+
break
|
857
|
+
return buf
|
858
|
+
|
859
|
+
def read(self, size=None):
|
860
|
+
L = [self._buf]
|
861
|
+
avail = len(self._buf)
|
862
|
+
while size is None or avail < size:
|
863
|
+
s = self._read()
|
864
|
+
if s == '':
|
865
|
+
break
|
866
|
+
L.append(s)
|
867
|
+
avail += len(s)
|
868
|
+
all = "".join(L)
|
869
|
+
if size is None:
|
870
|
+
self._buf = ''
|
871
|
+
return all
|
872
|
+
else:
|
873
|
+
self._buf = all[size:]
|
874
|
+
return all[:size]
|
875
|
+
|
876
|
+
def readline(self):
|
877
|
+
L = [self._buf]
|
878
|
+
self._buf = ''
|
879
|
+
while 1:
|
880
|
+
i = L[-1].find("\n")
|
881
|
+
if i >= 0:
|
882
|
+
break
|
883
|
+
s = self._read()
|
884
|
+
if s == '':
|
885
|
+
break
|
886
|
+
L.append(s)
|
887
|
+
if i == -1:
|
888
|
+
# loop exited because there is no more data
|
889
|
+
return "".join(L)
|
890
|
+
else:
|
891
|
+
all = "".join(L)
|
892
|
+
# XXX could do enough bookkeeping not to do a 2nd search
|
893
|
+
i = all.find("\n") + 1
|
894
|
+
line = all[:i]
|
895
|
+
self._buf = all[i:]
|
896
|
+
return line
|
897
|
+
|
898
|
+
class FakeSocket(SharedSocketClient):
|
899
|
+
|
900
|
+
class _closedsocket:
|
901
|
+
def __getattr__(self, name):
|
902
|
+
raise error(9, 'Bad file descriptor')
|
903
|
+
|
904
|
+
def __init__(self, sock, ssl):
|
905
|
+
sock = SharedSocket(sock)
|
906
|
+
SharedSocketClient.__init__(self, sock)
|
907
|
+
self._ssl = ssl
|
908
|
+
|
909
|
+
def close(self):
|
910
|
+
SharedSocketClient.close(self)
|
911
|
+
self._sock = self.__class__._closedsocket()
|
912
|
+
|
913
|
+
def makefile(self, mode, bufsize=None):
|
914
|
+
if mode != 'r' and mode != 'rb':
|
915
|
+
raise UnimplementedFileMode()
|
916
|
+
return SSLFile(self._shared, self._ssl, bufsize)
|
917
|
+
|
918
|
+
def send(self, stuff, flags = 0):
|
919
|
+
return self._ssl.write(stuff)
|
920
|
+
|
921
|
+
sendall = send
|
922
|
+
|
923
|
+
def recv(self, len = 1024, flags = 0):
|
924
|
+
return self._ssl.read(len)
|
925
|
+
|
926
|
+
def __getattr__(self, attr):
|
927
|
+
return getattr(self._sock, attr)
|
928
|
+
|
929
|
+
|
930
|
+
class HTTPSConnection(HTTPConnection):
|
931
|
+
"This class allows communication via SSL."
|
932
|
+
|
933
|
+
default_port = HTTPS_PORT
|
934
|
+
|
935
|
+
def __init__(self, host, port=None, key_file=None, cert_file=None,
|
936
|
+
strict=None):
|
937
|
+
HTTPConnection.__init__(self, host, port, strict)
|
938
|
+
self.key_file = key_file
|
939
|
+
self.cert_file = cert_file
|
940
|
+
|
941
|
+
def connect(self):
|
942
|
+
"Connect to a host on a given (SSL) port."
|
943
|
+
|
944
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
945
|
+
sock.connect((self.host, self.port))
|
946
|
+
realsock = sock
|
947
|
+
if hasattr(sock, "_sock"):
|
948
|
+
realsock = sock._sock
|
949
|
+
ssl = socket.ssl(realsock, self.key_file, self.cert_file)
|
950
|
+
self.sock = FakeSocket(sock, ssl)
|
951
|
+
|
952
|
+
|
953
|
+
class HTTP:
|
954
|
+
"Compatibility class with httplib.py from 1.5."
|
955
|
+
|
956
|
+
_http_vsn = 10
|
957
|
+
_http_vsn_str = 'HTTP/1.0'
|
958
|
+
|
959
|
+
debuglevel = 0
|
960
|
+
|
961
|
+
_connection_class = HTTPConnection
|
962
|
+
|
963
|
+
def __init__(self, host='', port=None, strict=None):
|
964
|
+
"Provide a default host, since the superclass requires one."
|
965
|
+
|
966
|
+
# some joker passed 0 explicitly, meaning default port
|
967
|
+
if port == 0:
|
968
|
+
port = None
|
969
|
+
|
970
|
+
# Note that we may pass an empty string as the host; this will throw
|
971
|
+
# an error when we attempt to connect. Presumably, the client code
|
972
|
+
# will call connect before then, with a proper host.
|
973
|
+
self._setup(self._connection_class(host, port, strict))
|
974
|
+
|
975
|
+
def _setup(self, conn):
|
976
|
+
self._conn = conn
|
977
|
+
|
978
|
+
# set up delegation to flesh out interface
|
979
|
+
self.send = conn.send
|
980
|
+
self.putrequest = conn.putrequest
|
981
|
+
self.endheaders = conn.endheaders
|
982
|
+
self.set_debuglevel = conn.set_debuglevel
|
983
|
+
|
984
|
+
conn._http_vsn = self._http_vsn
|
985
|
+
conn._http_vsn_str = self._http_vsn_str
|
986
|
+
|
987
|
+
self.file = None
|
988
|
+
|
989
|
+
def connect(self, host=None, port=None):
|
990
|
+
"Accept arguments to set the host/port, since the superclass doesn't."
|
991
|
+
|
992
|
+
if host is not None:
|
993
|
+
self._conn._set_hostport(host, port)
|
994
|
+
self._conn.connect()
|
995
|
+
|
996
|
+
def getfile(self):
|
997
|
+
"Provide a getfile, since the superclass' does not use this concept."
|
998
|
+
return self.file
|
999
|
+
|
1000
|
+
def putheader(self, header, *values):
|
1001
|
+
"The superclass allows only one value argument."
|
1002
|
+
self._conn.putheader(header, '\r\n\t'.join(values))
|
1003
|
+
|
1004
|
+
def getreply(self):
|
1005
|
+
"""Compat definition since superclass does not define it.
|
1006
|
+
|
1007
|
+
Returns a tuple consisting of:
|
1008
|
+
- server status code (e.g. '200' if all goes well)
|
1009
|
+
- server "reason" corresponding to status code
|
1010
|
+
- any RFC822 headers in the response from the server
|
1011
|
+
"""
|
1012
|
+
try:
|
1013
|
+
response = self._conn.getresponse()
|
1014
|
+
except BadStatusLine, e:
|
1015
|
+
### hmm. if getresponse() ever closes the socket on a bad request,
|
1016
|
+
### then we are going to have problems with self.sock
|
1017
|
+
|
1018
|
+
### should we keep this behavior? do people use it?
|
1019
|
+
# keep the socket open (as a file), and return it
|
1020
|
+
self.file = self._conn.sock.makefile('rb', 0)
|
1021
|
+
|
1022
|
+
# close our socket -- we want to restart after any protocol error
|
1023
|
+
self.close()
|
1024
|
+
|
1025
|
+
self.headers = None
|
1026
|
+
return -1, e.line, None
|
1027
|
+
|
1028
|
+
self.headers = response.msg
|
1029
|
+
self.file = response.fp
|
1030
|
+
return response.status, response.reason, response.msg
|
1031
|
+
|
1032
|
+
def close(self):
|
1033
|
+
self._conn.close()
|
1034
|
+
|
1035
|
+
# note that self.file == response.fp, which gets closed by the
|
1036
|
+
# superclass. just clear the object ref here.
|
1037
|
+
### hmm. messy. if status==-1, then self.file is owned by us.
|
1038
|
+
### well... we aren't explicitly closing, but losing this ref will
|
1039
|
+
### do it
|
1040
|
+
self.file = None
|
1041
|
+
|
1042
|
+
if hasattr(socket, 'ssl'):
|
1043
|
+
class HTTPS(HTTP):
|
1044
|
+
"""Compatibility with 1.5 httplib interface
|
1045
|
+
|
1046
|
+
Python 1.5.2 did not have an HTTPS class, but it defined an
|
1047
|
+
interface for sending http requests that is also useful for
|
1048
|
+
https.
|
1049
|
+
"""
|
1050
|
+
|
1051
|
+
_connection_class = HTTPSConnection
|
1052
|
+
|
1053
|
+
def __init__(self, host='', port=None, key_file=None, cert_file=None,
|
1054
|
+
strict=None):
|
1055
|
+
# provide a default host, pass the X509 cert info
|
1056
|
+
|
1057
|
+
# urf. compensate for bad input.
|
1058
|
+
if port == 0:
|
1059
|
+
port = None
|
1060
|
+
self._setup(self._connection_class(host, port, key_file,
|
1061
|
+
cert_file, strict))
|
1062
|
+
|
1063
|
+
# we never actually use these for anything, but we keep them
|
1064
|
+
# here for compatibility with post-1.5.2 CVS.
|
1065
|
+
self.key_file = key_file
|
1066
|
+
self.cert_file = cert_file
|
1067
|
+
|
1068
|
+
|
1069
|
+
class HTTPException(Exception):
|
1070
|
+
# Subclasses that define an __init__ must call Exception.__init__
|
1071
|
+
# or define self.args. Otherwise, str() will fail.
|
1072
|
+
pass
|
1073
|
+
|
1074
|
+
class NotConnected(HTTPException):
|
1075
|
+
pass
|
1076
|
+
|
1077
|
+
class InvalidURL(HTTPException):
|
1078
|
+
pass
|
1079
|
+
|
1080
|
+
class UnknownProtocol(HTTPException):
|
1081
|
+
def __init__(self, version):
|
1082
|
+
self.args = version,
|
1083
|
+
self.version = version
|
1084
|
+
|
1085
|
+
class UnknownTransferEncoding(HTTPException):
|
1086
|
+
pass
|
1087
|
+
|
1088
|
+
class UnimplementedFileMode(HTTPException):
|
1089
|
+
pass
|
1090
|
+
|
1091
|
+
class IncompleteRead(HTTPException):
|
1092
|
+
def __init__(self, partial):
|
1093
|
+
self.args = partial,
|
1094
|
+
self.partial = partial
|
1095
|
+
|
1096
|
+
class ImproperConnectionState(HTTPException):
|
1097
|
+
pass
|
1098
|
+
|
1099
|
+
class CannotSendRequest(ImproperConnectionState):
|
1100
|
+
pass
|
1101
|
+
|
1102
|
+
class CannotSendHeader(ImproperConnectionState):
|
1103
|
+
pass
|
1104
|
+
|
1105
|
+
class ResponseNotReady(ImproperConnectionState):
|
1106
|
+
pass
|
1107
|
+
|
1108
|
+
class BadStatusLine(HTTPException):
|
1109
|
+
def __init__(self, line):
|
1110
|
+
self.args = line,
|
1111
|
+
self.line = line
|
1112
|
+
|
1113
|
+
# for backwards compatibility
|
1114
|
+
error = HTTPException
|
1115
|
+
|
1116
|
+
class LineAndFileWrapper:
|
1117
|
+
"""A limited file-like object for HTTP/0.9 responses."""
|
1118
|
+
|
1119
|
+
# The status-line parsing code calls readline(), which normally
|
1120
|
+
# get the HTTP status line. For a 0.9 response, however, this is
|
1121
|
+
# actually the first line of the body! Clients need to get a
|
1122
|
+
# readable file object that contains that line.
|
1123
|
+
|
1124
|
+
def __init__(self, line, file):
|
1125
|
+
self._line = line
|
1126
|
+
self._file = file
|
1127
|
+
self._line_consumed = 0
|
1128
|
+
self._line_offset = 0
|
1129
|
+
self._line_left = len(line)
|
1130
|
+
|
1131
|
+
def __getattr__(self, attr):
|
1132
|
+
return getattr(self._file, attr)
|
1133
|
+
|
1134
|
+
def _done(self):
|
1135
|
+
# called when the last byte is read from the line. After the
|
1136
|
+
# call, all read methods are delegated to the underlying file
|
1137
|
+
# obhect.
|
1138
|
+
self._line_consumed = 1
|
1139
|
+
self.read = self._file.read
|
1140
|
+
self.readline = self._file.readline
|
1141
|
+
self.readlines = self._file.readlines
|
1142
|
+
|
1143
|
+
def read(self, amt=None):
|
1144
|
+
assert not self._line_consumed and self._line_left
|
1145
|
+
if amt is None or amt > self._line_left:
|
1146
|
+
s = self._line[self._line_offset:]
|
1147
|
+
self._done()
|
1148
|
+
if amt is None:
|
1149
|
+
return s + self._file.read()
|
1150
|
+
else:
|
1151
|
+
return s + self._file.read(amt - len(s))
|
1152
|
+
else:
|
1153
|
+
assert amt <= self._line_left
|
1154
|
+
i = self._line_offset
|
1155
|
+
j = i + amt
|
1156
|
+
s = self._line[i:j]
|
1157
|
+
self._line_offset = j
|
1158
|
+
self._line_left -= amt
|
1159
|
+
if self._line_left == 0:
|
1160
|
+
self._done()
|
1161
|
+
return s
|
1162
|
+
|
1163
|
+
def readline(self):
|
1164
|
+
s = self._line[self._line_offset:]
|
1165
|
+
self._done()
|
1166
|
+
return s
|
1167
|
+
|
1168
|
+
def readlines(self, size=None):
|
1169
|
+
L = [self._line[self._line_offset:]]
|
1170
|
+
self._done()
|
1171
|
+
if size is None:
|
1172
|
+
return L + self._file.readlines()
|
1173
|
+
else:
|
1174
|
+
return L + self._file.readlines(size)
|
1175
|
+
|
1176
|
+
def test():
|
1177
|
+
"""Test this module.
|
1178
|
+
|
1179
|
+
A hodge podge of tests collected here, because they have too many
|
1180
|
+
external dependencies for the regular test suite.
|
1181
|
+
"""
|
1182
|
+
|
1183
|
+
import sys
|
1184
|
+
import getopt
|
1185
|
+
opts, args = getopt.getopt(sys.argv[1:], 'd')
|
1186
|
+
dl = 0
|
1187
|
+
for o, a in opts:
|
1188
|
+
if o == '-d': dl = dl + 1
|
1189
|
+
host = 'www.python.org'
|
1190
|
+
selector = '/'
|
1191
|
+
if args[0:]: host = args[0]
|
1192
|
+
if args[1:]: selector = args[1]
|
1193
|
+
h = HTTP()
|
1194
|
+
h.set_debuglevel(dl)
|
1195
|
+
h.connect(host)
|
1196
|
+
h.putrequest('GET', selector)
|
1197
|
+
h.endheaders()
|
1198
|
+
status, reason, headers = h.getreply()
|
1199
|
+
print 'status =', status
|
1200
|
+
print 'reason =', reason
|
1201
|
+
print "read", len(h.getfile().read())
|
1202
|
+
print
|
1203
|
+
if headers:
|
1204
|
+
for header in headers.headers: print header.strip()
|
1205
|
+
print
|
1206
|
+
|
1207
|
+
# minimal test that code to extract host from url works
|
1208
|
+
class HTTP11(HTTP):
|
1209
|
+
_http_vsn = 11
|
1210
|
+
_http_vsn_str = 'HTTP/1.1'
|
1211
|
+
|
1212
|
+
h = HTTP11('www.python.org')
|
1213
|
+
h.putrequest('GET', 'http://www.python.org/~jeremy/')
|
1214
|
+
h.endheaders()
|
1215
|
+
h.getreply()
|
1216
|
+
h.close()
|
1217
|
+
|
1218
|
+
if hasattr(socket, 'ssl'):
|
1219
|
+
|
1220
|
+
for host, selector in (('sourceforge.net', '/projects/python'),
|
1221
|
+
):
|
1222
|
+
print "https://%s%s" % (host, selector)
|
1223
|
+
hs = HTTPS()
|
1224
|
+
hs.set_debuglevel(dl)
|
1225
|
+
hs.connect(host)
|
1226
|
+
hs.putrequest('GET', selector)
|
1227
|
+
hs.endheaders()
|
1228
|
+
status, reason, headers = hs.getreply()
|
1229
|
+
print 'status =', status
|
1230
|
+
print 'reason =', reason
|
1231
|
+
print "read", len(hs.getfile().read())
|
1232
|
+
print
|
1233
|
+
if headers:
|
1234
|
+
for header in headers.headers: print header.strip()
|
1235
|
+
print
|
1236
|
+
|
1237
|
+
if __name__ == '__main__':
|
1238
|
+
test()
|