Summary: ^ Before this change, the client assumed the host and port came from location.host which is fine on the browser. In all other cases, that object/properties may be undefined. As such, add host and port as function args and use that instead. Reviewed By: passy Differential Revision: D36440423 fbshipit-source-id: 5f931f1d610d583db6a2e549e1213585f0d03dee