[1.8.x] fix issue #549

related to
https://github.com/AsyncHttpClient/async-http-client/issues/549