serve command use memory stream and fix test
fix request factory for nginx