added optional content length for payload; save archive hash to metadata