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

serve-handler

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve-handler - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

2

package.json
{
"name": "serve-handler",
"version": "5.0.0",
"version": "5.0.1",
"description": "The routing foundation of `serve` and static deployments on Now",

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

@@ -477,4 +477,12 @@ // Native

if (stats) {
let stream = null;
try {
stream = await handlers.createReadStream(errorPage);
} catch (err) {
// eslint-disable-next-line no-use-before-define
return internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
}
const headers = await getHeaders(config.headers, current, errorPage, stats);
const stream = await handlers.createReadStream(errorPage);

@@ -678,3 +686,10 @@ response.writeHead(statusCode, headers);

const stream = await handlers.createReadStream(absolutePath, streamOpts);
let stream = null;
try {
stream = await handlers.createReadStream(absolutePath, streamOpts);
} catch (err) {
return internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
}
const headers = await getHeaders(config.headers, current, absolutePath, stats);

@@ -681,0 +696,0 @@

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