language/context/http.xml
ec6e871a47fa15228aa3299f46fed826422adbc0
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3

4
-
<refentry xml:id="context.http" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
4
+
<refentry xml:id="context.http" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false">
5
5
<refnamediv>
6
6
<refname>HTTP context options</refname>
7
7
<refpurpose>HTTP context option listing</refpurpose>
...
...
@@ -37,14 +37,17 @@
37
37
<varlistentry xml:id="context.http.header">
38
38
<term>
39
39
<parameter>header</parameter>
40
-
<type>string</type>
40
+
<type>array</type> or <type>string</type>
41
41
</term>
42
42
<listitem>
43
43
<para>
44
44
Additional headers to be sent during request. Values
45
45
in this option will override other values (such as
46
46
<literal>User-agent:</literal>, <literal>Host:</literal>,
47
-
and <literal>Authentication:</literal>).
47
+
and <literal>Authentication:</literal>),
48
+
even when following <literal>Location:</literal> redirects.
49
+
Thus it is not recommended to set a <literal>Host:</literal> header,
50
+
if <parameter>follow_location</parameter> is enabled.
48
51
</para>
49
52
</listitem>
50
53
</varlistentry>
...
...
@@ -93,12 +96,12 @@
93
96
<varlistentry xml:id="context.http.request-fulluri">
94
97
<term>
95
98
<parameter>request_fulluri</parameter>
96
-
<type>boolean</type>
99
+
<type>bool</type>
97
100
</term>
98
101
<listitem>
99
102
<para>
100
103
When set to &true;, the entire URI will be used when
101
-
constructing the request. (i.e.
104
+
constructing the request. (e.g.
102
105
<literal>GET http://www.example.com/path/to/file.html HTTP/1.0</literal>).
103
106
While this is a non-standard request format, some
104
107
proxy servers require it.
...
...
@@ -111,7 +114,7 @@
111
114
<varlistentry xml:id="context.http.follow-location">
112
115
<term>
113
116
<parameter>follow_location</parameter>
114
-
<type>integer</type>
117
+
<type>int</type>
115
118
</term>
116
119
<listitem>
117
120
<para>
...
...
@@ -126,7 +129,7 @@
126
129
<varlistentry xml:id="context.http.max-redirects">
127
130
<term>
128
131
<parameter>max_redirects</parameter>
129
-
<type>integer</type>
132
+
<type>int</type>
130
133
</term>
131
134
<listitem>
132
135
<para>
...
...
@@ -148,15 +151,9 @@
148
151
HTTP protocol version.
149
152
</para>
150
153
<para>
151
-
Defaults to <literal>1.0</literal>.
154
+
Defaults to <literal>1.1</literal> as of PHP 8.0.0;
155
+
prior to that version the default was <literal>1.0</literal>.
152
156
</para>
153
-
<note>
154
-
<para>
155
-
PHP prior to 5.3.0 does not implement chunked transfer decoding.
156
-
If this value is set to <literal>1.1</literal> it is your
157
-
responsibility to be <literal>1.1</literal> compliant.
158
-
</para>
159
-
</note>
160
157
</listitem>
161
158
</varlistentry>
162
159
<varlistentry xml:id="context.http.timeout">
...
...
@@ -179,7 +176,7 @@
179
176
<varlistentry xml:id="context.http.ignore-errors">
180
177
<term>
181
178
<parameter>ignore_errors</parameter>
182
-
<type>boolean</type>
179
+
<type>bool</type>
183
180
</term>
184
181
<listitem>
185
182
<para>
...
...
@@ -194,73 +191,6 @@
194
191
</para>
195
192
</refsect1><!-- }}} -->
196
193

197
-
<refsect1 role="changelog"><!-- {{{ -->
198
-
&reftitle.changelog;
199
-
<para>
200
-
<informaltable>
201
-
<tgroup cols="2">
202
-
<thead>
203
-
<row>
204
-
<entry>&Version;</entry>
205
-
<entry>&Description;</entry>
206
-
</row>
207
-
</thead>
208
-
<tbody>
209
-
<row>
210
-
<entry>5.3.4</entry>
211
-
<entry>
212
-
Added <parameter>follow_location</parameter>.
213
-
</entry>
214
-
</row>
215
-
<row>
216
-
<entry>5.3.0</entry>
217
-
<entry>
218
-
The <parameter>protocol_version</parameter> supports chunked transfer
219
-
decoding when set to <literal>1.1</literal>.
220
-
</entry>
221
-
</row>
222
-
<row>
223
-
<entry>5.2.10</entry>
224
-
<entry>
225
-
Added <parameter>ignore_errors</parameter>.
226
-
</entry>
227
-
</row>
228
-
<row>
229
-
<entry>5.2.10</entry>
230
-
<entry>
231
-
The <parameter>header</parameter> can now be an numerically indexed <type>array</type>.
232
-
</entry>
233
-
</row>
234
-
<row>
235
-
<entry>5.2.1</entry>
236
-
<entry>
237
-
Added <parameter>timeout</parameter>.
238
-
</entry>
239
-
</row>
240
-
<row>
241
-
<entry>5.1.0</entry>
242
-
<entry>
243
-
Added HTTPS proxying through HTTP proxies.
244
-
</entry>
245
-
</row>
246
-
<row>
247
-
<entry>5.1.0</entry>
248
-
<entry>
249
-
Added <parameter>max_redirects</parameter>.
250
-
</entry>
251
-
</row>
252
-
<row>
253
-
<entry>5.1.0</entry>
254
-
<entry>
255
-
Added <parameter>protocol_version</parameter>.
256
-
</entry>
257
-
</row>
258
-
</tbody>
259
-
</tgroup>
260
-
</informaltable>
261
-
</para>
262
-
</refsect1><!-- }}} -->
263
-
264
194
<refsect1 role="examples"><!-- {{{ -->
265
195
&reftitle.examples;
266
196
<para>
...
...
@@ -355,7 +285,7 @@ fclose($stream);
355
285
array (
356
286
'wrapper_data' =>
357
287
array (
358
-
0 => 'HTTP/1.0 301 Moved Permantenly',
288
+
0 => 'HTTP/1.0 301 Moved Permanently',
359
289
1 => 'Cache-Control: no-cache',
360
290
2 => 'Connection: close',
361
291
3 => 'Location: http://example.com/foo.jpg',
362
292