1 # namespace http\Client\Curl
3 The http\Client\Curl namespace holds option value constants specific to the curl driver of the http\Client.
9 2.1.0 | Added $dns_interface, $dns_local_ip4, $dns_local_ip6 and $expect_100_timeout options.
10 2.1.2 | Added request option constants:<br> http\Client\Curl\POSTREDIR_303,<br> http\Client\Curl\AUTH_SPNEGO,<br> http\Client\Curl\SSL_VERSION_TLSv1_0,<br> http\Client\Curl\SSL_VERSION_TLSv1_1 and<br> http\Client\Curl\SSL_VERSION_TLSv1_2
11 2.3.0 | Added $pinned_publickey, $ltsauth and $verifystatus $ssl options.<br>Added $proxyheader and $unix_socket_path options.<br>Added request option constants:<br>http\Client\Curl\HTTP_VERSION_2_0 and<br>http\Client\Curl\TLS_AUTH_SRP.
15 ### HTTP Protocol Version
18 Use HTTP/1.0 protocol version.
20 Use HTTP/1.1 protocol version.
22 Use HTTP/2 protocol version. Available if libcurl is v7.33.0 or more recent and was built with nghttp2 support.
24 Use any HTTP protocol version.
26 ### SSL Protocol Version
29 Use TLS v1.0 encryption.
31 Use TLS v1.1 encryption.
33 Use TLS v1.2 encryption.
35 Use any TLS v1 encryption.
37 Use SSL v2 encryption.
39 Use SSL v3 encryption.
46 Use TLS SRP authentication. Available if libcurl is v7.21.4 or more recent and was built with gnutls or openssl with TLS-SRP support.
57 ### Authentication Type
60 Use Basic authentication.
62 Use Digest authentication.
64 Use IE (lower v7) quirks with Digest authentication. Available if libcurl is v7.19.3 or more recent.
66 Use NTLM authentication.
68 Use GSS-Negotiate authentication.
70 Use HTTP Netgotiate authentication (SPNEGO, RFC4559). Available if libcurl is v7.38.0 or more recent.
72 Use any authentication.
74 ### Proxy Protocol Version
77 Use SOCKSv4 proxy protocol.
79 Use SOCKSv4a proxy protocol.
80 * PROXY_SOCKS5_HOSTNAME
81 Use SOCKS5h proxy protocol.
83 Use SOCKS5 proxy protoccol.
85 Use HTTP/1.1 proxy protocol.
87 Use HTTP/1.0 proxy protocol. Available if libcurl is v7.19.4 or more recent.
89 ### POST Redirection Behavior
92 Keep POSTing on 301 redirects. Available if libcurl is v7.19.1 or more recent.
94 Keep POSTing on 302 redirects. Available if libcurl is v7.19.1 or more recent.
96 Keep POSTing on 303 redirects. Available if libcurl is v7.19.1 or more recent.
98 Keep POSTing on any redirect. Available if libcurl is v7.19.1 or more recent.
103 The option names used here are more or less derived from the corresponding CURLOPT_* names.
107 The HTTP protocol version. See http\Client\Curl\HTTP_VERSION_* constants.
112 The hostname of the proxy.
114 See http\Client\Curl\PROXY_* constants.
116 The port number of the proxy.
120 See http\Client\Curl\AUTH_* constants.
122 Tunnel all operations through the proxy.
124 Comma separated list of hosts where no proxy should be used. Available if libcurl is v7.19.4 or more recent.
126 List of key/value pairs of headers which should only be sent to a proxy. Available if libcurl is v7.37.0 or more recent.
130 * int $dns_cache_timeout
131 Resolved hosts will be kept fot this number of seconds.
133 See http\Client\Curl\IPRESOLVE_* constants.
135 A list of HOST:PORT:ADDRESS mappings which pre-populate the DNS cache. Available if libcurl is v7.21.3 or more recent.
136 * string $dns_servers
137 Comma separated list of custom DNS servers of the form HOST[:PORT]. Available if libcurl is v7.24.0 or more recent and has built-in c-ares support.
138 * string $dns_interface
139 The name of the network interface ***name*** that the DNS resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
140 * string $dns_local_ip4
141 The local IPv4 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
142 * string $dns_local_ip6
143 The local IPv6 ***address*** that the resolver should bind to. Available if libcurl is v7.33.0 or more recent and has built-in c-ares support.
147 * int $low_speed_limit
148 Minimum speed in bytes per second.
149 * int $low_speed_time
150 Maximum time in seconds the transfer can be below $low_speed_limit before cancelling.
152 Maximum download size.
154 ### Connection handling
156 * bool $fresh_connect
157 Force a new connection.
159 Force closing the connection.
164 Outgoing interface name.
166 A tuple of min/max ports.
168 Override the URL's port.
170 RFC4007 zone_id. Available if libcurl is v7.19.0 or more recent.
171 * bool $tcp_keepalive
172 Whether to use TCP keepalive. Available if libcurl is v7.25.0 or more recent.
174 Seconds to wait before sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
176 Interval in seconds to wait between sending keepalive probes. Available if libcurl is v7.25.0 or more recent.
178 Disable [Nagle's algotrithm](http://tools.ietf.org/html/rfc896).
179 * string $unix_socket_path
180 Connect to the webserver listening at $unix_socket_path instead of opening a TCP connection to it. Available if libcurl is v7.40.0 or more recent.
187 See http\Client\Curl\AUTH_* constants.
192 How many redirects to follow.
193 * bool $unrestricted_auth
194 Whether to keep sending authentication credentials on redirects to different hosts.
196 See http\Client\Curl\POSTREDIR_* constants. Available if libcurl is v7.19.1 or more recent.
203 Pause this number of seconds between retries.
208 Custom Referer header.
210 Whether to automatically send referers.
212 Custom User-Agent header.
216 Whether to request compressed content (through Accept-Encoding).
218 Custom If-(Un)Modified since time. If less than zero, the current time will be added.
223 Resume from this byte offset.
225 Fetch specific ranges (if server supports byte ranges).
229 * bool $encodecookies
230 Whether to URLencode cookies.
232 List of custom cookies in the form ["name" => "value"].
233 * bool $cookiesession
234 Ignore previous session cookies to be loaded from $cookiestore.
235 * string $cookiestore
236 Path to a Netscape cookie file, from which cookies will be loaded resp. to which cookies will be written.
241 Seconds the complete transfer may take.
242 * float $connecttimeout
243 Seconds the connect may take.
244 * float $expect_100_timeout
245 Senconds to wait for the server to send a response to "Expect: 100-Continue" before just proceeding with the request. Available if libcurl is v7.36.0 or more recent.
250 Subarray of SSL related options:
252 SSL certificate file.
254 Certificate type (DER, PEM). (Secure Transport additionally supports P12).
258 PK type (PEM, DER, ENG).
260 The password for the private key.
262 Crypto engine to use for the private key.
264 See http\Client\Curl\SSL_VERSION_* constants.
266 Whether to apply peer verification.
268 Whether to apply host verification.
269 * string $cipher_list
270 One or more cipher strings separated by colons.
272 CA bundle to verify the peer with.
274 Directory with prepared CA certs to verify the peer with.
275 * string $random_file
276 A file used to read from to seed the random engine.
278 A Entropy Gathering Daemon socket.
280 CA PEM cert for peer verification. Available if libcurl is v7.19.0 or more recent.
282 File with the concatenation of CRL in PEM format. Available if libcurl was built with OpenSSL support.
284 Enable gathering of SSL certificate chain information. Available if libcurl is v7.19.1 or more recent.
285 * string $pinned_publickey
286 File with a public key to pin. Available if libcurl is v7.39.0 or more recent.
288 TLS_AUTH_* constant. Available if libcurl is v7.21.4 or more recent.
289 * string $tlsauthuser
290 TLS-SRP username. Available if libcurl is v7.21.4 or more recent.
292 TLS-SRP password. Available if libcurl is v7.21.4 or more recent.
294 Enable OCSP. Available if libcurl is v7.41.0 or more recent and was build with openssl, gnutls or nss support.
299 Size of the connection cache.
300 * int $max_host_connections
301 Maximum number of connections to a single host. Available if libcurl is v7.30.0 or more recent.
302 * int $max_pipeline_length
303 Maximum number of requests in a pipeline. Available if libcurl is v7.30.0 or more recent.
304 * int $max_total_connections
305 Maximum number of simultaneous open connections of this client. Available if libcurl is v7.30.0 or more recent.
307 Whether to enable HTTP/1.1 pipelining.
308 * int $chunk_length_penalty_size
309 Chunk length threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
310 * int $content_length_penalty_size
311 Size threshold for pipelining; no more requests on this pipeline if exceeded. Available if libcurl is v7.30.0 or more recent.
312 * array $pipelining_server_bl
313 Simple list of server software names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
314 * array $pipelining_site_bl
315 Simple list of server host names to blacklist for pipelining. Available if libcurl is v7.30.0 or more recent.
316 * bool $use_eventloop
317 Whether to use an event loop. Available if pecl/http was built with libevent support.