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

baucis

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baucis - npm Package Compare versions

Comparing version 0.18.0 to 0.18.1

5

Api.js

@@ -181,5 +181,8 @@ // __Dependencies__

api.parser = function (mime) {
// Default to JSON when no MIME type is provided.
mime = mime || 'application/json';
// Not interested in any additional parameters at this point.
mime = mime.split(';')[0].trim();
var handler = parsers[mime];
return handler ? handler() : false;
return handler ? handler() : undefined;
};

@@ -186,0 +189,0 @@

4

CHANGES.md
Baucis Change Log
=================
v0.18.1
-------
Fix an issue where the request's content type would not be recognized when it used a MIME type parameter. (#152)
v0.18.0

@@ -5,0 +9,0 @@ -------

@@ -87,3 +87,3 @@ // __Dependencies__

request.baucis.send,
lastModified(response, controller.get('lastModified')),
lastModified(response, controller.get('lastModified')), // TODO Only add if enabled
es.stringify(),

@@ -108,3 +108,3 @@ etag(response),

request.baucis.send,
lastModified(response, controller.get('lastModified')),
lastModified(response, controller.get('lastModified')), // TODO only add if enabled
etag(response),

@@ -111,0 +111,0 @@ request.baucis.formatter()

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/wprl/baucis",
"version": "0.18.0",
"version": "0.18.1",
"main": "index.js",

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

@@ -1,2 +0,2 @@

baucis v0.18.0
baucis v0.18.1
==============

@@ -3,0 +3,0 @@

@@ -62,2 +62,17 @@ var expect = require('expect.js');

it('should match the correct MIME type, ignoring extra options and linear whitespace', function (done) {
var options = {
url: 'http://localhost:8012/api/vegetables',
headers: {
'Content-Type': ' application/json ; charset=UTF-8 cheese=roquefort '
},
json: { name: 'Tomatillo' }
};
request.post(options, function (error, response, body) {
if (error) return done(error);
expect(response.statusCode).to.be(201);
done();
});
});
it('should set X-Powered-By', function (done) {

@@ -64,0 +79,0 @@ var options = {

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