PUBDEV-2: Same fix and unit tests as in HEX-1819.
Merge branch 'master' of https://github.com/0xdata/h2o-dev