Permalink
Browse files

move request.data and request.files away from proto

  • Loading branch information...
1 parent e893d5c commit 3bdfe3b06e469573545c90fc8bb292720d89cbc5 @Shogun147 committed Dec 12, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −0 lib/katana.js
  2. +0 −3 lib/request.js
View
@@ -245,6 +245,8 @@ App.handleRequest = function(request, response) {
request.parsedUrl = Url.parse(request.url);
request.path = sanitize(request.parsedUrl.pathname).trim('\\s\/');
request.query = request.parsedUrl.query ? parseQuery(request.parsedUrl.query) : {};
+ request.data = {};
+ request.files = {};
if (staticsEnabled && (Path.normalize(request.path) + '/').indexOf(staticsPath) === 0) {
return Static.serve(request, response);
View
@@ -55,9 +55,6 @@ request.__defineSetter__('body', function(value) {
return this.data = value;
});
-request.data = {};
-request.files = {};
-
request.get = request.header = function(name) {
name = name.toLowerCase();
if (name==='referer' || name==='referrer') {

0 comments on commit 3bdfe3b

Please sign in to comment.