* Electron version: 1.8.2-beta.3
* Operating system: MacOS 10.12

### Expected behavior

File downloads from custom protocols should complete without issue.

### Actual behavior

Before even triggering the custom protocol handler, the download-item emits 'done' with a state of 'interrupted'. In my demo linked below, I use the new registerStreamProtocol, but I was able to reproduce using registerHttpProtocol as well.

### How to reproduce

Use https://github.com/pfrazee/electron-download-interrupt-bug

atom/browser/net/atom_url_request.cc
}
    if (buffer)
      
      chunked_stream_writer_->AppendData(buffer->data(), buffer->size(),
                                         is_last);
    else if (is_last)
      
      chunked_stream_writer_->AppendData(nullptr, 0, true);
    if (first_call) {
      request_->Start();
    }
  } else {
    if (buffer) {
      
      using internal::UploadOwnedIOBufferElementReader;
      auto element_reader =
          UploadOwnedIOBufferElementReader::CreateWithBuffer(std::move(buffer));
      upload_element_readers_.push_back(
          std::unique_ptr<net::UploadElementReader>(element_reader));
    }
    if (is_last) {
      auto elements_upload_data_stream = new net::ElementsUploadDataStream(
          std::move(upload_element_readers_), 0);
      request_->set_upload(
          std::unique_ptr<net::UploadDataStream>(elements_upload_data_stream));
      request_->Start();
    }
  }
}
void AtomURLRequest::DoCancel() {