diff --git a/src/index.ts b/src/index.ts index f9ab079..8f9edaf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -202,7 +202,7 @@ const generatePublicDirectory = (app: TemplatedApp) => { .writeStatus('200 OK') .writeHeader('Access-Control-Allow-Origin', '*') .writeHeader('Content-Type', contentType) - .end(fs.readFileSync(file).toString('utf-8')); + .end(fs.readFileSync(file)); }); } else { notFound(res, new Error(`File not found: ${file}`)); diff --git a/tests/workflow.stepci.yml b/tests/workflow.stepci.yml index d2bf9a2..f993f2f 100644 --- a/tests/workflow.stepci.yml +++ b/tests/workflow.stepci.yml @@ -473,4 +473,18 @@ tests: method: GET check: status: 200 - body: This should be reachable! \ No newline at end of file + body: This should be reachable! + - name: get images + http: + url: http://${{env.host}}/screenshot.png + method: GET + check: + status: 200 + sha256: 87e26d176cea2f7465c52a4e7e186d6f7f15e61a8658e7b84420474883f073d3 + - name: get audio + http: + url: http://${{env.host}}/file_example_MP3_700KB.mp3 + method: GET + check: + status: 200 + sha256: 9a2270d5964f64981fb1e91dd13e5941262817bdce873cf357c92adbef906b5d \ No newline at end of file