Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-126

SDK doesn't encode spaces properly on View query

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1-dp3
    • Fix Version/s: 1.1-dp4
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None

      Description

      From the forums:

      Using 2.0b and the Java API 1.1 preview, there appears to be a bug when doing a query with a key that has internal whitespace:
      INFO CouchbaseClient - lookin for:/default/_design/accounts/_view/acc_by_username?limit=1000&skip=0&key="aaron davidson"
      ERROR java.lang.RuntimeException: Failed to access the view
      at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:591)
      ...
      If I manually replace the query string "aaron davidson" with "aaron%20davidson" the query works and no exception is thrown. The API should probably handle this case when constructing the RESTful URL.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Show
        daschl Michael Nitschinger added a comment - http://review.couchbase.org/#/c/21423/
        Hide
        daschl Michael Nitschinger added a comment -

        Fixed in master and will be available in dp4

        Show
        daschl Michael Nitschinger added a comment - Fixed in master and will be available in dp4

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            daschl Michael Nitschinger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes