React on HTTP level errors in view request
React on HTTP level errors in view request

Couchbase server DP4 allows unauthorized requests to views, but forbids ones
with valid Authorization header. It means that previous version of the ruby
client (more precisely underlying libcouchbase) works well with DP4 build
because it doesn't send Authorization header. But it will not work with
recent servers where the auth header is required for views.

Without this patch the client just hangs awaiting for completion and skips
the error.

Change-Id: I7d580002554b0950cee06e16b3eb11737514163a
Reviewed-on: http://review.couchbase.org/19436
Tested-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Reviewed-by: Matt Ingenthron <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@couchbase.com>

dewolfe/couchbase-ruby-client,dewolfe/couchbase-ruby-client