Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1705

Update Function does not parse multipart/form-data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.2.1, 1.6.1
    • None
    • JavaScript View Server
    • None

    Description

      I have a design doc and update handler.

      function(doc, req) {
      log(req);
      var newdoc = {};
      ...
      return [newdoc, {
      code: 200,
      body: req.uuid
      }];
      }

      I made a HTML file with the following form

      <form action="http://localhost:5984/db/_design/app/_update/crashreport" method="POST" enctype="multipart/form-data">
      <input type="text" name="classname"/><br>
      <input type="Submit">
      </form>

      In the log file I can see that POST request body exists, but was not parsed:

      { "body" : "-----WebKitFormBoundaryE6xRBni3g8MNw14P\r\nContent-Disposition: form-data; name=\"classname\"\r\n\r\nABC\r\n----WebKitFormBoundaryE6xRBni3g8MNw14P-\r\n",
      "form" : { },
      ...

      Attachments

        1. base64.patch
          0.7 kB
          Anthony Ananich
        2. base64_fixed.patch
          1 kB
          Alexander Fedorenchik

        Activity

          People

            Unassigned Unassigned
            antonio7 Anthony Ananich
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: