* Electron version: 1.6.1
* Operating system: macOS 10.12.3, Windows 7 64bit

### Expected behavior

Should emit an error on the request object.

### Actual behavior

<img width="420" alt="image" src="https://cloud.githubusercontent.com/assets/99662/23713890/4e9b8f52-041f-11e7-9dfb-e8408bb58670.png">

An uncatchable error happens.

### How to reproduce
```bash
git clone https://github.com/arantes555/electron-net-encoding-testcase.git
cd electron-net-encoding-testcase
npm install
npm start
```

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() {