added rhizome.api.addfile.author config option to supply author SID

as hex if not supplying a manifest template.
modified rhizomeprotocol test of manifest-less HTTP import to set
that option.  That test now passes.
ALL rhizomeprotocol tests now pass. #9
This commit is contained in:
gardners 2012-10-03 01:51:30 +02:00
parent 2e907e6fff
commit 4e0c0064ba
2 changed files with 4 additions and 1 deletions

View File

@ -252,7 +252,9 @@ int rhizome_direct_form_received(rhizome_http_request *r)
}
DEBUGF("File name = '%s'",name);
const char *senderhex = rhizome_manifest_get(m, "sender", NULL, 0);
const char *senderhex
= rhizome_manifest_get(m, "sender", NULL, 0);
if (!senderhex) senderhex=confValueGet("rhizome.api.addfile.author",NULL);
unsigned char authorSid[SID_SIZE];
if (senderhex) fromhexstr(authorSid,senderhex,SID_SIZE);
const char *bskhex

View File

@ -332,6 +332,7 @@ setup_HttpAddLocal() {
# set rhizome.api.* configuration variables
set_instance +A
executeOk_servald config set rhizome.api.addfile.uri "/rhizome/secretaddfile"
executeOk_servald config set rhizome.api.addfile.author $SIDA
start_servald_instances +A
wait_until rhizome_http_server_started +A