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

"content-type" header behavior from external processes is poorly defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.11
    • 0.11
    • Infrastructure
    • None
    • CentOS5.3, Erlang R12

    Description

      When returning headers from an external process, the behavior depends on capitalization, and is radically different in each case.

      Consider the external process return

      a: { "code":200, "json":

      { "hello":"world" }

      , "headers": {} }.

      If returned as (a), the server serves

      { "hello":"world" }

      with header "Content-Type: application/json".

      If the json is modified to

      b: { "code":200, "json":

      { "hello":"world" }

      , "headers":

      {"Content-type":"text/plain"}

      }
      c: { "code":200, "json":

      { "hello":"world" }

      , "headers":

      {"content-type":"text/plain"}

      }

      If returned as (b) or (c), the server serves

      { "hello":"world" }

      with header "Content-Type: text/plain, application/json".

      If the json is modified to

      d: c: { "code":200, "json":

      { "hello":"world" }

      , "headers":

      {"Content-Type":"text/plain"}

      }

      If returned as (d), the server serves

      { "hello":"world" }

      with header "Content-Type: text/plain".

      There should be one well defined behavior when a "content-type" header is returned from an external process.

      To reproduce this error, setup an external process and return json strings as specified above.

      Attachments

        1. ExternalProcesses.txt
          4 kB
          Christopher O'Connell

        Activity

          People

            kocolosk Adam Kocoloski
            whiteside Christopher O'Connell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: