braid-http 1.3.37 → 1.3.38

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.
@@ -343,7 +343,7 @@ function braidify (req, res, next) {
343
343
  ].map(x => x.toLowerCase()))
344
344
 
345
345
  // copy any CORS headers from the user
346
- var cors_headers = Object.entries(res.getHeaders()).
346
+ var cors_headers = Object.entries(res2.getHeaders()).
347
347
  filter(x => braidify.cors_headers.has(x.key))
348
348
 
349
349
  if (og_stream) {
@@ -428,6 +428,10 @@ function braidify (req, res, next) {
428
428
  // just touching these seems to cause issues
429
429
  key === '_events' || key === 'emit'
430
430
 
431
+ // empirically, on an http1 server,
432
+ // this causes res2 to close prematurely
433
+ || key === 'destroyed'
434
+
431
435
  // adding these lines gets rid of some deprecation warnings.. keep?
432
436
  || key === '_headers'
433
437
  || key === '_headerNames') continue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "1.3.37",
3
+ "version": "1.3.38",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"