- 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.h
public net::URLFetcherDelegate,
                           public brightray::URLRequestContextGetter::Delegate {
 public:
  URLRequestFetchJob(net::URLRequest*, net::NetworkDelegate*);
  
  void HeadersCompleted();
  int DataAvailable(net::IOBuffer* buffer, int num_bytes);
 protected:
  
  void BeforeStartInUI(v8::Isolate*, v8::Local<v8::Value>) override;
  void StartAsync(std::unique_ptr<base::Value> options) override;
  
  void Kill() override;
  int ReadRawData(net::IOBuffer* buf, int buf_size) override;
  bool GetMimeType(std::string* mime_type) const override;
  void GetResponseInfo(net::HttpResponseInfo* info) override;
  int GetResponseCode() const override;
  
  void OnURLFetchComplete(const net::URLFetcher* source) override;
 private:
  scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
  std::unique_ptr<net::URLFetcher> fetcher_;
  scoped_refptr<net::IOBuffer> pending_buffer_;
  int pending_buffer_size_;
  std::unique_ptr<net::HttpResponseInfo> response_info_;
  DISALLOW_COPY_AND_ASSIGN(URLRequestFetchJob);
};
}  
#endif