Fixes to unit tests of http protocol.