Comparing version 6.1.0 to 6.2.0
@@ -11,2 +11,6 @@ var Message = require('./Message'), | ||
HttpRequest.metadataPropertyNames = ['encrypted', 'cert', 'key', 'ca']; | ||
HttpRequest.propertyNames = Message.propertyNames.concat(HttpRequest.metadataPropertyNames).concat(RequestLine.propertyNames).concat(['requestLine']); | ||
util.inherits(HttpRequest, Message); | ||
@@ -16,4 +20,2 @@ | ||
HttpRequest.metadataPropertyNames = ['encrypted', 'cert', 'key', 'ca']; | ||
HttpRequest.prototype.populate = function (obj) { | ||
@@ -20,0 +22,0 @@ if (obj && typeof obj === 'object' && (typeof Buffer === 'undefined' || !Buffer.isBuffer(obj))) { |
@@ -10,2 +10,4 @@ var Message = require('./Message'), | ||
HttpResponse.propertyNames = Message.propertyNames.concat(StatusLine.propertyNames).concat(['statusLine']); | ||
util.inherits(HttpResponse, Message); | ||
@@ -12,0 +14,0 @@ |
@@ -26,2 +26,4 @@ /*global unescape, btoa, atob*/ | ||
Message.propertyNames = ['headers', 'body', 'unchunkedBody', 'rawBody', 'parts', 'fileName', 'isJson', 'isMultipart', 'boundary', 'charset']; | ||
Message.prototype.isMessyMessage = true; | ||
@@ -28,0 +30,0 @@ |
{ | ||
"name": "messy", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "Object model for HTTP and RFC822 messages", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -6,6 +6,6 @@ messy | ||
[![NPM version](https://badge.fury.io/js/messy.png)](http://badge.fury.io/js/messy) | ||
[![Build Status](https://travis-ci.org/papandreou/messy.png)](https://travis-ci.org/papandreou/messy) | ||
[![Coverage Status](https://coveralls.io/repos/papandreou/messy/badge.png)](https://coveralls.io/r/papandreou/messy) | ||
[![Dependency Status](https://david-dm.org/papandreou/messy.png)](https://david-dm.org/papandreou/messy) | ||
[![NPM version](https://badge.fury.io/js/messy.svg)](http://badge.fury.io/js/messy) | ||
[![Build Status](https://travis-ci.org/papandreou/messy.svg?branch=master)](https://travis-ci.org/papandreou/messy) | ||
[![Coverage Status](https://coveralls.io/repos/papandreou/messy/badge.svg)](https://coveralls.io/r/papandreou/messy) | ||
[![Dependency Status](https://david-dm.org/papandreou/messy.svg)](https://david-dm.org/papandreou/messy) | ||
@@ -12,0 +12,0 @@ License |
@@ -211,2 +211,17 @@ /*global describe, it*/ | ||
}); | ||
describe('with an application/json body that does not parse as JSON', function () { | ||
var message = new Message({ | ||
headers: { 'Content-Type': 'application/json' }, | ||
unchunkedBody: '!!=!=' | ||
}); | ||
it('should leave unchunkedBody as-is', function () { | ||
expect(message.unchunkedBody, 'to equal', '!!=!='); | ||
}); | ||
it('should provide body as a string', function () { | ||
expect(message.body, 'to equal', '!!=!='); | ||
}); | ||
}); | ||
}); | ||
@@ -339,3 +354,3 @@ | ||
'\r\n' | ||
).unchunkedBody, 'to equal', 'Wikipedia in\r\n\r\nchunks.') | ||
).unchunkedBody, 'to equal', 'Wikipedia in\r\n\r\nchunks.'); | ||
}); | ||
@@ -342,0 +357,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134705
2804