- Electron version: 1.2.0
- Operating system: OS X

``` js
electron.protocol.registerStandardSchemes(['foobar', 'http', 'https']);

app.on('ready', function() {
  electron.protocol.registerHttpProtocol('foobar', (request, callback) => {
    const redirectPath = `http://www.google.com`;
    callback({ method: request.method, referrer: request.referrer, url: redirectPath });
  }, e => { if (e) { console.log(e); } });
});
```

A webview somewhere gets its src set to "foobar://baz", however a blank window appears. The page is perpetually in a load state, as only the `did-start-loading` and `did-get-response-details` events get triggered on the webview.

If I redirect to `http://localhost:{port}/foobar`, my server does receive the request and responds properly. However, the webview in electron is still blank. Loading that address in a different browser works as expected.

What am I missing? Is there something more I need to do to get `registerHttpProtocol` working?

atom/browser/net/url_request_fetch_job.cc
if (!pending_buffer_.get())
    return net::ERR_IO_PENDING;
  
  
  int bytes_read = std::min(num_bytes, pending_buffer_size_);
  memcpy(pending_buffer_->data(), buffer->data(), bytes_read);
  
  
  pending_buffer_ = nullptr;
  pending_buffer_size_ = 0;
  ReadRawDataComplete(bytes_read);
  return bytes_read;
}
void URLRequestFetchJob::Kill() {
  JsAsker<URLRequestJob>::Kill();
  fetcher_.reset();
}
int URLRequestFetchJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
  if (GetResponseCode() == 204) {
    request()->set_received_response_content_length(prefilter_bytes_read());
    return net::OK;
  }
  pending_buffer_ = dest;
  pending_buffer_size_ = dest_size;
  return net::ERR_IO_PENDING;
}
bool URLRequestFetchJob::GetMimeType(std::string* mime_type) const {