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

@compas/server

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/server - npm Package Compare versions

Comparing version 0.0.149 to 0.0.150

6

package.json
{
"name": "@compas/server",
"version": "0.0.149",
"version": "0.0.150",
"description": "Koa server and common middleware",

@@ -18,3 +18,3 @@ "main": "./index.js",

"dependencies": {
"@compas/stdlib": "0.0.149",
"@compas/stdlib": "0.0.150",
"co-body": "6.1.0",

@@ -47,3 +47,3 @@ "formidable": "2.0.0-canary.20200504.1",

},
"gitHead": "dd7fa620c6d3cb6219764bcfc5cc91f711383dfc"
"gitHead": "6bbe148c5e4f643ed7db0bc22fc439091f0fc34a"
}

@@ -20,2 +20,16 @@ import { isNil } from "@compas/stdlib";

if (ctx.headers["if-modified-since"]?.length > 0) {
const dateValue = new Date(ctx.headers["if-modified-since"]);
const currentDate = new Date(file.updatedAt ?? file.lastModified);
// Weak validation ignores the milli-seconds part, hence 'weak'.
currentDate.setMilliseconds(0);
if (dateValue.getTime() === currentDate.getTime()) {
// File is not modified
ctx.status = 304;
return;
}
}
if (ctx.headers.range) {

@@ -22,0 +36,0 @@ try {

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