mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Replace deprecated connect.utils.parseUrl() with parseurl module
As recommended in the deprecation warning, we replace connect.utils.parseUrl() usage with using the parseurl module directly.
This commit is contained in:
3
packages/webapp/.npm/package/npm-shrinkwrap.json
generated
3
packages/webapp/.npm/package/npm-shrinkwrap.json
generated
@@ -334,6 +334,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"parseurl": {
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"send": {
|
||||
"version": "0.13.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -4,6 +4,7 @@ Package.describe({
|
||||
});
|
||||
|
||||
Npm.depends({connect: "2.30.2",
|
||||
parseurl: "1.3.0",
|
||||
send: "0.13.0",
|
||||
useragent: "2.0.7"});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ var url = Npm.require("url");
|
||||
var crypto = Npm.require("crypto");
|
||||
|
||||
var connect = Npm.require('connect');
|
||||
var parseurl = Npm.require('parseurl');
|
||||
var useragent = Npm.require('useragent');
|
||||
var send = Npm.require('send');
|
||||
|
||||
@@ -326,7 +327,7 @@ WebAppInternals.staticFilesMiddleware = function (staticFiles, req, res, next) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
var pathname = connect.utils.parseUrl(req).pathname;
|
||||
var pathname = parseurl(req).pathname;
|
||||
try {
|
||||
pathname = decodeURIComponent(pathname);
|
||||
} catch (e) {
|
||||
@@ -697,7 +698,7 @@ var runWebAppServer = function () {
|
||||
}
|
||||
|
||||
// /packages/asdfsad ... /__cordova/dafsdf.js
|
||||
var pathname = connect.utils.parseUrl(req).pathname;
|
||||
var pathname = parseurl(req).pathname;
|
||||
var archKey = pathname.split('/')[1];
|
||||
var archKeyCleaned = 'web.' + archKey.replace(/^__/, '');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user