Commit Graph

27 Commits

Author SHA1 Message Date
gardners
92a5423b17 Moved rhizome direct imports to be in-process instead of
out-of-process. rhizomeprotocol push test still fails.
Investigating. #9
2012-10-03 12:28:21 +02:00
gardners
e015f0670b Switched to new BAR format with 15 bytes of BID prefix, and TTL
at the end, and log2(filesize) instead of filesize.  Equally
importantly BAR construction and parsing now uses #defines for
field sizes and offsets instead of it being hardwired without
meaningful documentation.
WILL BREAK BACKWARD COMPATIBILITY WITH PREVIOUS BUILDS.
YOU MUST DELETE AND REBUILD YOUR RHIZOME DATABASE AS OLD-FORMAT
BIDs WILL BE IN THERE AND GET SENT, AND STRANGE THINGS WILL HAPPEN.
This break with backwards compatibility is only reasonable to
consider because we have not yet had an official build using the
new Rhizome with old BAR format.  0.08 uses old Rhizome.  #9
2012-10-03 12:22:59 +02:00
gardners
c356ead09c fixed bug in rhizome direct http push code.
Rhizome direct push via HTTP now works. #9
2012-10-03 12:22:52 +02:00
Andrew Bettison
bbe6d12693 Issue #9, fix 'rhizome direct push' command
Now the 'rhizomeprotocol' Push test case now passes.  It should be renamed to
DirectPush.

Much refactoring of the Rhizome Direct HTTP request parsing.  Now uses
strbuf_sprintf() instead of snprintf() in many places to check for buffer
overrun and ensure terminating nul.  Still more of this kind of work is needed.

Improved debug that needs to be made conditional on DEBUG_RHIZOME_RX and
DEBUG_RHIZOME_TX.  Some just needs removal.
2012-10-03 17:51:37 +09:30
Andrew Bettison
5fed0460e1 Issue #9, 'rhizomeprotocol' HttpImport test now passes
Any HTTP client can import a bundle into Rhizome using a PUSH request.
2012-10-02 17:15:14 +09:30
Andrew Bettison
e51745e39d Issue #9, fix HTTP server "POST /rhizome/bundle"
Handle failure cases properly.  The HttpImport test now fails because the
"servald" executable is not found by the system(3) call -- need to give the
full path name, or avoid the use of system(3) altogether.
2012-09-28 17:53:20 +09:30
Andrew Bettison
04abc7db0f Fix Solaris compile error and some warnings
The mmap(2) MAP_FILE flag is not defined on Solaris, and is optional or
ignored on Mac OS X and Linux.

Two "unused variable" warnings.

Issue #9.
2012-09-28 11:07:34 +09:30
gardners
59a969cfa3 fixed one of the outstanding issues with rhizome direct http push. 2012-09-27 22:01:07 +09:30
gardners
9ecf6499f8 now tries to write bundle file to server. server seems to hang.
Getting very close now to rhizome direct http push working, though.
2012-09-26 17:12:48 +09:30
gardners
5c2b61758e now tries to connect to rhizome direct http server to push bundles.
(manifest is written, but file is not.  manifest also seems to be
missing signature block.) #9
2012-09-26 16:47:55 +09:30
gardners
5787dd860b Rhizome direct http forms first part of POST request to push bundles
to far side. #9
2012-09-26 16:01:27 +09:30
gardners
c23d424d4d more work towards rhizome direct http actually pushing new/updated
bundles to remote party.
2012-09-22 15:21:02 +09:30
gardners
f7ef416091 bug fixes for rhizome direct response handling.
Can now generate a full response buffer instead of only using 9/32
of the space. #9
2012-09-21 15:45:10 +02:00
gardners
ee89f283e0 add initial parsing of rhizome direct response. #9 2012-09-21 14:40:36 +02:00
gardners
a7d42b3c73 added note contemplating about where parsing of rhizome direct
responses should occur. #9
2012-09-21 14:31:14 +02:00
gardners
3caf82ad15 fixed bug in rhizome direct http response formation. #9 2012-09-21 14:27:02 +02:00
gardners
cae11bd444 fixed rhizome direct response generation to allow request and
responses to be of different sizes. #9
2012-09-21 14:04:53 +02:00
gardners
f7e75d5347 debugging and abstraction improvements in rhizome direct
synchronisation code. #9
2012-09-21 13:41:27 +02:00
gardners
6553050566 rhizome direct enquiry request now gets back enquiry response,
and realises that it needs to process it.  It does not yet
process it. #9
2012-09-11 14:34:58 +09:30
gardners
9a5dbbd14f rhizome direct http transport now asks for response to enquiry when
enquiry received by server.  Generating responses to enquiries not
yet implemented. #9
2012-09-11 13:09:40 +09:30
gardners
bb0be86db3 fixed content-disposition problems. Request now gets accepted.
Need to write code to handle it now, and send cursor fill back
the otherway. #9
2012-09-11 09:34:41 +09:30
gardners
0e04dde28c changed rhizome direct POST URI paths to /rhizome/import and
/rhizome/enquiry.  Also fixed bug with content-length header
line when forming /rhizome/enquiry request.  post multipart
data is still malformed in some way. #9
2012-09-11 09:28:11 +09:30
gardners
e8009ac94a rhizome direct http transport sends request, and receives http
reply (including if error).  Doesn't capture the reply body yet. #9
2012-09-11 09:04:38 +09:30
gardners
e4896cd028 now tries to open connection to rhizome direct server using
http transport.  #9
2012-09-11 06:56:04 +09:30
gardners
4f5f2c2444 work towards http transport working for rhizome direct. #9 2012-09-10 20:22:14 +09:30
gardners
dd01f7939d further work on rhizome direct dispatching etc.
For some reason finds the same manifest several times (size bin
filtering seems to not be working right).
Also sync doesn't realise it has finished, and so doesn't return
when done.
2012-09-10 09:16:27 +09:30
gardners
d796a482b7 refactored rhizome direct code to separate http transport specific
code from general rhizome direct BAR buffer gathering and processing.
2012-09-09 13:50:09 +09:30