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

Content-Encoding on requests is ignored; should decode or return 415

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • HTTP Interface
    • None

    Description

      CouchDB (as of 1.4) seems to ignore the "Content-Encoding" header on requests, and just parses the request body with no decoding. This causes incorrect behavior — most often it tries to parse the encoded data as JSON and will fail and return 400.

      CouchDB should either decode the request body (e.g. unzip it), or else return a 415 status. Decoding would be quite useful: requests with large JSON bodies (like revs_diff or the POST form of all_docs) can have their size cut in half by gzip encoding.

      HTTP 1.1 spec for Content-Encoding:
      http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11

      Attachments

        Activity

          People

            Unassigned Unassigned
            snej Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: