           if err?
             puts inspect err
             respond 500, err.toString()
-          else respond 200, JSON.stringify [fields, files]
+          else respond 200, JSON.stringify {fields, files}
     when 'PUT'  then countRequestBodyBytes (err, count) ->
       if err? then respond 500, err.toString()
       else respond 201, "Sweet. You uploaded #{count} bytes"

      'should have byte count': (res) -> assert.include res.body, '278055'
    
    'POST /upload': requestUploadMultipart.respondsWith 200

  .addBatch
    'stop test server':


requestUploadMultipart = vh.buildRequest "localhost:#{testPort}",
  headers: {'Content-Type': "multipart/form-data; boundary=#{mimeBoundary}"}
  bodyFromFile: "./fixtures/multipart-form-upload"

vows.describe('Vows HTTP macros')
  
