Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1511

Use POST when requesting a View

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.8
    • Fix Version/s: 2.5.1
    • Component/s: library
    • Labels:
      None

      Description

      From https://forums.couchbase.com/t/getview-need-http-post-instead-of-http-get/1743:

      When executing a call extremely similar to the one below I receive the error "Invalid URI: The Uri string is too long".

      Code snippet:

      CouchbaseClient client;
      client.GetView<SomeDataModel>("DesignName", "ViewName", true)
      .Stale(StaleMode.False)
      .Reduce(true)
      .StartKey<object[]>(["someString", 0, "", "", "", 0, ""])
      .EndKey<object[]>(["someString", 9999, "zzzzzzzzzzzzzzzzzzzz", "zzzzzzzzzzzzzzzzzzzz", "zzzzzzzzzzzzzzzzzzzz", 999999999, "zzzzzzzzzzzzzzzzzzzz"]);

      If I remove the Start Key and End Key limiters the view will successfully return so I presume that an HTTP GET is being performed and the length of the keys are causing the issue. I used 20 "z"s to represent how long the data could be. For a literal end when there isn't a value specified of course "{" would work, but when values are specified for the strings could be 20 characters long, or possibly even longer.

        Attachments

          Issue Links

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

            Activity

            Hide
            mike.goldsmith Michael Goldsmith added a comment -

            Having some trouble regarding CI integration tests after changing view request to POST. Can't replicate locally.

            Show
            mike.goldsmith Michael Goldsmith added a comment - Having some trouble regarding CI integration tests after changing view request to POST. Can't replicate locally.

              People

              • Assignee:
                mike.goldsmith Michael Goldsmith
                Reporter:
                jmorris Jeff Morris
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.