ultimate-express 1.4.3 → 1.4.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/response.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "The Ultimate Express. Fastest http server with full Express compatibility, based on uWebSockets.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/response.js CHANGED
@@ -542,8 +542,9 @@ module.exports = class Response extends Writable {
542
542
  }
543
543
  } else {
544
544
  field = field.toLowerCase();
545
- if(field === 'set-cookie' && Array.isArray(value)) {
546
- value = value.join(', ');
545
+ if(Array.isArray(value)) {
546
+ this.headers[field] = value;
547
+ return this;
547
548
  } else if(field === 'content-type') {
548
549
  if(!value.includes('charset=') && (value.startsWith('text/') || value === 'application/json' || value === 'application/javascript')) {
549
550
  value += '; charset=utf-8';