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

connect-modrewrite

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-modrewrite - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

4

index.js

@@ -7,3 +7,3 @@

var url = require('url')
, querystring = require('querystring')
, qs = require('qs')
, httpReq = require('http').request

@@ -117,3 +117,3 @@ , httpsReq = require('https').request

if(queryValue) {
req.params = req.query = querystring.parse(queryValue[1]);
req.params = req.query = qs.parse(queryValue[1]);
}

@@ -120,0 +120,0 @@

{
"name": "connect-modrewrite",
"main": "./index.js",
"version": "0.7.6",
"version": "0.7.7",
"description": "connect-modrewrite adds modrewrite functionality to connect/express server",

@@ -29,2 +29,5 @@ "author": {

],
"dependencies": {
"qs": "^0.6.6"
},
"devDependencies": {

@@ -31,0 +34,0 @@ "grunt-contrib-jshint": "^0.8.0",

@@ -26,2 +26,21 @@

describe('Connect-modrewrite', function() {
describe('query params', function() {
it('should keep nested query parameters', function() {
var middleware = modRewrite(['/a /b [L]', '/a /c']);
var req = {
connection : { encrypted : false },
header : function() {},
headers : { host : 'test.com' },
url : '/d?foo[0]=bar&foo[1]=baz&q'
};
var res = {
writeHead : function() {},
end : function() {}
};
var next = function() {};
middleware(req, res, next);
expect(req.query).to.deep.equal({foo: ['bar','baz'], q: ''});
});
});
describe('non-match', function() {

@@ -28,0 +47,0 @@ it('should leave the url unrewritten if there is no match', function() {

Sorry, the diff of this file is not supported yet

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