Skip to content

Can't specify custom agents #81

Open
@8bitDesigner

Description

@8bitDesigner

This, I'll admit is a pretty niche feature, but due to some broken SSL handling on Facebook's end, in order to successfully pass requests back and forth with Facebook, you need to force SSL v3.

Bug report here: https://developers.facebook.com/bugs/213367445404472/?browse=search_4eeccca164bbe6357503363

That's easily enough done if I could specify a custom agent like so:

var request = restler.get(
  'https://graph.facebook.com/oauth/access_token', 
  { query:params, agent: new https.Agent({secureProtocol: 'SSLv3_method'}) }
);

This could safely default to "undefined", which uses Node's global agent (see bottom section on agents here: http://nodejs.org/docs/latest/api/https.html#https_https_request_options_callback)

  this.request = proto.request({
    host: this.url.hostname,
    port: this.url.port,
    path: this._fullPath(),
    method: this.options.method,
    headers: this.headers,
    agent: this.options.agent // undefined? cool. An agent object? also cool
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions