Add test for immutable content
This commit is contained in:
@@ -37,7 +37,6 @@ function handleNoMergeGet(db, digest, keystore) {
|
||||
format: 'binary',
|
||||
};
|
||||
pgp.decrypt(opts).then((plainText) => {
|
||||
console.debug('immutable ', rs.rows[0]['owner_fingerprint'], immutable);
|
||||
let r;
|
||||
if (immutable) {
|
||||
r = plainText.data;
|
||||
|
||||
@@ -174,7 +174,6 @@ async function processRequest(req, res) {
|
||||
}
|
||||
});
|
||||
req.on('end', async (d) => {
|
||||
console.debug('hedaers ', req.headers);
|
||||
let inputContentType = req.headers['content-type'];
|
||||
let debugString = 'executing mode ' + mod ;
|
||||
if (data !== undefined) {
|
||||
@@ -211,6 +210,7 @@ async function processRequest(req, res) {
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
content = '';
|
||||
break;
|
||||
//case 'get:automerge:server':
|
||||
// content = await handlers.handleServerMergeGet(db, digest, keystore);
|
||||
@@ -262,6 +262,9 @@ async function processRequest(req, res) {
|
||||
// (new TextEncoder().encode(content)).length;
|
||||
//}
|
||||
const responseContentLength = content.length;
|
||||
//if (responseContentLength === undefined) {
|
||||
// responseContentLength = 0;
|
||||
//}
|
||||
res.writeHead(statusCode, {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Content-Type": contentType,
|
||||
|
||||
Reference in New Issue
Block a user