Skip to content
Myr

Misc refactoring to multi-part handling

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

authored by visionmedia · committed by visionmedia · parent 21566c4 · Browse files · 1 file+4 added−5 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+4 added−5 removed

  • other:+4 added−5 removed

1 file+4 added−5 removed

modified:lib/express/core.js+4 added-5 removed
207 unmodified lines
208 require('http')209 .createServer(function(request, response){210 request.body = ''211 request.setBodyEncoding('binary')212 var pendingFiles = 0212 function callback(e, result) {214 if (!e) {215 if (!pendingFiles) self.route(request, response)216 }217 else213 if (e)214 self.error(e, request, response)215 else if (!pendingFiles)216 self.route(request, response)217 }218 if (request.headers['content-type'] &&219 request.headers['content-type'].indexOf('multipart/form-data') !== -1) {220 var stream = multipart.parse(request)221 var pendingFiles = 0222 request.params = { post: {}}223 stream224 .addListener('partBegin', function(part) { 225 if (part.filename)
111 unmodified lines