ultimate-express 1.4.2 → 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.
package/README.md CHANGED
@@ -101,6 +101,7 @@ app.listen(3000, () => {
101
101
  ```
102
102
 
103
103
  - This also applies to non-SSL HTTP too. Do not create http server manually, use `app.listen()` instead.
104
+ - NodeJS max header size is 16384 byte, uWebSockets 4096 byte, if you need long headers set the env variable `UWS_HTTP_MAX_HEADERS_SIZE`
104
105
 
105
106
  ## Performance tips
106
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "1.4.2",
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';