Support mjpeg streams that don't provide a Content-Length. Refactor and comment for readability.