DESCRIPTION

JVMCBC-391: Reset the reader index of content buffer on NMVB.

Motivation
----------
If underlying handlers (like SSL) are reading and modifying
the original content buffers, the retry logic doesn't work
well since it is expecting that the buffers are still
fully readable.

Modifications
-------------
We found that while the SSL handler doesn't touch the refcount
it modifies the reader index since it needs to read the content
for encryption purposes.

When a NMVB is returned we reset the reader index to allow the
content payload be reused again.

Result
------
When SSL is enabled and a NMVB shows up, the content is now
properly reusable and doesn't end up writing "empty" payloads
against the server

Change-Id: If269ccb7b2a78dd81633e209719b7dd59d79e46d
Reviewed-on: http://review.couchbase.org/73943
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Marques Ellis xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2017-02-28 15:51:07.747000000

Change has been successfully cherry-picked as f8f2d2f4a89ff0d40432bd80c6e26503258b6b5e by Natasha Sullivan

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