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

link-check

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-check - npm Package Compare versions

Comparing version 4.5.3 to 4.5.4

4

CHANGELOG.md
# Changes
## Version 4.5.4
* #35 fix encode by adding decode first
## Version 4.5.3

@@ -4,0 +8,0 @@

3

lib/proto/http.js

@@ -30,3 +30,4 @@ "use strict";

const options = {
uri: encodeURI(link),
// Decoding and encoding is required to prevent encoding already encoded URLs
uri: encodeURI(decodeURI(link)),
headers: {

@@ -33,0 +34,0 @@ // override 'User-Agent' (some sites return `401` when the user-agent isn't a web browser)

{
"name": "link-check",
"version": "4.5.3",
"version": "4.5.4",
"description": "checks whether a hyperlink is alive (200 OK) or dead",

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

@@ -127,2 +127,6 @@ 'use strict';

app.get('/url_\\(with_parentheses\\)', function (req, res) {
res.sendStatus(200);
});
const server = http.createServer(app);

@@ -476,2 +480,14 @@ server.listen(0 /* random open port */, 'localhost', function serverListen(err) {

it('should not encode already encoded characters', function(done) {
laterCustomRetryCounter = 0;
linkCheck(baseUrl + '/url_%28with_parentheses%29', function(err, result) {
console.log(err, result);
expect(err).to.be(null);
expect(result.err).to.be(null);
expect(result.status).to.be('alive');
expect(result.statusCode).to.be(200);
done();
});
});
});
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