Fix problem with HTTP resource streaming not writing temp file correctly, continued.