CouchDB
  1. CouchDB
  2. COUCHDB-317

Badmatch error if _replicate target starts with slash

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 1.3
    • Component/s: Replication
    • Labels:
      None
    • Environment:

      svn r761188

    • Skill Level:
      New Contributors Level (Easy)

      Description

      Giving a replication source or target which starts with a slash gives an Erlang barf error. (The wiki at http://wiki.apache.org/couchdb/Replication said that this slash was necessary. I will fix the wiki, but the error is still unsightly)

      $ curl -X POST -d '

      {"source":"/foo","target":"/bar"}

      ' http://127.0.0.1:5984/_replicate
      {"error":"case_clause","reason":"{error,{badmatch,{error,illegal_database_name,\n [

      {couch_rep,init,1}

      ,\n

      {gen_server,init_it,6}

      ,\n

      {proc_lib,init_p,5}

      ]},\n {child,undefined,\"7898c2bfbbcf8adbb305371e6c3c949e\",\n {gen_server,start_link,\n [couch_rep,\n [\"7898c2bfbbcf8adbb305371e6c3c949e\",\n {local,<<\"/foo\">>,{user_ctx,null,[<<\"_admin\">>]}},\n {local,<<\"/bar\">>,\n {user_ctx,null,[<<\"_admin\">>]}}],\n []]},\n transient,1,worker,\n [couch_rep]}}}"}

      1. replicate-slash-fix-v2.patch
        1 kB
        Joan Touzet
      2. replicate-slash-fix.patch
        0.5 kB
        Joan Touzet

        Activity

        Brian Candler created issue -
        Adam Kocoloski made changes -
        Field Original Value New Value
        Fix Version/s 0.11 [ 12313841 ]
        Component/s Replication [ 12313107 ]
        Noah Slater made changes -
        Fix Version/s 0.12 [ 12314314 ]
        Fix Version/s 0.11 [ 12313841 ]
        Paul Joseph Davis made changes -
        Skill Level New Contributors Level (Easy)
        Jan Lehnardt made changes -
        Fix Version/s 1.2 [ 12315198 ]
        Fix Version/s 0.12 [ 12314314 ]
        Jan Lehnardt made changes -
        Fix Version/s 1.3 [ 12318350 ]
        Fix Version/s 1.2 [ 12315198 ]
        Joan Touzet made changes -
        Attachment replicate-slash-fix.patch [ 12566631 ]
        Joan Touzet made changes -
        Assignee Joan Touzet [ wohali ]
        Joan Touzet made changes -
        Attachment replicate-slash-fix-v2.patch [ 12566632 ]
        Jan Lehnardt made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jan Lehnardt made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Joan Touzet
            Reporter:
            Brian Candler
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development