Zooko O'Whielacronx
471e1f1b9b
try to tidy up uri-as-string vs. uri-as-object
...
I get confused about whether a given argument or return value is a uri-as-string or uri-as-object. This patch adds a lot of assertions that it is one or the other, and also changes CheckerResults to take objects not strings.
In the future, I hope that we generally use Python objects except when importing into or exporting from the Python interpreter e.g. over the wire, the UI, or a stored file.
2008-12-19 08:39:24 -07:00
Zooko O'Whielacronx
c456ff8591
rename "get_verifier()" to "get_verify_cap()"
2008-12-08 12:44:11 -07:00
francois
db7ad6da12
filenode.py: Fix partial HTTP Range header handling according to RFC2616
...
Tahoe webapi was failing on HTTP request containing a partial Range header.
This change allows movies players like mplayer to seek in movie files stored in
tahoe.
Associated tests for GET and HEAD methods are also included
2008-11-18 07:41:35 -07:00
Brian Warner
a0b5b5ab2b
test_web: add get_permuted_peers, to unbreak recent checker_results change
2008-12-05 02:12:10 -07:00
Brian Warner
bc53c24003
dirnode manifest: add verifycaps, both to internal API and to webapi. This will give the manual-GC tools more to work with, so they can estimate how much space will be freed.
2008-11-24 14:40:46 -07:00
Brian Warner
b84c2c6541
manifest: add storage-index strings to the json results
2008-11-19 16:00:27 -07:00
Brian Warner
dfa2408157
checker: add is_recoverable() to checker results, make our stub immutable-verifier not throw an exception on unrecoverable files, add tests
2008-11-06 22:35:47 -07:00
Brian Warner
d3f2df00be
webapi: serve the /static URL tree from /public_html (configurable)
2008-10-29 15:34:31 -07:00
Brian Warner
186b64b633
test_web.py: one more line of test coverage
2008-10-28 22:00:15 -07:00
Brian Warner
0350994133
test_web: improve test coverage of PUT DIRURL t=uri replace=false
2008-10-28 21:57:44 -07:00
Brian Warner
a5aebf0cbd
web: test (and fix) PUT DIRURL t=uri, which replaces a directory in-place with some other cap
2008-10-28 21:54:46 -07:00
Brian Warner
b73c380cdb
move testutil into test/common_util.py, since it doesn't count as 'code under test' for our pyflakes numbers
2008-10-28 21:28:31 -07:00
Brian Warner
37e3d8e47c
#527 : support HTTP 'Range:' requests, using a cachefile. Adds filenode.read(consumer, offset, size) method. Still needs: cache expiration, reduced alacrity.
2008-10-28 13:41:04 -07:00
Brian Warner
0383ec5a49
test_web.test_POST_DIRURL_deepcheck: confirm that /operations/HANDLE/ works with or without the slash
2008-10-23 19:17:59 -07:00
Brian Warner
cadb045288
test_web: more test coverage
2008-10-23 17:11:18 -07:00
Brian Warner
a1cfac89f9
webapi: fix t=rename from==to, it used to delete the file
2008-10-23 16:32:36 -07:00
Brian Warner
c455d52453
deep-check: add webapi links to detailed per-file/dir results
2008-10-23 16:00:31 -07:00
Brian Warner
76b7b9d835
webapi: make the /operations/ 't=status' qualifier optional, remove it from examples
2008-10-23 15:56:58 -07:00
Brian Warner
34ab4e3de3
more #514 log-webop status/cancel: add handle-expiration, test coverage
2008-10-21 22:13:54 -07:00
Brian Warner
0f7c1fd6fd
#514 : improve test coverage
2008-10-21 17:52:56 -07:00
Brian Warner
ad3d9207a9
Change deep-size/stats/check/manifest to a start+poll model instead of a single long-running synchronous operation. No cancel or handle-expiration yet. #514 .
2008-10-21 17:03:07 -07:00
Brian Warner
2edfe12b88
test_web: deep-size is more variable than I thought, so assert less
2008-10-06 22:11:47 -07:00
Brian Warner
3ffaded809
web: change t=manifest to return a list of (path,read/writecap) tuples, instead of a list of verifycaps. Add output=html,text,json.
2008-10-06 21:36:18 -07:00
Brian Warner
8e6d122ecf
web: rewrite t=deep-size in terms of deep-stats, update test to match inclusion of directory sizes
2008-10-06 21:35:39 -07:00
Brian Warner
935d185696
tolerate simplejson-2.0.0 and newer, which frequently return bytestrings instead of unicode objects. Closes #523
2008-09-30 15:21:06 -07:00
Brian Warner
54fce5c066
webapi: survive slashes in filenames better: make t=info and t=delete to work, and let t=rename fix the problem
2008-09-24 13:35:05 -07:00
Brian Warner
99d5a8d8b9
web: add 'more info' pages for files and directories, move URI/checker-buttons/deep-size/etc off to them
2008-09-17 22:00:41 -07:00
Brian Warner
80d8f3e862
hush pyflakes
2008-09-09 19:50:17 -07:00
Brian Warner
1d2d6a35a6
checker results: add output=JSON to webapi, add tests, clean up APIs
...
to make the internal ones use binary strings (nodeid, storage index) and
the web/JSON ones use base32-encoded strings. The immutable verifier is
still incomplete (it returns imaginary healty results).
2008-09-09 19:45:17 -07:00
Brian Warner
3408d552cd
checker: overhaul checker results, split check/check_and_repair into separate methods, improve web displays
2008-09-07 12:44:56 -07:00
Brian Warner
bcbb51fe4a
test_web: workaround broken HEAD behavior in twisted-2.5.0 and earlier
2008-08-12 19:45:20 -07:00
Brian Warner
6af4619928
test_web: oops, actually use HEAD (instead of GET) in the HEAD test
2008-08-12 19:04:51 -07:00
Brian Warner
914783acdf
web: add /status/?t=json, with active upload/download ops. Addresses #493 .
2008-07-25 17:41:10 -07:00
Brian Warner
edec917060
test_web: test that save=true filename=unicode doesn't crash
2008-07-18 18:58:57 -07:00
Brian Warner
67db0a4967
deep-check: add webapi, add 'DEEP-CHECK' button to wui, add tests, rearrange checker API a bit
2008-07-17 16:47:09 -07:00
Brian Warner
3e9322bcb6
checker: re-enable checker web results (although they just say 'Healthy' right now)
2008-07-16 15:42:56 -07:00
Brian Warner
7394607141
move encode/upload/download/checker.py into a new immutable/ directory. No behavior changes expected.
2008-07-16 13:14:39 -07:00
Brian Warner
5bdff74e5b
web: stop using absolute links (or url.here) in forms and pages, since they break behind proxies. Partially addresses #461
2008-06-17 19:49:40 -07:00
robk-tahoe
b803158de7
test_web: fix webapi test around redirection issues
...
this fixes the test_web test test_POST_upload_mutable which chdir's into
a /foo subdirectory, but then later asserts that the web ui redirects the
user back to /foo, which should really be /foo/ since it's a directory.
2008-06-11 15:19:17 -07:00
Brian Warner
0aa6d24d62
web: add test for unicode POST when the name comes from name=, not the filename attribute
2008-06-03 17:09:39 -07:00
Brian Warner
9f5075e83d
web: make nickname more visible in the welcome page, closes #361
2008-06-03 15:02:10 -07:00
Brian Warner
32c89a8d59
web: transform FileTooLargeError into a friendlier '413 Request Entity Too Large' error
2008-06-03 00:03:16 -07:00
Brian Warner
3ac4a734e5
web t=json: add 'mutable' key to the information dict
2008-05-20 15:40:49 -07:00
Brian Warner
9c992c0d06
test_web: improve test coverage of web.common utility code
2008-05-20 15:21:46 -07:00
Brian Warner
8dded7819c
web: fix JSON output for mutable files
2008-05-20 15:14:19 -07:00
Brian Warner
e323019708
web: handle PUT mutable=true properly
2008-05-20 12:36:02 -07:00
Brian Warner
d72f75019f
test_web: add HEAD coverage
2008-05-20 11:47:43 -07:00
Brian Warner
b0e306a753
web: more mutable-file coverage
2008-05-20 11:35:47 -07:00
Brian Warner
6b51841ec8
web: even more test coverage
2008-05-20 11:33:14 -07:00
Brian Warner
2eadabbf82
web: improve test coverage, remove some dead code
2008-05-20 11:13:12 -07:00