Skip to content

Instantly share code, notes, and snippets.

@juliocesar
Created December 16, 2009 23:40
Show Gist options
  • Save juliocesar/258345 to your computer and use it in GitHub Desktop.
Save juliocesar/258345 to your computer and use it in GitHub Desktop.
diff --git a/lib/express/request.js b/lib/express/request.js
index 3f08f4f..62460af 100644
--- a/lib/express/request.js
+++ b/lib/express/request.js
@@ -101,7 +101,7 @@ exports.Request = Class({
return new plugin.klass(plugin.options)
})
this.uri.post =
- this.header('content-type') == 'application/x-www-form-urlencoded' ?
+ /^application\/x-www-form-urlencoded/.test(this.header('content-type')) ?
parseParams(this.body) :
{}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment