If headers are not ser the response emits notices.

Put extra check into the file.

The missing headers is caused when using ftp as protocol.