minimalistic-server 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +2 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1704,10 +1704,9 @@ async function handleRequest(req, routes, staticFileDirectory, handleNotFoundErr
|
|
|
1704
1704
|
}, 400);
|
|
1705
1705
|
|
|
1706
1706
|
let requestHeaders;
|
|
1707
|
-
let request;
|
|
1708
1707
|
|
|
1709
1708
|
try {
|
|
1710
|
-
request = new Request(req);
|
|
1709
|
+
const request = new Request(req);
|
|
1711
1710
|
|
|
1712
1711
|
const method = request.getMethod();
|
|
1713
1712
|
const path = request.getPath();
|
|
@@ -1799,7 +1798,7 @@ async function handleRequest(req, routes, staticFileDirectory, handleNotFoundErr
|
|
|
1799
1798
|
}
|
|
1800
1799
|
|
|
1801
1800
|
try {
|
|
1802
|
-
return
|
|
1801
|
+
return await Promise.all([response.getCode(requestHeaders), response.getHeaders(requestHeaders), response.getBody(requestHeaders)]);
|
|
1803
1802
|
} catch (error) {
|
|
1804
1803
|
safePrint(error, true);
|
|
1805
1804
|
|