Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move request.data and request.files away from proto

  • Loading branch information...
commit 3bdfe3b06e469573545c90fc8bb292720d89cbc5 1 parent e893d5c
Grigore Dutcovici authored
Showing with 2 additions and 3 deletions.
  1. +2 −0  lib/katana.js
  2. +0 −3  lib/request.js
2  lib/katana.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);
3  lib/request.js
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') {
Please sign in to comment.
Something went wrong with that request. Please try again.