Merge pull request #120 from NiteshKant/master

Fix for issue #117 #114 #113 #88
Merge pull request #122 from NiteshKant/master

README for contexts module
Merge pull request #123 from NiteshKant/master

Adding more debugging to context propagation test.
Merge pull request #124 from NiteshKant/master

Bumping the version.
[Gradle Release Plugin] - new version commit:  '0.3.6'.
Correcting the release version
Fixes issue #126

HttpServer now handles HTTP 1.0 requests as per the spec.
Fix for issue #126 was wrong.

HttpServerResponse.close() was asserting the transfer encoding to add LastHttpContent.
The transfer encoding was getting added in ServerRequestResponseConverter.
In cases, when close() is NOT invoked from the eventloop of the server, there is a race-condition
between when the transfer encoding is updated (in the handler) and when close() asserts the same as
the handler is invoked in a different thread (server eventloop) than close()

Also added some testcases for this scneario.

Bug fix
Making the rfc 2145 compliance optional.

http://tools.ietf.org/html/rfc2145#section-2.3 says that a HTTP 1.1 compliant server should always send a 1.1 response.
However, some clients (apache bench) can not gracefully handle 1.1 responses. Thus making this optional on the HTTPServerBuilder.
Merge pull request #128 from NiteshKant/master

Fixes issue #126
Fixing HTTP redirects.

The redirect loop & too many redirect detection was broken as every redirect was creating a new RedirectOperator instance hence loosing the context.
Now, disabling further redirects for redirected requests. The further redirects are taken care by the RedirectOperator itself.
Fixes issue #130

The LastHttpContent was not sent for Keep-alive requests with no chunked encoding.
Global EventLoopProvider can be configured now to specify the number of eventloops.
Fixes issue #129

The issue here was that as part of sending (onNext()) the first response (redirect response), we were submitting the redirect request.
If the connection is reused (for connection pool), it resets the content subject (reacting to ConnectionReuseEvent) in ClientRequestResponseConverter.
The ClientRequestResponseConverter was referring to the "current content subject" while invoking an onComplete(), which is invoked when the content on the first response is over.
Now, in the above situation, since the content subject is changed between processing headers and processing content (in the same method), the onComplete() is called on the content subject of the second response and not the first as it is expected.

The fix is two folds:

1) Move the redirect call in RedirectOperator to onComplete()/onError() of the first observer.
2) In ClientRequestResponseConverter use the subject that was present when the channelRead() was received and do not refer to the instance level state of the subject.

From the perspective of this bug, 1) is sufficient but 2) is the correct way of handling the shared state.
Adding some debug to flaky context propagation tests
Fixing Context test state cleanup

ServerHandlerTest was not clearing thread local state after the run.
This was occassionally causing (based on the order of the run) other tests to get the polluted thread state.
Merge pull request #132 from NiteshKant/master

Fixes issues #129 #130 #131
Minor client changes.

1) Modified RxClientImpl.connect() to do a take(1) on the underlying source so that in no case it will emit two onNext().
2) Modified RequestProcessingOperator to use SubscriptionList instead of CompositeSubscription. Instead of creating a new subscription on every onNext(), it is done once and used by the subscriber.
3) Provided an override to remove all connection pooling for a client.
Updated Changes.md with maven artifact links.
Merge branch 'master' of https://github.com/Netflix/RxNetty into metrics