[http] move generic code
[mempool] fix warning compilation