HTTP requests after the first one on a connection were broken
Convert a stream_write to stream_write_bytes