prepare for http.stream