Commit Graph

3173 Commits

Author SHA1 Message Date
Andrew Bettison
04b2a20e54 Rhizome Java API: improved form-data headers
Change manifest Content-Type from rhizome-manifest/text to
rhizome/manifest; format="text+binarysig"

Add "Content-Transfer-Encoding" form-part headers to Java API
sent form parts, although not currently checked by Rhizome
RESTful interface
2014-07-10 21:12:40 +09:30
Andrew Bettison
57cce64b6c Rhizome Java API: narrower exceptions 2014-07-10 06:43:24 +09:30
Andrew Bettison
a81d05b4f6 Rhizome Java API: insert bundle 2014-07-10 06:43:17 +09:30
Andrew Bettison
3715c5bf0b Rhizome Java API: negative fetch tests 2014-07-10 06:30:50 +09:30
Andrew Bettison
2aec8f31a4 Rhizome Java API: get decrypted payload 2014-07-10 06:30:50 +09:30
Andrew Bettison
d16be8f42d Improve MeshMS HTTP RESTful interface
Provide "meshms_status_message" in returned JSON status content
2014-07-10 06:30:50 +09:30
Andrew Bettison
cf43635789 Improve Rhizome HTTP RESTful interface
Add RHIZOME_BUNDLE_STATUS_READONLY enum value

Tighten up switch statements on bundle and payload status enums (no
default labels)

Rename some recently added enum entries

Return bundle status and payload status in HTTP responses

Add test for failing to decrypt a foreign encrypted bundle payload,
fix bug that caused an assertion failure

Add tests for fetching a non-existent manifest and fetching bundles
whose payload blob is not in the store
2014-07-10 06:29:51 +09:30
Andrew Bettison
34b6ff48bf Rhizome Java API: get raw payload
Added more "Serval-Rhizome-Bundle-xxx" headers to /restful/rhizome/
responses, so that a more complete manifest can be constructed from
them
2014-07-10 06:29:09 +09:30
Andrew Bettison
93e67ede63 Rhizome Java API: get manifest
Fixes assertion violation in GET /restful/rhizome/<BID>.rhm when <BID>
not found
2014-07-10 06:29:09 +09:30
Andrew Bettison
db8ee79a4e Rhizome Java API: list bundles 2014-07-10 06:29:09 +09:30
Andrew Bettison
61023287b1 Refactor Rhizome manifest validation
New function returns text describing the failed validation
2014-07-10 06:29:09 +09:30
Andrew Bettison
1ac67de0e9 Fix bug in HTTP server's form-data parsing
Did not handle a non-empty preamble properly
2014-07-10 06:29:09 +09:30
Andrew Bettison
a9ec5dcf69 Refactor Rhizome test script ready for re-use
Move add_bundles() function from 'rhizomerestful' test script into
testdefs_rhizome.sh, rename to rhizome_add_bundles() and add a new
SID argument
2014-06-30 11:11:01 +09:30
Andrew Bettison
c5d3069d82 'make all' now makes libserval.so 2014-06-30 11:11:01 +09:30
Andrew Bettison
188a67d3c1 Improve test framework: tfw_shopt, tfs_shopt_restore 2014-06-30 11:11:01 +09:30
Andrew Bettison
067340bbba Change HTTP Authorization realm to "Serval RESTful API"
Was "Serval Rhizome", which is not accurate
2014-06-30 11:11:01 +09:30
Andrew Bettison
11e9d38299 Rename config 'rhizome.api.restful' to 'api.restful' 2014-06-30 11:11:01 +09:30
Jeremy Lakeman
20af8a9477 Squelch info message that is occuring while fetching a journal bundle 2014-06-30 08:40:48 +09:30
Jeremy Lakeman
31dbfa4e58 Improve debug info for rhizome sync 2014-06-28 20:27:29 +09:30
Jeremy Lakeman
75d488b339 Add new debug flag to show what payloads are being included in network packets 2014-06-28 20:17:26 +09:30
Jeremy Lakeman
e862b42074 Fix is_interesting(bar) test 2014-06-28 20:11:43 +09:30
Jeremy Lakeman
58ea5a1c8b Simplify fetch decisions when manifest arrives 2014-06-28 17:41:05 +09:30
Jeremy Lakeman
588b95ab20 Ensure temporary id is unique 2014-06-28 17:36:06 +09:30
Jeremy Lakeman
b5bafe3c50 Sort timing details by duration then call count 2014-06-27 15:08:25 +09:30
Jeremy Lakeman
804cc93be6 Fix HTTP transfers of large payloads 2014-06-27 15:07:26 +09:30
Jeremy Lakeman
186b6cbc2f Allow more servald's to be running during tests 2014-06-27 12:46:29 +09:30
Jeremy Lakeman
537a09812c Ignore some types of sendto errors 2014-06-27 12:45:53 +09:30
Jeremy Lakeman
42a50e5c13 Reduce memory usage when there are no bars to fetch 2014-06-27 12:20:26 +09:30
Jeremy Lakeman
63f02607e6 Fix duplicate payload detection over unicast links 2014-06-26 17:20:06 +09:30
Jeremy Lakeman
a9545ea004 Display where packets came from in debug messages 2014-06-26 16:47:23 +09:30
Andrew Bettison
6c16b95a38 Fix SEGV on empty /restful/meshms/.../conversationlist.json 2014-06-26 15:08:48 +09:30
Andrew Bettison
776d4de894 Split up 'rhizomehttp' test script
New scripts 'rhizomerestful' and 'meshmsrestful'
New testdefs_json.sh
Improved testdefs.sh functions for discovering HTTP server port
2014-06-26 15:08:48 +09:30
Jeremy Lakeman
5df5a33721 Measure free space on Android using statfs() 2014-06-26 12:17:36 +09:30
Jeremy Lakeman
82b13caac4 Deprecate JNI meshms interface 2014-06-25 12:52:47 +09:30
Jeremy Lakeman
2cdd2cec81 Use Long (int64) for meshms offsets 2014-06-25 12:52:25 +09:30
Andrew Bettison
660daf0438 Merge latest MeshMS Java API additions into 'development' 2014-06-24 15:10:16 +09:30
Andrew Bettison
c79a382a27 MeshMS Java API: mark messages as read 2014-06-24 12:12:48 +09:30
Andrew Bettison
7736a4ceb1 New HTTP RESTful requests: MeshMS read message(s) 2014-06-24 12:11:58 +09:30
Jeremy Lakeman
0cb68c98a3 Open the database immediately on config load 2014-06-23 15:31:26 +09:30
Jeremy Lakeman
7d86fcd573 Add java API wrapper for performing multiple config changes in one hit 2014-06-23 15:31:25 +09:30
Jeremy Lakeman
9f6ace518a Test that msp listen --service_name shuts down 2014-06-23 14:23:30 +09:30
Jeremy Lakeman
ca8f651b8d Cleanup the rhizome database every 30 minutes or so 2014-06-23 13:49:58 +09:30
Andrew Bettison
eba7f6555f MeshMS Java API: send message 2014-06-23 13:20:57 +09:30
Jeremy Lakeman
2ef73884a1 Add configurable limit to ensure a minimum amount of free space is preserved
- default to 100MB of free space
- currently disabled on android due to missing sys/statvfs.h
2014-06-23 13:06:21 +09:30
Andrew Bettison
819b8dc9e7 MeshMS RESTful API stricter on incoming form data
/restful/meshms/SID/SID/sendmessage now enforces Content-Disposition:
form-data (was ignoring), and enforces Content-Type: text/plain;
charset=utf-8 (was ignoring)

New negative test cases to ensure that these are treated strictly
2014-06-23 12:27:09 +09:30
Jeremy Lakeman
533c0be445 Rename mdp lookup helper function to match class name 2014-06-20 15:14:00 +09:30
Jeremy Lakeman
68dbaef38d Refactor Java API
Add stateful class to represent the state of the serval daemon, shifting some functions from BatPhone
Add convenience functions to get pre-configured MDP and HTTP Restful client classes
2014-06-20 10:55:09 +09:30
Jeremy Lakeman
47f051917d Rhizome cleanup will now expire payloads and vacuum the db file. 2014-06-19 14:23:43 +09:30
Andrew Bettison
f948f8e12e Include Java tests in 'tests/all' if Java compiler available 2014-06-19 11:38:39 +09:30
Andrew Bettison
b14c58bdf6 Merge NAF4 MeshMS Java API into development
Currently implements "list conversations" and "list messages"
2014-06-19 11:21:37 +09:30