CouchDB
  1. CouchDB
  2. COUCHDB-882

Nonstandard HTTP methods not converted to JSON correctly

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: HTTP Interface
    • Labels:
      None
    • Environment:

      Erlang R13, Linux

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Since COUCHDB-815, CouchDB allows nonstandard or unknown HTTP methods in case a _show or similar function may want to implement a response to that method.

      Unfortunately the (my) patch in that ticket used couch_util:to_existing_atom which returns the passed value unmodified if it has no corresponding atom. That is wrong because the HTTP method will be copied into the `req` object in the view server, therefore it must not be an Erlang string (list of integers) because those do not JSONify correctly. Instead, if the atom does not exist, the method should be converted to a binary.

        Activity

        Jason Smith created issue -
        Jason Smith made changes -
        Field Original Value New Value
        Attachment 0001-For-unknown-HTTP-methods-Use-a-binary-for-httpd.meth.patch [ 12454071 ]
        Jason Smith made changes -
        Paul Joseph Davis made changes -
        Skill Level Regular Contributors Level (Easy to Medium)
        Jan Lehnardt made changes -
        Fix Version/s 1.2 [ 12315198 ]
        Fix Version/s 1.0.1 [ 12315197 ]
        Jan Lehnardt made changes -
        Fix Version/s 1.3 [ 12318350 ]
        Fix Version/s 1.2 [ 12315198 ]
        Jan Lehnardt made changes -
        Fix Version/s 1.3 [ 12318350 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development