Commit Graph

1085 Commits

Author SHA1 Message Date
Brian Warner
ee6a6c79fa webish.py: allow users to delete (but not create) empty-named files. Closes #94. 2007-08-15 23:14:05 -07:00
Brian Warner
c1da0c11bc webish: implement replace= for POST commands 2007-08-15 15:21:38 -07:00
Brian Warner
1752c9e29e webish: implement replace= for PUT commands 2007-08-15 13:22:23 -07:00
Brian Warner
42dcc3088e IDirectoryNode: add has_child() method 2007-08-15 13:22:01 -07:00
Brian Warner
244471dcc4 check_memory.py: Disable the 100MB test for now: our buildslave can't currently handle it because the testnet/framework processes uses something like 600M of RSS. 2007-08-15 12:55:11 -07:00
Brian Warner
944ad6508b webapi.txt: specify replace= behavior on all PUT and POST commands 2007-08-15 19:31:49 -07:00
Brian Warner
31bfb3950a webapi.txt: clear up underspecified items, replace 'webpassword' paragraph
with a section about our expected plans for #98, add more introductory text
to the sections on manipulate-file vs manipulate-directory.
2007-08-15 19:04:47 -07:00
Zooko O'Whielacronx
4f2244bfdd webapi.txt: shorter and hopefully clearer description of names vs. identifiers
Brian (and anyone who has an interest in the API and documentation): please review.
2007-08-15 12:28:04 -07:00
Brian Warner
a0c16f1a36 client.py: make a note in the logs when the auto-shutdown feature is in use 2007-08-14 02:12:30 -07:00
Brian Warner
179d5462c0 webish: look for when_done= in POST fields as well as queryargs. Closes #101.
We need to look in the fields because that's how we build the mkdir/upload
forms. Without this, uploading or creating directories would leave us on a
page that had just a URI, instead of something actually useful to a human.
2007-08-13 17:45:02 -07:00
Brian Warner
e6195caff1 docs/configuration.txt: explain the files in the node's basedir, which ones are useful to modify, etc 2007-08-13 13:28:40 -07:00
Brian Warner
6c6c62037d fix pyflakes warnings from recent b32decode change 2007-08-12 16:33:51 -07:00
Brian Warner
0332e94656 test_system.py: add coverage for get_permuted_peers() 2007-08-12 16:29:34 -07:00
Brian Warner
1ac83637a6 Client.get_permuted_peers: use self.nodeid now that it's fixed 2007-08-12 16:24:51 -07:00
tahoe
53349c571f shorten ids 2007-08-12 11:53:18 -07:00
Zooko O'Whielacronx
42f8e57416 don't over-encode the nodeid many times with ascii-encoding 2007-08-12 10:29:38 -07:00
tahoe
6683456eaa ymy name... 2007-08-10 14:51:47 -07:00
Zooko O'Whielacronx
3bc708529f foolscap: change using-foolscap.xhtml to say "public key" instead of "private key"
In the first instance, I hope that the tubid is generated from the hash of the public key and not the hash of the private key!
In the latter instances, the phrase "public key" as in "public key certificate" is more common.
2007-08-11 09:45:03 -07:00
Brian Warner
2f5a27316f webish: localfile=/localdir= are now disabled by default, a special switch is required to enable them 2007-08-10 18:21:22 -07:00
Brian Warner
b4a0effe30 webapi.txt: separate out debug/test commands, indicate that localfile=/localdir= requires special activation 2007-08-10 18:20:22 -07:00
Brian Warner
9281a0aedc webish: reduce POST memory footprint by overriding http.Request
The original twisted.web.http.Request class has a requestReceived method
that parses the form body (in the request's .content filehandle) using
the stdlib cgi.parse_multipart() function. parse_multipart() consumes a
lot of memory when handling large file uploads, because it holds the
arguments entirely in RAM. Nevow's subclass of Request uses cgi.FieldStorage
instead, which is much more memory-efficient.

This patch uses a local subclass of Request and a modified copy of the
requestReceived method. It disables the cgi.parse_multipart parsing and
instead relies upon Nevow's use of FieldStorage. Our code must look for
form elements (which come from the body of the POST request) in req.fields,
rather than assuming that they will be copied into req.args (which now
only contains the query arguments that appear in the URL).

As a result, memory usage is no longer inflated by the size of the file
being uploaded in a POST upload request. Note that cgi.FieldStorage uses
temporary files (tempfile.TemporaryFile) to hold the data.

This closes #29.
2007-08-10 17:25:33 -07:00
Brian Warner
b6ff38e4c7 webish.POSTHandler: fix typo that meant we didn't look for 'name' in req.fields 2007-08-10 17:25:28 -07:00
Brian Warner
54b6900526 webapi.txt: minor clarifications and examples 2007-08-10 15:52:27 -07:00
Brian Warner
3d42856eb1 boringfile: ignore the setuptools .egg that ez_setup.py likes to download/build/install during compilation 2007-08-09 19:45:18 -07:00
Brian Warner
17d776fd07 Makefile: add 'upload-self' pass to check-memory 2007-08-10 01:41:34 -07:00
Brian Warner
998802fd6d #96: add flag to enable pushing data to ourselves, defaulting to False 2007-08-09 18:30:24 -07:00
Brian Warner
8b14ad1673 encode.py: log a percentage complete as well as the raw byte counts 2007-08-09 18:28:45 -07:00
Brian Warner
08ee80176a Encoder.__repr__: mention the file being encoded 2007-08-09 18:26:56 -07:00
Brian Warner
684966d103 encode.py: add a reactor turn barrier between segments, to allow Deferreds to retire and free their arguments, all in the name of reducing memory footprint 2007-08-09 18:26:17 -07:00
Zooko O'Whielacronx
c0c6417e95 webapi.txt: put back the manifest feature
So that we can compare versions of webapi.txt with and without this documentation, side by side.
2007-08-10 12:58:33 -07:00
Zooko O'Whielacronx
ba2e9aa4cb webapi.txt: put back the localfile feature
So that we can compare versions webapi.txt with and without this documentation side by side.
2007-08-10 12:52:37 -07:00
Zooko O'Whielacronx
193f603e74 webapi.txt: add URI-based GET variants 2007-08-10 12:33:29 -07:00
Zooko O'Whielacronx
89d2e1ac57 webapi.txt: some editing, and remove the localfile feature and the manifest feature
My motivation to remove these features is as per:

http://allmydata.org/pipermail/tahoe-dev/2007-August/000067.html

However, I haven't heard back from Brian yet, so I'm actually going to put them back in the next patch so that I can compare the two versions of webapi.txt side by side.
2007-08-10 12:24:13 -07:00
Zooko O'Whielacronx
887240e7a3 webapi.txt: further refactoring and add a section explaining TOCTTOU bugs and how to avoid them by using URIs 2007-08-10 12:04:30 -07:00
Zooko O'Whielacronx
e68a0e07de webapi.txt: further refactoring and editing to clarify the fact that you don't know whether a thing is a file or a directory before you fetch it 2007-08-10 10:19:27 -07:00
Zooko O'Whielacronx
8b0807812b webapi.txt: add "?t=file" flag and reorganize doc to discourage people from thinking that they know before hand the file-or-dir type of the thing that they are naming 2007-08-10 09:43:52 -07:00
Zooko O'Whielacronx
531109e803 fix test_web refactoring so that the WebMixin class isn't a TestCase
Thanks, Brian.
2007-08-10 08:40:02 -07:00
wilcoxjg
e13783cd6a If do_stop attempts to stop a nonexistent process the OSError exception is caught (by errno) and handled tersely. 2007-08-09 08:57:45 -07:00
Zooko O'Whielacronx
39f218ab90 refactor test_web so that other tests can use the part of test_web that sets up a simple filesystem 2007-08-09 13:08:42 -07:00
Brian Warner
9ac5c14037 introducer: don't log.err() an initial connection failure, since that flunks tests. Use self.log() instead. Also improve test_client.py to always trigger this case, before it was finishing to quickly to always hit the problem. 2007-08-09 12:53:44 -07:00
Brian Warner
84d41adfcc check_memory.py: include a single 100MB test 2007-08-09 11:30:33 -07:00
Brian Warner
b25446d514 munin/tahoe-storagespace.py: use /bin/du instead of our python version, since
it a) is faster and b) will include filesystem overhead that is a real cost.
2007-08-09 18:26:57 -07:00
Brian Warner
1bb44df8ba webapi.txt: update rfc reference 2007-08-09 11:24:35 -07:00
Zooko O'Whielacronx
6d905265a1 zfec: required version of setuptools is 0.6c6 on cygwin, 0.6a9 on other platforms 2007-08-09 10:29:03 -07:00
Zooko O'Whielacronx
5bbbdd1e91 zfec: default setuptools version is now 0.6c6 2007-08-09 10:28:38 -07:00
Zooko O'Whielacronx
d1c40a7ab5 zfec: add benchmark utility 2007-08-09 10:19:13 -07:00
Zooko O'Whielacronx
279561b61b zfec: add to README.txt how to run the unit tests 2007-07-20 15:51:24 -07:00
Zooko O'Whielacronx
31a1e03194 zfec: fix link to zfec-dev mailing list 2007-07-20 13:57:47 -07:00
Zooko O'Whielacronx
a1fbfc9e53 zfec: fix README.txt to explain how to use setuptools with GNU stow better
Also remove requirement of setuptools >= v0.6c3.  I *think* that using setuptools in the modern way relieves this requirement, but I haven't tested it on dapper yet.
2007-07-20 13:57:01 -07:00
Zooko O'Whielacronx
df3fc9b5ed zfec: clarify licensing requirements (transitive grace period) 2007-07-20 13:55:46 -07:00