Skip to content
Myr

Finished https support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 72511ea · Browse files · 2 files+21 added−69 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+21 added−69 removed

  • other:+21 added−69 removed

2 files+21 added−69 removed

modified:lib/http.js+20 added-15 removed
7 unmodified lines
8/**9 * Module dependencies.10 */1112var queryString = require('querystring')12var qs = require('qs')13 , connect = require('connect')14 , router = connect.router15 , methods = router.methods.concat(['del', 'all'])16 , view = require('./view')
7 unmodified lines
24 * @api public25 */2627var Server = exports = module.exports = function HTTPServer(middleware){28 connect.HTTPServer.call(this, []);29 this.init(middleware);30};3132/**33 * Inherit from `connect.HTTPServer`.34 */3536Server.prototype.__proto__ = connect.HTTPServer.prototype;3738/**39 * Initialize the server.40 *41 * @param {Array} middleware42 * @api private43 */4445Server.prototype.init = function(middleware){46 var self = this;47 this.settings = {};48 this.redirects = {};49 this.isCallbacks = {};50 this.viewHelpers = {};51 this.dynamicViewHelpers = {};52 this.errorHandlers = [];35 connect.HTTPServer.call(this, []);5354 // Default "home" to / 55 this.set('home', '/');56
10 unmodified lines
67 req.next = next;68 // Assign req.params.get69 if (req.url.indexOf('?') > 0) {70 var query = url.parse(req.url).query;54 req.query = exports.parseQueryString(query);71 req.query = qs.parse(query);72 }73 next();74 });75
17 unmodified lines
93 });94};9596/**80 * Inherit from `connect.HTTPServer`.81 */8283Server.prototype.__proto__ = connect.HTTPServer.prototype;8485/**86 * Support swappable querystring parsers.87 */8889exports.parseQueryString = queryString.parse;9091/**97 * Proxy in order to register error handlers.98 */99100Server.prototype.listen = function(){
363 unmodified lines
modified:lib/https.js+1 added-54 removed