@superhero/http-server 4.2.3 → 4.2.5
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/package.json +1 -1
- package/view.js +4 -3
package/package.json
CHANGED
package/view.js
CHANGED
|
@@ -24,7 +24,7 @@ export default class View
|
|
|
24
24
|
const headers = new Proxy({},
|
|
25
25
|
{
|
|
26
26
|
get : (target, prop) => target[prop] ?? downstream.getHeader(prop),
|
|
27
|
-
set : (_, prop, val) => downstream.setHeader(prop, val) ||
|
|
27
|
+
set : (_, prop, val) => downstream.setHeader(prop, val) || true,
|
|
28
28
|
has : (_, prop) => downstream.hasHeader(prop),
|
|
29
29
|
deleteProperty : (_, prop) => downstream.removeHeader(prop),
|
|
30
30
|
ownKeys : () => downstream.getHeaderNames()
|
|
@@ -61,7 +61,7 @@ export default class View
|
|
|
61
61
|
session : { value: session },
|
|
62
62
|
// The status property is an integer representing the status code of the HTTP response.
|
|
63
63
|
status : { enumerable : true,
|
|
64
|
-
get : () => downstream.statusCode,
|
|
64
|
+
get : () => downstream.statusCode,
|
|
65
65
|
set : (status) => downstream.statusCode = status }
|
|
66
66
|
})
|
|
67
67
|
|
|
@@ -94,7 +94,8 @@ export default class View
|
|
|
94
94
|
if(descriptor?.writable
|
|
95
95
|
|| descriptor?.set)
|
|
96
96
|
{
|
|
97
|
-
|
|
97
|
+
this[property] = value
|
|
98
|
+
return true
|
|
98
99
|
}
|
|
99
100
|
else
|
|
100
101
|
{
|