DESCRIPTION

JVMCBC-197: have keys passed in separately for ViewQuery

(backported form commit 3d1d0ab)

Motivation
----------
Recently, a change was made so that the core switches to POST when it
detects that a View query is too large. Body of the post is the keys
parameters (the only one allowed, and also the most probable culprit for
size), extracted for url and set as JSON.
Only problem is that the client url-encodes the keys, which isn't valid
when contained in JSON, so it fails in production.

Modifications
-------------
The ViewQueryRequest was changed to force getting the keys array as a
separate JSON string, not part of the "query" url.

ViewHandler now uses this separate info to decide if a switch to POST
should be made (in which case it injects the keys String into the JSON
object of the body) or if GET is still doable (in which case it encodes
the keys array via URLEncoder).

Added tests to validate this behavior and the ways the URL is built from
both query() and keys() (in the case of the GET).

Results
-------
Keys are now properly encoded by the core directly and work either in a
GET or a PUT.
No more JSON syntax error when querying a view with a large set of keys.

Change-Id: I2ab356e38b836b49ff87b113fc95b6b2d5c4904b


COMMENTS

author: Estrella Humphrey
date: 2015-05-11 12:47:42.377000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2015-05-11 12:59:34.599000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2015-05-11 13:00:14.635000000

Patch Set 1: -Code-Review

-------------------------------------
author: Estrella Humphrey
date: 2015-05-11 13:46:47.542000000

Abandoned

bad backport wrong branch

-------------------------------------
