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

koa

Package Overview
Dependencies
Maintainers
9
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa - npm Package Compare versions

Comparing version 2.0.0-alpha.7 to 2.0.0-alpha.8

6

History.md

@@ -5,2 +5,3 @@

* Fix malformed content-type header causing exception on charset get (#898)
* fix: subdomains should be [] if the host is an ip (#808)

@@ -16,2 +17,7 @@ * don't pre-bound onerror [breaking change] (#800)

2.0.0-alpha.8 / 2017-02-13
==================
* Fix malformed content-type header causing exception on charset get (#898)
2.0.0-alpha.7 / 2016-09-07

@@ -18,0 +24,0 @@ ==================

2

lib/application.js

@@ -108,3 +108,3 @@

if (isGeneratorFunction(fn)) {
deprecate('Support for generators will been removed in v3. ' +
deprecate('Support for generators will be removed in v3. ' +
'See the documentation for examples of how to convert old middleware ' +

@@ -111,0 +111,0 @@ 'https://github.com/koajs/koa/tree/v2.x#old-signature-middleware-v1x---deprecated');

@@ -318,6 +318,12 @@

get charset() {
const type = this.get('Content-Type');
let type = this.get('Content-Type');
if (!type) return '';
return contentType.parse(type).parameters.charset || '';
try {
type = contentType.parse(type);
} catch (e) {
return '';
}
return type.parameters.charset || '';
},

@@ -419,3 +425,3 @@

* Check if the given `type(s)` is acceptable, returning
* the best match when true, otherwise `undefined`, in which
* the best match when true, otherwise `false`, in which
* case you should respond with 406 "Not Acceptable".

@@ -447,3 +453,3 @@ *

* this.accepts('png');
* // => undefined
* // => false
*

@@ -456,3 +462,3 @@ * // Accept: text/*;q=.5, application/json

* @param {String|Array} type(s)...
* @return {String|Array|Boolean}
* @return {String|Array|false}
* @api public

@@ -459,0 +465,0 @@ */

{
"name": "koa",
"version": "2.0.0-alpha.7",
"version": "2.0.0-alpha.8",
"description": "Koa web app framework",

@@ -5,0 +5,0 @@ "main": "lib/application.js",

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