Page MenuHomePhabricator
Diviner libphutil Tech Docs PhutilHTTPEngineExtension

abstract class PhutilHTTPEngineExtension
libphutil Technical Documentation (Futures)

Extend HTTP behavior by injecting proxies or compromising SSL.

Tasks

Extension Information

  • abstract public function getExtensionName() — Human-readable name of this HTTP extension.

Configuring HTTP Behavior

Other Methods

Methods

abstract public function getExtensionName()

Human-readable name of this HTTP extension.

Return
stringHuman readable name.

public function shouldTrustAnySSLAuthorityForURI($uri)

Return true to disable SSL authority verification for a URI.

By default, certificates must be signed by a recognized authority and requests fail if the host provides an invalid certificate. You can override this behavior to accept any certificate (including self-signed certificates). Doing this compromises the security of SSL.

Parameters
PhutilURI$uri
Return
boolReturn `true` to disable authority verification.

public function shouldTrustAnySSLHostnameForURI($uri)

Return true to disable SSL hostname verification for a URI.

By default, certificates should be signed for the correct hostname, and requests fail if the host provides a certificate for a different hostname. You can override this behavior to accept any certificate, including certificates for a different host. Doing this compromises the security of SSL.

Parameters
PhutilURI$uri
Return
boolReturn `true` to disable hostname verification.

public function getHTTPProxyURI($uri)

Return a PhutilURI to proxy requests.

If some or all outbound HTTP requests must be proxied, you can return the URI for a proxy to use from this method.

Parameters
PhutilURI$uri
Return
null|PhutilURIProxy URI.

final public function getExtensionKey()

This method is not documented.
Return
wild

final public static function getAllExtensions()

This method is not documented.
Return
wild

final public static function getExtension($key)

This method is not documented.
Parameters
$key
Return
wild

final public static function requireExtension($key)

This method is not documented.
Parameters
$key
Return
wild

final public static function buildHTTPProxyURI($uri)

This method is not documented.
Parameters
PhutilURI$uri
Return
wild