ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-HTTP/HTTP.pm
(Generate patch)

Comparing AnyEvent-HTTP/HTTP.pm (file contents):
Revision 1.130 by root, Thu Aug 30 01:21:27 2018 UTC vs.
Revision 1.133 by root, Sat Sep 1 03:16:43 2018 UTC

342=item persistent => $boolean 342=item persistent => $boolean
343 343
344Try to create/reuse a persistent connection. When this flag is set 344Try to create/reuse a persistent connection. When this flag is set
345(default: true for idempotent requests, false for all others), then 345(default: true for idempotent requests, false for all others), then
346C<http_request> tries to re-use an existing (previously-created) 346C<http_request> tries to re-use an existing (previously-created)
347persistent connection to the host and, failing that, tries to create a new 347persistent connection to same host (i.e. identical URL scheme, hostname,
348one. 348port and session) and, failing that, tries to create a new one.
349 349
350Requests failing in certain ways will be automatically retried once, which 350Requests failing in certain ways will be automatically retried once, which
351is dangerous for non-idempotent requests, which is why it defaults to off 351is dangerous for non-idempotent requests, which is why it defaults to off
352for them. The reason for this is because the bozos who designed HTTP/1.1 352for them. The reason for this is because the bozos who designed HTTP/1.1
353made it impossible to distinguish between a fatal error and a normal 353made it impossible to distinguish between a fatal error and a normal
1294function from time to time. 1294function from time to time.
1295 1295
1296A cookie jar is initially an empty hash-reference that is managed by this 1296A cookie jar is initially an empty hash-reference that is managed by this
1297module. Its format is subject to change, but currently it is as follows: 1297module. Its format is subject to change, but currently it is as follows:
1298 1298
1299The key C<version> has to contain C<1>, otherwise the hash gets 1299The key C<version> has to contain C<2>, otherwise the hash gets
1300emptied. All other keys are hostnames or IP addresses pointing to 1300cleared. All other keys are hostnames or IP addresses pointing to
1301hash-references. The key for these inner hash references is the 1301hash-references. The key for these inner hash references is the
1302server path for which this cookie is meant, and the values are again 1302server path for which this cookie is meant, and the values are again
1303hash-references. Each key of those hash-references is a cookie name, and 1303hash-references. Each key of those hash-references is a cookie name, and
1304the value, you guessed it, is another hash-reference, this time with the 1304the value, you guessed it, is another hash-reference, this time with the
1305key-value pairs from the cookie, except for C<expires> and C<max-age>, 1305key-value pairs from the cookie, except for C<expires> and C<max-age>,
1309 1309
1310Here is an example of a cookie jar with a single cookie, so you have a 1310Here is an example of a cookie jar with a single cookie, so you have a
1311chance of understanding the above paragraph: 1311chance of understanding the above paragraph:
1312 1312
1313 { 1313 {
1314 version => 1, 1314 version => 2,
1315 "10.0.0.1" => { 1315 "10.0.0.1" => {
1316 "/" => { 1316 "/" => {
1317 "mythweb_id" => { 1317 "mythweb_id" => {
1318 _expires => 1293917923, 1318 _expires => 1293917923,
1319 value => "ooRung9dThee3ooyXooM1Ohm", 1319 value => "ooRung9dThee3ooyXooM1Ohm",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines