Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

braid-http

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braid-http - npm Package Compare versions

Comparing version 0.3.18 to 0.3.19

4

braid-http-client.js

@@ -232,4 +232,4 @@ // var peer = Math.random().toString(36).substr(2)

function start_subscription (cb, error) {
if (!res.ok)
throw new Error('Request returned not ok', res)
if (!res.ok) {
throw new Error('Request returned not ok status:', res.status)

@@ -236,0 +236,0 @@ if (res.bodyUsed)

@@ -239,7 +239,19 @@ var assert = require('assert')

res.setHeader('cache-control', 'no-cache, no-transform')
if (req.httpVersionMajor == 1) {
// Explicitly disable transfer-encoding chunked for http 1
res.setHeader('transfer-encoding', '')
}
// Note: I used to explicitly disable transfer-encoding chunked
// here by setting the header to empty string. This is the only
// way I know to disable it in nodejs. We don't need chunked
// encoding in subscriptions, because chunked encoding is used to
// signal the end of a response, and subscriptions don't end. I
// disabled them to make responses cleaner. However, it turns out
// the Caddy proxy throws an error if it receives a response with
// transfer-encoding: set to the empty string. So I'm disabling
// it now.
// if (req.httpVersionMajor == 1) {
// // Explicitly disable transfer-encoding chunked for http 1
// res.setHeader('transfer-encoding', '')
// }
// Tell nginx not to buffer the subscription

@@ -246,0 +258,0 @@ res.setHeader('X-Accel-Buffering', 'no')

{
"name": "braid-http",
"version": "0.3.18",
"version": "0.3.19",
"description": "An implementation of Braid-HTTP for Node.js and Browsers",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc