Skip to content
Myr

Fix the form post to work with firefox.

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

The request object was making the assumption that the content-type header was an exact match for 'application/x-www-form-urlencoded' this is not always the case :) ... for example in firefox the header value looks like 'application/x-www-form-urlencoded; charset=UTF-8'

authored by ciaranj · committed by ciaranj · parent b75e1ee · Browse files · 1 file+1 added−1 removed
This commit

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/express/request.js+1 added-1 removed
99 unmodified lines
100 this.plugins = $(Express.plugins).map(function(plugin){101 return new plugin.klass(plugin.options) 102 })103 this.uri.post = 104 this.header('content-type') == 'application/x-www-form-urlencoded' ?104 this.header('content-type') !== undefined && this.header('content-type').indexOf('application/x-www-form-urlencoded')> -1 ?105 parseParams(this.body) :106 {}107 },108
131 unmodified lines