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

unexpected-mitm

Package Overview
Dependencies
Maintainers
3
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected-mitm - npm Package Compare versions

Comparing version 7.5.0 to 7.5.1

6

lib/unexpectedMitm.js

@@ -154,2 +154,7 @@ /* global setImmediate, after, console */

}
expectedRequestProperties.host = expectedRequestProperties.host || urlObj.hostname;
if (urlObj.port && typeof expectedRequestProperties.port === 'undefined') {
expectedRequestProperties.port = parseInt(urlObj.port, 10);
}
if (urlObj.protocol === 'https:' && typeof expectedRequestProperties.encrypted === 'undefined') {

@@ -560,3 +565,2 @@ expectedRequestProperties.encrypted = true;

var mockRequest = new messy.HttpRequest(requestProperties);
function assertMockResponse(mockResponse, callback) {

@@ -563,0 +567,0 @@ var httpExchange = new messy.HttpExchange({request: mockRequest, response: mockResponse});

2

package.json
{
"name": "unexpected-mitm",
"version": "7.5.0",
"version": "7.5.1",
"description": "Unexpected plugin for the mitm library",

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

@@ -309,2 +309,6 @@ /*global describe, it, __dirname, beforeEach, afterEach, setTimeout, setImmediate*/

'Connection: keep-alive\n' +
"// host: expected 'www.google.com' to equal 'www.example.com'\n" +
'//\n' +
'// -www.google.com\n' +
'// +www.example.com\n' +
'\n' +

@@ -1008,3 +1012,3 @@ 'HTTP/1.1 200 OK'

return expect({
url: 'GET http://localhost:123/',
url: 'GET http://localhost/',
port: 456,

@@ -1016,3 +1020,3 @@ headers: {

request: {
url: 'http://localhost:123/',
url: 'http://localhost/',
headers: {

@@ -1019,0 +1023,0 @@ Host: 'foobar:567'

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