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

fluvial

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluvial - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

32

dist/response.js

@@ -8,25 +8,28 @@ import { randomUUID } from 'node:crypto';

get(target, property) {
return rawResponse.getHeader(property);
return target[property.toLowerCase()];
},
set(target, property, newValue) {
if (!newValue && rawResponse.hasHeader(property)) {
rawResponse.removeHeader(property);
const lowerProperty = property.toLowerCase();
if (!newValue && rawResponse.hasHeader(lowerProperty)) {
rawResponse.removeHeader(lowerProperty);
delete target[lowerProperty];
}
else if (newValue) {
rawResponse.setHeader(property, newValue);
rawResponse.setHeader(lowerProperty, newValue);
target[lowerProperty] = rawResponse.getHeader(lowerProperty);
}
target[property] = newValue;
return true;
},
ownKeys() {
return rawResponse.getHeaderNames();
ownKeys(target) {
return Object.keys(target);
},
has(target, p) {
return rawResponse.hasHeader(p);
return rawResponse.hasHeader(p) ?? p.toLowerCase() in target;
},
deleteProperty(target, p) {
if (rawResponse.hasHeader(p)) {
rawResponse.removeHeader(p);
const lowerProperty = p.toLowerCase();
if (rawResponse.hasHeader(lowerProperty)) {
rawResponse.removeHeader(lowerProperty);
}
return true;
return delete target[lowerProperty];
},

@@ -37,5 +40,4 @@ });

Object.defineProperty(res, 'headers', {
get() {
return headers;
},
value: headers,
writable: false,
enumerable: true,

@@ -168,3 +170,3 @@ });

if (this.httpVersion == '1.1') {
this.rawResponse.writeHead(this._status);
this.rawResponse.writeHead(this._status, { ...this.headers });
}

@@ -171,0 +173,0 @@ else {

{
"name": "fluvial",
"version": "0.2.2",
"version": "0.2.3",
"description": "Fluvial: A light http/2 server framework, similar to Express",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

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