minor fixes for HttpCodec
add file output test in TestHttpServer