From 505589a644186ca9ad0bb142d7dfd82414f2d97d Mon Sep 17 00:00:00 2001 From: Leroy Campbell Date: Fri, 15 Jan 2010 11:59:45 -0500 Subject: [PATCH] Updated for Node version 0.1.25 --- djangode.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/djangode.js b/djangode.js index 3f61197..d13dc59 100644 --- a/djangode.js +++ b/djangode.js @@ -1,6 +1,7 @@ var http = require('http'), sys = require('sys'), - posix = require('posix'); + posix = require('posix') + url = require('url'); function extname(path) { var index = path.lastIndexOf('.'); @@ -94,7 +95,7 @@ exports.makeApp = function(urls, options) { return function(req, res) { debuginfo.last_request = req; debuginfo.last_response = res; - var path = req.uri.path; + var path = url.parse(req.url)["pathname"]; var view = show_404; var args = [req, res]; for (var pair, i = 0; pair = compiled[i]; i++) {