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

messy

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

messy - npm Package Compare versions

Comparing version 6.3.0 to 6.3.1

2

lib/HttpRequest.js

@@ -65,3 +65,3 @@ /*global btoa*/

if (fragments.length > 0) {
var matchUrl = fragments[0].match(/^(https?:)\/\/(?:([^:@\/]+(?::[^@\/]+?))@)?((?:[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?\.)+[a-z][\-a-z]*[a-z]|(?:(?:[0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}(?:[0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5]))(:\d{1,5})?(\/[\w\-\.~%!$&'\(\)*+,;=:@\/]*(?:\?[\w\-\.~%!$&'\(\)*+,;=:@\/?]*)?(?:#[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*)?)?$/);
var matchUrl = fragments[0].match(/^(https?:)\/\/(?:([^:@\/]+(?::[^@\/]+?))@)?((?:[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?\.)*[a-z][\-a-z]*[a-z]|(?:(?:[0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}(?:[0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5]))(:\d{1,5})?(\/[\w\-\.~%!$&'\(\)*+,;=:@\/]*(?:\?[\w\-\.~%!$&'\(\)*+,;=:@\/?]*)?(?:#[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*)?)?$/);
if (matchUrl) {

@@ -68,0 +68,0 @@ var protocol = matchUrl[1],

{
"name": "messy",
"version": "6.3.0",
"version": "6.3.1",
"description": "Object model for HTTP and RFC822 messages",

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

@@ -180,2 +180,15 @@ /*global describe, it*/

describe('with a url passed in the request line', function () {
it('should support a localhost url', function () {
var httpRequest = new HttpRequest('GET http://localhost:3000/');
expect(httpRequest.headers.get('Host'), 'to equal', 'localhost:3000');
expect(httpRequest.host, 'to equal', 'localhost');
expect(httpRequest.port, 'to equal', 3000);
});
it('should support a url with an IP address', function () {
var httpRequest = new HttpRequest('GET http://99.88.77.66/');
expect(httpRequest.headers.get('Host'), 'to equal', '99.88.77.66');
expect(httpRequest.host, 'to equal', '99.88.77.66');
});
it('should set the Host header', function () {

@@ -182,0 +195,0 @@ var httpRequest = new HttpRequest('GET http://foo.com/');

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