--- /dev/null
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+This file was generated by Devel::NYTProf version 4.06
+-->
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <title>Profile of LWP/UserAgent.pm</title>
+<link rel="stylesheet" type="text/css" href="style.css" />
+ <script type="text/javascript" src="js/jquery-min.js"></script>
+
+ <script type="text/javascript" src="js/jquery-tablesorter-min.js"></script>
+ <link rel="stylesheet" type="text/css" href="js/style-tablesorter.css" />
+ <script type="text/javascript">
+ // when a column is first clicked on to sort it, use descending order
+ // XXX doesn't seem to work (and not just because the tablesorter formatSortingOrder() is broken)
+ $.tablesorter.defaults.sortInitialOrder = "desc";
+ // add parser through the tablesorter addParser method
+ $.tablesorter.addParser({
+ id: 'fmt_time', // name of this parser
+ is: function(s) {
+ return false; // return false so this parser is not auto detected
+ },
+ format: function(orig) { // format data for normalization
+ // console.log(orig);
+ val = orig.replace(/ns/,'');
+ if (val != orig) { return val / (1000*1000*1000); }
+ val = orig.replace(/µs/,''); /* XXX use µ ? */
+ if (val != orig) { return val / (1000*1000); }
+ var val = orig.replace(/ms/,'');
+ if (val != orig) { return val / (1000); }
+ var val = orig.replace(/s/,'');
+ if (val != orig) { return val; }
+ if (orig == '0') { return orig; }
+ console.log('no match for fmt_time of '.concat(orig));
+ return orig;
+ },
+ type: 'numeric' // set type, either numeric or text
+ });
+ </script>
+</head>
+
+<body >
+<div class="header" style="position: relative; overflow-x: hidden; overflow-y: hidden; z-index: 0; ">
+<div class="header_back">
+ <a href="index.html">← Index</a>
+ </div>
+<div class="headerForeground" style="float: left">
+ <span class="siteTitle">NYTProf Performance Profile</span>
+ <span class="siteSubtitle">  <span>« <span class="mode_btn mode_btn_selected">block view</span> • <span class="mode_btn"><a href="LWP-UserAgent-pm-2083-line.html">line view</a></span> • <span class="mode_btn"><a href="LWP-UserAgent-pm-2083-sub.html">sub view</a></span> »</span><br />
+ For script/nytprof.pl
+ </span>
+</div>
+<div class="headerForeground" style="float: right; text-align: right">
+ <span class="siteTitle"> </span>
+ <span class="siteSubtitle">Run on Thu May 31 16:29:39 2012<br />Reported on Thu May 31 16:37:42 2012</span>
+</div>
+<div style="position: absolute; left: 0px; top: 0%; width: 100%; height: 101%; z-index: -1; background-color: rgb(17, 136, 255); "></div>
+<div style="position: absolute; left: 0px; top: 2%; width: 100%; height: 99%; z-index: -1; background-color: rgb(16, 134, 253); "></div>
+<div style="position: absolute; left: 0px; top: 4%; width: 100%; height: 97%; z-index: -1; background-color: rgb(16, 133, 252); "></div>
+<div style="position: absolute; left: 0px; top: 6%; width: 100%; height: 95%; z-index: -1; background-color: rgb(15, 131, 250); "></div>
+<div style="position: absolute; left: 0px; top: 8%; width: 100%; height: 93%; z-index: -1; background-color: rgb(15, 130, 249); "></div>
+<div style="position: absolute; left: 0px; top: 10%; width: 100%; height: 91%; z-index: -1; background-color: rgb(15, 129, 248); "></div>
+<div style="position: absolute; left: 0px; top: 12%; width: 100%; height: 89%; z-index: -1; background-color: rgb(14, 127, 246); "></div>
+<div style="position: absolute; left: 0px; top: 14%; width: 100%; height: 87%; z-index: -1; background-color: rgb(14, 126, 245); "></div>
+<div style="position: absolute; left: 0px; top: 16%; width: 100%; height: 85%; z-index: -1; background-color: rgb(14, 125, 244); "></div>
+<div style="position: absolute; left: 0px; top: 18%; width: 100%; height: 83%; z-index: -1; background-color: rgb(13, 123, 242); "></div>
+<div style="position: absolute; left: 0px; top: 20%; width: 100%; height: 81%; z-index: -1; background-color: rgb(13, 122, 241); "></div>
+<div style="position: absolute; left: 0px; top: 22%; width: 100%; height: 79%; z-index: -1; background-color: rgb(13, 121, 240); "></div>
+<div style="position: absolute; left: 0px; top: 24%; width: 100%; height: 77%; z-index: -1; background-color: rgb(12, 119, 238); "></div>
+<div style="position: absolute; left: 0px; top: 26%; width: 100%; height: 75%; z-index: -1; background-color: rgb(12, 118, 237); "></div>
+<div style="position: absolute; left: 0px; top: 28%; width: 100%; height: 73%; z-index: -1; background-color: rgb(12, 116, 235); "></div>
+<div style="position: absolute; left: 0px; top: 30%; width: 100%; height: 71%; z-index: -1; background-color: rgb(11, 115, 234); "></div>
+<div style="position: absolute; left: 0px; top: 32%; width: 100%; height: 69%; z-index: -1; background-color: rgb(11, 114, 233); "></div>
+<div style="position: absolute; left: 0px; top: 34%; width: 100%; height: 67%; z-index: -1; background-color: rgb(11, 112, 231); "></div>
+<div style="position: absolute; left: 0px; top: 36%; width: 100%; height: 65%; z-index: -1; background-color: rgb(10, 111, 230); "></div>
+<div style="position: absolute; left: 0px; top: 38%; width: 100%; height: 63%; z-index: -1; background-color: rgb(10, 110, 229); "></div>
+<div style="position: absolute; left: 0px; top: 40%; width: 100%; height: 61%; z-index: -1; background-color: rgb(10, 108, 227); "></div>
+<div style="position: absolute; left: 0px; top: 42%; width: 100%; height: 59%; z-index: -1; background-color: rgb(9, 107, 226); "></div>
+<div style="position: absolute; left: 0px; top: 44%; width: 100%; height: 57%; z-index: -1; background-color: rgb(9, 106, 225); "></div>
+<div style="position: absolute; left: 0px; top: 46%; width: 100%; height: 55%; z-index: -1; background-color: rgb(9, 104, 223); "></div>
+<div style="position: absolute; left: 0px; top: 48%; width: 100%; height: 53%; z-index: -1; background-color: rgb(8, 103, 222); "></div>
+<div style="position: absolute; left: 0px; top: 50%; width: 100%; height: 51%; z-index: -1; background-color: rgb(8, 102, 221); "></div>
+<div style="position: absolute; left: 0px; top: 52%; width: 100%; height: 49%; z-index: -1; background-color: rgb(8, 100, 219); "></div>
+<div style="position: absolute; left: 0px; top: 54%; width: 100%; height: 47%; z-index: -1; background-color: rgb(7, 99, 218); "></div>
+<div style="position: absolute; left: 0px; top: 56%; width: 100%; height: 45%; z-index: -1; background-color: rgb(7, 97, 216); "></div>
+<div style="position: absolute; left: 0px; top: 58%; width: 100%; height: 43%; z-index: -1; background-color: rgb(7, 96, 215); "></div>
+<div style="position: absolute; left: 0px; top: 60%; width: 100%; height: 41%; z-index: -1; background-color: rgb(6, 95, 214); "></div>
+<div style="position: absolute; left: 0px; top: 62%; width: 100%; height: 39%; z-index: -1; background-color: rgb(6, 93, 212); "></div>
+<div style="position: absolute; left: 0px; top: 64%; width: 100%; height: 37%; z-index: -1; background-color: rgb(6, 92, 211); "></div>
+<div style="position: absolute; left: 0px; top: 66%; width: 100%; height: 35%; z-index: -1; background-color: rgb(5, 91, 210); "></div>
+<div style="position: absolute; left: 0px; top: 68%; width: 100%; height: 33%; z-index: -1; background-color: rgb(5, 89, 208); "></div>
+<div style="position: absolute; left: 0px; top: 70%; width: 100%; height: 31%; z-index: -1; background-color: rgb(5, 88, 207); "></div>
+<div style="position: absolute; left: 0px; top: 72%; width: 100%; height: 29%; z-index: -1; background-color: rgb(4, 87, 206); "></div>
+<div style="position: absolute; left: 0px; top: 74%; width: 100%; height: 27%; z-index: -1; background-color: rgb(4, 85, 204); "></div>
+<div style="position: absolute; left: 0px; top: 76%; width: 100%; height: 25%; z-index: -1; background-color: rgb(4, 84, 203); "></div>
+<div style="position: absolute; left: 0px; top: 78%; width: 100%; height: 23%; z-index: -1; background-color: rgb(3, 82, 201); "></div>
+<div style="position: absolute; left: 0px; top: 80%; width: 100%; height: 21%; z-index: -1; background-color: rgb(3, 81, 200); "></div>
+<div style="position: absolute; left: 0px; top: 82%; width: 100%; height: 19%; z-index: -1; background-color: rgb(3, 80, 199); "></div>
+<div style="position: absolute; left: 0px; top: 84%; width: 100%; height: 17%; z-index: -1; background-color: rgb(2, 78, 197); "></div>
+<div style="position: absolute; left: 0px; top: 86%; width: 100%; height: 15%; z-index: -1; background-color: rgb(2, 77, 196); "></div>
+<div style="position: absolute; left: 0px; top: 88%; width: 100%; height: 13%; z-index: -1; background-color: rgb(2, 76, 195); "></div>
+<div style="position: absolute; left: 0px; top: 90%; width: 100%; height: 11%; z-index: -1; background-color: rgb(1, 74, 193); "></div>
+<div style="position: absolute; left: 0px; top: 92%; width: 100%; height: 9%; z-index: -1; background-color: rgb(1, 73, 192); "></div>
+<div style="position: absolute; left: 0px; top: 94%; width: 100%; height: 7%; z-index: -1; background-color: rgb(1, 72, 191); "></div>
+<div style="position: absolute; left: 0px; top: 96%; width: 100%; height: 5%; z-index: -1; background-color: rgb(0, 70, 189); "></div>
+<div style="position: absolute; left: 0px; top: 98%; width: 100%; height: 3%; z-index: -1; background-color: rgb(0, 69, 188); "></div>
+<div style="position: absolute; left: 0px; top: 100%; width: 100%; height: 1%; z-index: -1; background-color: rgb(0, 68, 187); "></div>
+</div>
+
+<div class="body_content"><br />
+<table class="file_summary"><tr><td class="h">Filename</td><td align="left"><a href="file:///Users/edenc/perl5/lib/perl5/LWP/UserAgent.pm">/Users/edenc/perl5/lib/perl5/LWP/UserAgent.pm</a></td></tr>
+<tr><td class="h">Statements</td><td align="left">Executed 23 statements in 6.68ms</td></tr></table>
+
+ <table id="subs_table" border="1" cellpadding="0" class="tablesorter">
+ <caption>Subroutines</caption>
+ <thead>
+ <tr>
+ <th>Calls</th>
+ <th><span title="Number of Places sub is called from">P</span></th>
+ <th><span title="Number of Files sub is called from">F</span></th>
+ <th>Exclusive<br />Time</th>
+ <th>Inclusive<br />Time</th>
+ <th>Subroutine</th>
+ </tr>
+ </thead>
+ <tbody>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c0"><span title="0.0%">2.61ms</span></td><td class="c0"><span title="0.0%">6.51ms</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@11</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#11">BEGIN@11</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c0"><span title="0.0%">1.96ms</span></td><td class="c0"><span title="0.0%">2.06ms</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@15</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#15">BEGIN@15</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c0"><span title="0.0%">1.91ms</span></td><td class="c0"><span title="0.0%">2.03ms</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@12</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#12">BEGIN@12</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c0"><span title="0.0%">226µs</span></td><td class="c0"><span title="0.0%">226µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@14</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#14">BEGIN@14</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">16µs</span></td><td class="c3"><span title="0.0%">20µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@3</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#3">BEGIN@3</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">12µs</span></td><td class="c3"><span title="0.0%">32µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@374</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#374">BEGIN@374</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">9µs</span></td><td class="c3"><span title="0.0%">48µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@4</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#4">BEGIN@4</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">7µs</span></td><td class="c3"><span title="0.0%">7µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@17</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#17">BEGIN@17</a></span></td></tr>
+<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">5µs</span></td><td class="c3"><span title="0.0%">5µs</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::BEGIN@10</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#10">BEGIN@10</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::__ANON__[:679]</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#669">__ANON__[:679]</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::__ANON__[:682]</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#661">__ANON__[:682]</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::__ANON__[:703]</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#703">__ANON__[:703]</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::__ANON__[:706]</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#706">__ANON__[:706]</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::__ANON__[:806]</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#806">__ANON__[:806]</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::_agent</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#728">_agent</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::_need_proxy</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#959">_need_proxy</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::_new_response</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#1037">_new_response</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::_process_colonic_headers</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#446">_process_colonic_headers</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::add_handler</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#766">add_handler</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::agent</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#730">agent</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::clone</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#866">clone</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::conn_cache</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#751">conn_cache</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::cookie_jar</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#692">cookie_jar</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::credentials</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#603">credentials</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::default_header</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#723">default_header</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::default_headers</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#712">default_headers</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::delete</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#438">delete</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::env_proxy</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#997">env_proxy</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::from</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#745">from</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::get</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#406">get</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::get_basic_credentials</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#618">get_basic_credentials</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::get_my_handler</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#784">get_my_handler</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::handlers</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#827">handlers</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::head</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#422">head</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::is_online</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#496">is_online</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::is_protocol_supported</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#543">is_protocol_supported</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::local_address</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#626">local_address</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::max_redirect</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#628">max_redirect</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::max_size</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#627">max_size</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::mirror</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#899">mirror</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::new</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#21">new</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::no_proxy</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#1026">no_proxy</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::parse_head</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#656">parse_head</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::post</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#414">post</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::prepare_request</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#227">prepare_request</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::progress</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#506">progress</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::protocols_allowed</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#570">protocols_allowed</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::protocols_forbidden</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#571">protocols_forbidden</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::proxy</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#977">proxy</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::put</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#430">put</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::redirect_ok</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#576">redirect_ok</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::remove_handler</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#814">remove_handler</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::request</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#279">request</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::requests_redirectable</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#572">requests_redirectable</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::run_handlers</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#839">run_handlers</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::send_request</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#132">send_request</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::set_my_handler</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#776">set_my_handler</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::show_progress</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#629">show_progress</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::simple_request</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#249">simple_request</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::ssl_opts</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#631">ssl_opts</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::timeout</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#625">timeout</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::use_alarm</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#858">use_alarm</a></span></td></tr>
+<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">LWP::UserAgent::::use_eval</span>LWP::UserAgent::<a href="LWP-UserAgent-pm-2083-block.html#856">use_eval</a></span></td></tr>
+</tbody></table>
+ Call graph for these subroutines as a
+ <a href="http://en.wikipedia.org/wiki/Graphviz">Graphviz</a>
+ <a href="Users-edenc-perl5-lib-perl5-LWP-UserAgent-pm.dot">dot language file</a>.
+
+ <table border="1" cellpadding="0">
+ <thead>
+ <tr><th>Line</th>
+ <th><span title="Number of statements executed">State<br />ments</span></th>
+ <th><span title="Time spend executing statements on the line,
+ excluding time spent executing statements in any called subroutines">Time<br />on line</span></th>
+ <th><span title="Number of subroutines calls">Calls</span></th>
+ <th><span title="Time spent in subroutines called (inclusive)">Time<br />in subs</span></th>
+ <th class="left_indent_header">Code</th>
+ </tr>
+
+ </thead>
+ <tbody>
+ <tr><td class="h"><a name="1"></a>1</td><td></td><td></td><td></td><td></td><td class="s">package LWP::UserAgent;</td></tr>
+<tr><td class="h"><a name="2"></a>2</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="3"></a>3</td><td class="c3">2</td><td class="c3"><span title="Avg 14µs">27µs</span></td><td class="c1">2</td><td class="c3">24µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 20µs (16+4) within LWP::UserAgent::BEGIN@3 which was called:
+# once (16µs+4µs) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#3">line 3</a></div></div>use strict;<div class="calls"><div class="calls_out"># spent 20µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#3">LWP::UserAgent::BEGIN@3</a>
+# spent 4µs making 1 call to <a href="strict-pm-3-block.html#34">strict::import</a></div></div></td></tr>
+<tr><td class="h"><a name="4"></a>4</td><td class="c3">2</td><td class="c3"><span title="Avg 23µs">45µs</span></td><td class="c1">2</td><td class="c3">88µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 48µs (9+39) within LWP::UserAgent::BEGIN@4 which was called:
+# once (9µs+39µs) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#4">line 4</a></div></div>use vars qw(@ISA $VERSION);<div class="calls"><div class="calls_out"># spent 48µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#4">LWP::UserAgent::BEGIN@4</a>
+# spent 39µs making 1 call to <a href="vars-pm-6-block.html#10">vars::import</a></div></div></td></tr>
+<tr><td class="h"><a name="5"></a>5</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="6"></a>6</td><td class="c3">1</td><td class="c3"><span title="Avg 1µs">1µs</span></td><td></td><td></td><td class="s">require LWP::MemberMixin;</td></tr>
+<tr><td class="h"><a name="7"></a>7</td><td class="c3">1</td><td class="c3"><span title="Avg 8µs">8µs</span></td><td></td><td></td><td class="s">@ISA = qw(LWP::MemberMixin);</td></tr>
+<tr><td class="h"><a name="8"></a>8</td><td class="c3">1</td><td class="c3"><span title="Avg 400ns">400ns</span></td><td></td><td></td><td class="s">$VERSION = "6.04";</td></tr>
+<tr><td class="h"><a name="9"></a>9</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="10"></a>10</td><td class="c3">2</td><td class="c3"><span title="Avg 10µs">21µs</span></td><td class="c3">1</td><td class="c3">5µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 5µs within LWP::UserAgent::BEGIN@10 which was called:
+# once (5µs+0s) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#10">line 10</a></div></div>use HTTP::Request ();<div class="calls"><div class="calls_out"># spent 5µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#10">LWP::UserAgent::BEGIN@10</a></div></div></td></tr>
+<tr><td class="h"><a name="11"></a>11</td><td class="c3">2</td><td class="c0"><span title="Avg 75µs">150µs</span></td><td class="c3">1</td><td class="c0">6.51ms</td><td class="s"><div class="calls"><div class="calls_in"># spent 6.51ms (2.61+3.90) within LWP::UserAgent::BEGIN@11 which was called:
+# once (2.61ms+3.90ms) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#11">line 11</a></div></div>use HTTP::Response ();<div class="calls"><div class="calls_out"># spent 6.51ms making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#11">LWP::UserAgent::BEGIN@11</a></div></div></td></tr>
+<tr><td class="h"><a name="12"></a>12</td><td class="c3">2</td><td class="c0"><span title="Avg 122µs">244µs</span></td><td class="c3">1</td><td class="c0">2.03ms</td><td class="s"><div class="calls"><div class="calls_in"># spent 2.03ms (1.91+124µs) within LWP::UserAgent::BEGIN@12 which was called:
+# once (1.91ms+124µs) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#12">line 12</a></div></div>use HTTP::Date ();<div class="calls"><div class="calls_out"># spent 2.03ms making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#12">LWP::UserAgent::BEGIN@12</a></div></div></td></tr>
+<tr><td class="h"><a name="13"></a>13</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="14"></a>14</td><td class="c3">2</td><td class="c0"><span title="Avg 109µs">217µs</span></td><td class="c3">1</td><td class="c1">226µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 226µs within LWP::UserAgent::BEGIN@14 which was called:
+# once (226µs+0s) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#14">line 14</a></div></div>use LWP ();<div class="calls"><div class="calls_out"># spent 226µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#14">LWP::UserAgent::BEGIN@14</a></div></div></td></tr>
+<tr><td class="h"><a name="15"></a>15</td><td class="c3">2</td><td class="c0"><span title="Avg 89µs">178µs</span></td><td class="c3">1</td><td class="c0">2.06ms</td><td class="s"><div class="calls"><div class="calls_in"># spent 2.06ms (1.96+105µs) within LWP::UserAgent::BEGIN@15 which was called:
+# once (1.96ms+105µs) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#15">line 15</a></div></div>use LWP::Protocol ();<div class="calls"><div class="calls_out"># spent 2.06ms making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#15">LWP::UserAgent::BEGIN@15</a></div></div></td></tr>
+<tr><td class="h"><a name="16"></a>16</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="17"></a>17</td><td class="c3">2</td><td class="c0"><span title="Avg 1.15ms">2.31ms</span></td><td class="c3">1</td><td class="c3">7µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 7µs within LWP::UserAgent::BEGIN@17 which was called:
+# once (7µs+0s) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#17">line 17</a></div></div>use Carp ();<div class="calls"><div class="calls_out"># spent 7µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#17">LWP::UserAgent::BEGIN@17</a></div></div></td></tr>
+<tr><td class="h"><a name="18"></a>18</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="19"></a>19</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="20"></a>20</td><td></td><td></td><td></td><td></td><td class="s">sub new</td></tr>
+<tr><td class="h"><a name="21"></a>21</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="22"></a>22</td><td></td><td></td><td></td><td></td><td class="s"> # Check for common user mistake</td></tr>
+<tr><td class="h"><a name="23"></a>23</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("Options to LWP::UserAgent should be key/value pairs, not hash reference") </td></tr>
+<tr><td class="h"><a name="24"></a>24</td><td></td><td></td><td></td><td></td><td class="s"> if ref($_[1]) eq 'HASH'; </td></tr>
+<tr><td class="h"><a name="25"></a>25</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="26"></a>26</td><td></td><td></td><td></td><td></td><td class="s"> my($class, %cnf) = @_;</td></tr>
+<tr><td class="h"><a name="27"></a>27</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="28"></a>28</td><td></td><td></td><td></td><td></td><td class="s"> my $agent = delete $cnf{agent};</td></tr>
+<tr><td class="h"><a name="29"></a>29</td><td></td><td></td><td></td><td></td><td class="s"> my $from = delete $cnf{from};</td></tr>
+<tr><td class="h"><a name="30"></a>30</td><td></td><td></td><td></td><td></td><td class="s"> my $def_headers = delete $cnf{default_headers};</td></tr>
+<tr><td class="h"><a name="31"></a>31</td><td></td><td></td><td></td><td></td><td class="s"> my $timeout = delete $cnf{timeout};</td></tr>
+<tr><td class="h"><a name="32"></a>32</td><td></td><td></td><td></td><td></td><td class="s"> $timeout = 3*60 unless defined $timeout;</td></tr>
+<tr><td class="h"><a name="33"></a>33</td><td></td><td></td><td></td><td></td><td class="s"> my $local_address = delete $cnf{local_address};</td></tr>
+<tr><td class="h"><a name="34"></a>34</td><td></td><td></td><td></td><td></td><td class="s"> my $ssl_opts = delete $cnf{ssl_opts} || {};</td></tr>
+<tr><td class="h"><a name="35"></a>35</td><td></td><td></td><td></td><td></td><td class="s"> unless (exists $ssl_opts->{verify_hostname}) {</td></tr>
+<tr><td class="h"><a name="36"></a>36</td><td></td><td></td><td></td><td></td><td class="s"> # The processing of HTTPS_CA_* below is for compatiblity with Crypt::SSLeay</td></tr>
+<tr><td class="h"><a name="37"></a>37</td><td></td><td></td><td></td><td></td><td class="s"> if (exists $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}) {</td></tr>
+<tr><td class="h"><a name="38"></a>38</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{verify_hostname} = $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME};</td></tr>
+<tr><td class="h"><a name="39"></a>39</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="40"></a>40</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($ENV{HTTPS_CA_FILE} || $ENV{HTTPS_CA_DIR}) {</td></tr>
+<tr><td class="h"><a name="41"></a>41</td><td></td><td></td><td></td><td></td><td class="s"> # Crypt-SSLeay compatiblity (verify peer certificate; but not the hostname)</td></tr>
+<tr><td class="h"><a name="42"></a>42</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{verify_hostname} = 0;</td></tr>
+<tr><td class="h"><a name="43"></a>43</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{SSL_verify_mode} = 1;</td></tr>
+<tr><td class="h"><a name="44"></a>44</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="45"></a>45</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="46"></a>46</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{verify_hostname} = 1;</td></tr>
+<tr><td class="h"><a name="47"></a>47</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="48"></a>48</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="49"></a>49</td><td></td><td></td><td></td><td></td><td class="s"> unless (exists $ssl_opts->{SSL_ca_file}) {</td></tr>
+<tr><td class="h"><a name="50"></a>50</td><td></td><td></td><td></td><td></td><td class="s"> if (my $ca_file = $ENV{PERL_LWP_SSL_CA_FILE} || $ENV{HTTPS_CA_FILE}) {</td></tr>
+<tr><td class="h"><a name="51"></a>51</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{SSL_ca_file} = $ca_file;</td></tr>
+<tr><td class="h"><a name="52"></a>52</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="53"></a>53</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="54"></a>54</td><td></td><td></td><td></td><td></td><td class="s"> unless (exists $ssl_opts->{SSL_ca_path}) {</td></tr>
+<tr><td class="h"><a name="55"></a>55</td><td></td><td></td><td></td><td></td><td class="s"> if (my $ca_path = $ENV{PERL_LWP_SSL_CA_PATH} || $ENV{HTTPS_CA_DIR}) {</td></tr>
+<tr><td class="h"><a name="56"></a>56</td><td></td><td></td><td></td><td></td><td class="s"> $ssl_opts->{SSL_ca_path} = $ca_path;</td></tr>
+<tr><td class="h"><a name="57"></a>57</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="58"></a>58</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="59"></a>59</td><td></td><td></td><td></td><td></td><td class="s"> my $use_eval = delete $cnf{use_eval};</td></tr>
+<tr><td class="h"><a name="60"></a>60</td><td></td><td></td><td></td><td></td><td class="s"> $use_eval = 1 unless defined $use_eval;</td></tr>
+<tr><td class="h"><a name="61"></a>61</td><td></td><td></td><td></td><td></td><td class="s"> my $parse_head = delete $cnf{parse_head};</td></tr>
+<tr><td class="h"><a name="62"></a>62</td><td></td><td></td><td></td><td></td><td class="s"> $parse_head = 1 unless defined $parse_head;</td></tr>
+<tr><td class="h"><a name="63"></a>63</td><td></td><td></td><td></td><td></td><td class="s"> my $show_progress = delete $cnf{show_progress};</td></tr>
+<tr><td class="h"><a name="64"></a>64</td><td></td><td></td><td></td><td></td><td class="s"> my $max_size = delete $cnf{max_size};</td></tr>
+<tr><td class="h"><a name="65"></a>65</td><td></td><td></td><td></td><td></td><td class="s"> my $max_redirect = delete $cnf{max_redirect};</td></tr>
+<tr><td class="h"><a name="66"></a>66</td><td></td><td></td><td></td><td></td><td class="s"> $max_redirect = 7 unless defined $max_redirect;</td></tr>
+<tr><td class="h"><a name="67"></a>67</td><td></td><td></td><td></td><td></td><td class="s"> my $env_proxy = exists $cnf{env_proxy} ? delete $cnf{env_proxy} : $ENV{PERL_LWP_ENV_PROXY};</td></tr>
+<tr><td class="h"><a name="68"></a>68</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="69"></a>69</td><td></td><td></td><td></td><td></td><td class="s"> my $cookie_jar = delete $cnf{cookie_jar};</td></tr>
+<tr><td class="h"><a name="70"></a>70</td><td></td><td></td><td></td><td></td><td class="s"> my $conn_cache = delete $cnf{conn_cache};</td></tr>
+<tr><td class="h"><a name="71"></a>71</td><td></td><td></td><td></td><td></td><td class="s"> my $keep_alive = delete $cnf{keep_alive};</td></tr>
+<tr><td class="h"><a name="72"></a>72</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="73"></a>73</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("Can't mix conn_cache and keep_alive")</td></tr>
+<tr><td class="h"><a name="74"></a>74</td><td></td><td></td><td></td><td></td><td class="s"> if $conn_cache && $keep_alive;</td></tr>
+<tr><td class="h"><a name="75"></a>75</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="76"></a>76</td><td></td><td></td><td></td><td></td><td class="s"> my $protocols_allowed = delete $cnf{protocols_allowed};</td></tr>
+<tr><td class="h"><a name="77"></a>77</td><td></td><td></td><td></td><td></td><td class="s"> my $protocols_forbidden = delete $cnf{protocols_forbidden};</td></tr>
+<tr><td class="h"><a name="78"></a>78</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="79"></a>79</td><td></td><td></td><td></td><td></td><td class="s"> my $requests_redirectable = delete $cnf{requests_redirectable};</td></tr>
+<tr><td class="h"><a name="80"></a>80</td><td></td><td></td><td></td><td></td><td class="s"> $requests_redirectable = ['GET', 'HEAD']</td></tr>
+<tr><td class="h"><a name="81"></a>81</td><td></td><td></td><td></td><td></td><td class="s"> unless defined $requests_redirectable;</td></tr>
+<tr><td class="h"><a name="82"></a>82</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="83"></a>83</td><td></td><td></td><td></td><td></td><td class="s"> # Actually ""s are just as good as 0's, but for concision we'll just say:</td></tr>
+<tr><td class="h"><a name="84"></a>84</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("protocols_allowed has to be an arrayref or 0, not \"$protocols_allowed\"!")</td></tr>
+<tr><td class="h"><a name="85"></a>85</td><td></td><td></td><td></td><td></td><td class="s"> if $protocols_allowed and ref($protocols_allowed) ne 'ARRAY';</td></tr>
+<tr><td class="h"><a name="86"></a>86</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("protocols_forbidden has to be an arrayref or 0, not \"$protocols_forbidden\"!")</td></tr>
+<tr><td class="h"><a name="87"></a>87</td><td></td><td></td><td></td><td></td><td class="s"> if $protocols_forbidden and ref($protocols_forbidden) ne 'ARRAY';</td></tr>
+<tr><td class="h"><a name="88"></a>88</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("requests_redirectable has to be an arrayref or 0, not \"$requests_redirectable\"!")</td></tr>
+<tr><td class="h"><a name="89"></a>89</td><td></td><td></td><td></td><td></td><td class="s"> if $requests_redirectable and ref($requests_redirectable) ne 'ARRAY';</td></tr>
+<tr><td class="h"><a name="90"></a>90</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="91"></a>91</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="92"></a>92</td><td></td><td></td><td></td><td></td><td class="s"> if (%cnf && $^W) {</td></tr>
+<tr><td class="h"><a name="93"></a>93</td><td></td><td></td><td></td><td></td><td class="s"> Carp::carp("Unrecognized LWP::UserAgent options: @{[sort keys %cnf]}");</td></tr>
+<tr><td class="h"><a name="94"></a>94</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="95"></a>95</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="96"></a>96</td><td></td><td></td><td></td><td></td><td class="s"> my $self = bless {</td></tr>
+<tr><td class="h"><a name="97"></a>97</td><td></td><td></td><td></td><td></td><td class="s"> def_headers => $def_headers,</td></tr>
+<tr><td class="h"><a name="98"></a>98</td><td></td><td></td><td></td><td></td><td class="s"> timeout => $timeout,</td></tr>
+<tr><td class="h"><a name="99"></a>99</td><td></td><td></td><td></td><td></td><td class="s"> local_address => $local_address,</td></tr>
+<tr><td class="h"><a name="100"></a>100</td><td></td><td></td><td></td><td></td><td class="s"> ssl_opts => $ssl_opts,</td></tr>
+<tr><td class="h"><a name="101"></a>101</td><td></td><td></td><td></td><td></td><td class="s"> use_eval => $use_eval,</td></tr>
+<tr><td class="h"><a name="102"></a>102</td><td></td><td></td><td></td><td></td><td class="s"> show_progress=> $show_progress,</td></tr>
+<tr><td class="h"><a name="103"></a>103</td><td></td><td></td><td></td><td></td><td class="s"> max_size => $max_size,</td></tr>
+<tr><td class="h"><a name="104"></a>104</td><td></td><td></td><td></td><td></td><td class="s"> max_redirect => $max_redirect,</td></tr>
+<tr><td class="h"><a name="105"></a>105</td><td></td><td></td><td></td><td></td><td class="s"> proxy => {},</td></tr>
+<tr><td class="h"><a name="106"></a>106</td><td></td><td></td><td></td><td></td><td class="s"> no_proxy => [],</td></tr>
+<tr><td class="h"><a name="107"></a>107</td><td></td><td></td><td></td><td></td><td class="s"> protocols_allowed => $protocols_allowed,</td></tr>
+<tr><td class="h"><a name="108"></a>108</td><td></td><td></td><td></td><td></td><td class="s"> protocols_forbidden => $protocols_forbidden,</td></tr>
+<tr><td class="h"><a name="109"></a>109</td><td></td><td></td><td></td><td></td><td class="s"> requests_redirectable => $requests_redirectable,</td></tr>
+<tr><td class="h"><a name="110"></a>110</td><td></td><td></td><td></td><td></td><td class="s"> }, $class;</td></tr>
+<tr><td class="h"><a name="111"></a>111</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="112"></a>112</td><td></td><td></td><td></td><td></td><td class="s"> $self->agent(defined($agent) ? $agent : $class->_agent)</td></tr>
+<tr><td class="h"><a name="113"></a>113</td><td></td><td></td><td></td><td></td><td class="s"> if defined($agent) || !$def_headers || !$def_headers->header("User-Agent");</td></tr>
+<tr><td class="h"><a name="114"></a>114</td><td></td><td></td><td></td><td></td><td class="s"> $self->from($from) if $from;</td></tr>
+<tr><td class="h"><a name="115"></a>115</td><td></td><td></td><td></td><td></td><td class="s"> $self->cookie_jar($cookie_jar) if $cookie_jar;</td></tr>
+<tr><td class="h"><a name="116"></a>116</td><td></td><td></td><td></td><td></td><td class="s"> $self->parse_head($parse_head);</td></tr>
+<tr><td class="h"><a name="117"></a>117</td><td></td><td></td><td></td><td></td><td class="s"> $self->env_proxy if $env_proxy;</td></tr>
+<tr><td class="h"><a name="118"></a>118</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="119"></a>119</td><td></td><td></td><td></td><td></td><td class="s"> $self->protocols_allowed( $protocols_allowed ) if $protocols_allowed;</td></tr>
+<tr><td class="h"><a name="120"></a>120</td><td></td><td></td><td></td><td></td><td class="s"> $self->protocols_forbidden($protocols_forbidden) if $protocols_forbidden;</td></tr>
+<tr><td class="h"><a name="121"></a>121</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="122"></a>122</td><td></td><td></td><td></td><td></td><td class="s"> if ($keep_alive) {</td></tr>
+<tr><td class="h"><a name="123"></a>123</td><td></td><td></td><td></td><td></td><td class="s"> $conn_cache ||= { total_capacity => $keep_alive };</td></tr>
+<tr><td class="h"><a name="124"></a>124</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="125"></a>125</td><td></td><td></td><td></td><td></td><td class="s"> $self->conn_cache($conn_cache) if $conn_cache;</td></tr>
+<tr><td class="h"><a name="126"></a>126</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="127"></a>127</td><td></td><td></td><td></td><td></td><td class="s"> return $self;</td></tr>
+<tr><td class="h"><a name="128"></a>128</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="129"></a>129</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="130"></a>130</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="131"></a>131</td><td></td><td></td><td></td><td></td><td class="s">sub send_request</td></tr>
+<tr><td class="h"><a name="132"></a>132</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="133"></a>133</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $request, $arg, $size) = @_;</td></tr>
+<tr><td class="h"><a name="134"></a>134</td><td></td><td></td><td></td><td></td><td class="s"> my($method, $url) = ($request->method, $request->uri);</td></tr>
+<tr><td class="h"><a name="135"></a>135</td><td></td><td></td><td></td><td></td><td class="s"> my $scheme = $url->scheme;</td></tr>
+<tr><td class="h"><a name="136"></a>136</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="137"></a>137</td><td></td><td></td><td></td><td></td><td class="s"> local($SIG{__DIE__}); # protect against user defined die handlers</td></tr>
+<tr><td class="h"><a name="138"></a>138</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="139"></a>139</td><td></td><td></td><td></td><td></td><td class="s"> $self->progress("begin", $request);</td></tr>
+<tr><td class="h"><a name="140"></a>140</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="141"></a>141</td><td></td><td></td><td></td><td></td><td class="s"> my $response = $self->run_handlers("request_send", $request);</td></tr>
+<tr><td class="h"><a name="142"></a>142</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="143"></a>143</td><td></td><td></td><td></td><td></td><td class="s"> unless ($response) {</td></tr>
+<tr><td class="h"><a name="144"></a>144</td><td></td><td></td><td></td><td></td><td class="s"> my $protocol;</td></tr>
+<tr><td class="h"><a name="145"></a>145</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="146"></a>146</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="147"></a>147</td><td></td><td></td><td></td><td></td><td class="s"> # Honor object-specific restrictions by forcing protocol objects</td></tr>
+<tr><td class="h"><a name="148"></a>148</td><td></td><td></td><td></td><td></td><td class="s"> # into class LWP::Protocol::nogo.</td></tr>
+<tr><td class="h"><a name="149"></a>149</td><td></td><td></td><td></td><td></td><td class="s"> my $x;</td></tr>
+<tr><td class="h"><a name="150"></a>150</td><td></td><td></td><td></td><td></td><td class="s"> if($x = $self->protocols_allowed) {</td></tr>
+<tr><td class="h"><a name="151"></a>151</td><td></td><td></td><td></td><td></td><td class="s"> if (grep lc($_) eq $scheme, @$x) {</td></tr>
+<tr><td class="h"><a name="152"></a>152</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="153"></a>153</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="154"></a>154</td><td></td><td></td><td></td><td></td><td class="s"> require LWP::Protocol::nogo;</td></tr>
+<tr><td class="h"><a name="155"></a>155</td><td></td><td></td><td></td><td></td><td class="s"> $protocol = LWP::Protocol::nogo->new;</td></tr>
+<tr><td class="h"><a name="156"></a>156</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="157"></a>157</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="158"></a>158</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($x = $self->protocols_forbidden) {</td></tr>
+<tr><td class="h"><a name="159"></a>159</td><td></td><td></td><td></td><td></td><td class="s"> if(grep lc($_) eq $scheme, @$x) {</td></tr>
+<tr><td class="h"><a name="160"></a>160</td><td></td><td></td><td></td><td></td><td class="s"> require LWP::Protocol::nogo;</td></tr>
+<tr><td class="h"><a name="161"></a>161</td><td></td><td></td><td></td><td></td><td class="s"> $protocol = LWP::Protocol::nogo->new;</td></tr>
+<tr><td class="h"><a name="162"></a>162</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="163"></a>163</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="164"></a>164</td><td></td><td></td><td></td><td></td><td class="s"> # else fall thru and create the protocol object normally</td></tr>
+<tr><td class="h"><a name="165"></a>165</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="166"></a>166</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="167"></a>167</td><td></td><td></td><td></td><td></td><td class="s"> # Locate protocol to use</td></tr>
+<tr><td class="h"><a name="168"></a>168</td><td></td><td></td><td></td><td></td><td class="s"> my $proxy = $request->{proxy};</td></tr>
+<tr><td class="h"><a name="169"></a>169</td><td></td><td></td><td></td><td></td><td class="s"> if ($proxy) {</td></tr>
+<tr><td class="h"><a name="170"></a>170</td><td></td><td></td><td></td><td></td><td class="s"> $scheme = $proxy->scheme;</td></tr>
+<tr><td class="h"><a name="171"></a>171</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="172"></a>172</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="173"></a>173</td><td></td><td></td><td></td><td></td><td class="s"> unless ($protocol) {</td></tr>
+<tr><td class="h"><a name="174"></a>174</td><td></td><td></td><td></td><td></td><td class="s"> $protocol = eval { LWP::Protocol::create($scheme, $self) };</td></tr>
+<tr><td class="h"><a name="175"></a>175</td><td></td><td></td><td></td><td></td><td class="s"> if ($@) {</td></tr>
+<tr><td class="h"><a name="176"></a>176</td><td></td><td></td><td></td><td></td><td class="s"> $@ =~ s/ at .* line \d+.*//s; # remove file/line number</td></tr>
+<tr><td class="h"><a name="177"></a>177</td><td></td><td></td><td></td><td></td><td class="s"> $response = _new_response($request, &HTTP::Status::RC_NOT_IMPLEMENTED, $@);</td></tr>
+<tr><td class="h"><a name="178"></a>178</td><td></td><td></td><td></td><td></td><td class="s"> if ($scheme eq "https") {</td></tr>
+<tr><td class="h"><a name="179"></a>179</td><td></td><td></td><td></td><td></td><td class="s"> $response->message($response->message . " (LWP::Protocol::https not installed)");</td></tr>
+<tr><td class="h"><a name="180"></a>180</td><td></td><td></td><td></td><td></td><td class="s"> $response->content_type("text/plain");</td></tr>
+<tr><td class="h"><a name="181"></a>181</td><td></td><td></td><td></td><td></td><td class="s"> $response->content(<<EOT);</td></tr>
+<tr><td class="h"><a name="182"></a>182</td><td></td><td></td><td></td><td></td><td class="s">LWP will support https URLs if the LWP::Protocol::https module</td></tr>
+<tr><td class="h"><a name="183"></a>183</td><td></td><td></td><td></td><td></td><td class="s">is installed.</td></tr>
+<tr><td class="h"><a name="184"></a>184</td><td></td><td></td><td></td><td></td><td class="s">EOT</td></tr>
+<tr><td class="h"><a name="185"></a>185</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="186"></a>186</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="187"></a>187</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="188"></a>188</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="189"></a>189</td><td></td><td></td><td></td><td></td><td class="s"> if (!$response && $self->{use_eval}) {</td></tr>
+<tr><td class="h"><a name="190"></a>190</td><td></td><td></td><td></td><td></td><td class="s"> # we eval, and turn dies into responses below</td></tr>
+<tr><td class="h"><a name="191"></a>191</td><td></td><td></td><td></td><td></td><td class="s"> eval {</td></tr>
+<tr><td class="h"><a name="192"></a>192</td><td></td><td></td><td></td><td></td><td class="s"> $response = $protocol->request($request, $proxy, $arg, $size, $self->{timeout}) ||</td></tr>
+<tr><td class="h"><a name="193"></a>193</td><td></td><td></td><td></td><td></td><td class="s"> die "No response returned by $protocol";</td></tr>
+<tr><td class="h"><a name="194"></a>194</td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
+<tr><td class="h"><a name="195"></a>195</td><td></td><td></td><td></td><td></td><td class="s"> if ($@) {</td></tr>
+<tr><td class="h"><a name="196"></a>196</td><td></td><td></td><td></td><td></td><td class="s"> if (UNIVERSAL::isa($@, "HTTP::Response")) {</td></tr>
+<tr><td class="h"><a name="197"></a>197</td><td></td><td></td><td></td><td></td><td class="s"> $response = $@;</td></tr>
+<tr><td class="h"><a name="198"></a>198</td><td></td><td></td><td></td><td></td><td class="s"> $response->request($request);</td></tr>
+<tr><td class="h"><a name="199"></a>199</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="200"></a>200</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="201"></a>201</td><td></td><td></td><td></td><td></td><td class="s"> my $full = $@;</td></tr>
+<tr><td class="h"><a name="202"></a>202</td><td></td><td></td><td></td><td></td><td class="s"> (my $status = $@) =~ s/\n.*//s;</td></tr>
+<tr><td class="h"><a name="203"></a>203</td><td></td><td></td><td></td><td></td><td class="s"> $status =~ s/ at .* line \d+.*//s; # remove file/line number</td></tr>
+<tr><td class="h"><a name="204"></a>204</td><td></td><td></td><td></td><td></td><td class="s"> my $code = ($status =~ s/^(\d\d\d)\s+//) ? $1 : &HTTP::Status::RC_INTERNAL_SERVER_ERROR;</td></tr>
+<tr><td class="h"><a name="205"></a>205</td><td></td><td></td><td></td><td></td><td class="s"> $response = _new_response($request, $code, $status, $full);</td></tr>
+<tr><td class="h"><a name="206"></a>206</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="207"></a>207</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="208"></a>208</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="209"></a>209</td><td></td><td></td><td></td><td></td><td class="s"> elsif (!$response) {</td></tr>
+<tr><td class="h"><a name="210"></a>210</td><td></td><td></td><td></td><td></td><td class="s"> $response = $protocol->request($request, $proxy,</td></tr>
+<tr><td class="h"><a name="211"></a>211</td><td></td><td></td><td></td><td></td><td class="s"> $arg, $size, $self->{timeout});</td></tr>
+<tr><td class="h"><a name="212"></a>212</td><td></td><td></td><td></td><td></td><td class="s"> # XXX: Should we die unless $response->is_success ???</td></tr>
+<tr><td class="h"><a name="213"></a>213</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="214"></a>214</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="215"></a>215</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="216"></a>216</td><td></td><td></td><td></td><td></td><td class="s"> $response->request($request); # record request for reference</td></tr>
+<tr><td class="h"><a name="217"></a>217</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Date" => HTTP::Date::time2str(time));</td></tr>
+<tr><td class="h"><a name="218"></a>218</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="219"></a>219</td><td></td><td></td><td></td><td></td><td class="s"> $self->run_handlers("response_done", $response);</td></tr>
+<tr><td class="h"><a name="220"></a>220</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="221"></a>221</td><td></td><td></td><td></td><td></td><td class="s"> $self->progress("end", $response);</td></tr>
+<tr><td class="h"><a name="222"></a>222</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="223"></a>223</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="224"></a>224</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="225"></a>225</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="226"></a>226</td><td></td><td></td><td></td><td></td><td class="s">sub prepare_request</td></tr>
+<tr><td class="h"><a name="227"></a>227</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="228"></a>228</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $request) = @_;</td></tr>
+<tr><td class="h"><a name="229"></a>229</td><td></td><td></td><td></td><td></td><td class="s"> die "Method missing" unless $request->method;</td></tr>
+<tr><td class="h"><a name="230"></a>230</td><td></td><td></td><td></td><td></td><td class="s"> my $url = $request->uri;</td></tr>
+<tr><td class="h"><a name="231"></a>231</td><td></td><td></td><td></td><td></td><td class="s"> die "URL missing" unless $url;</td></tr>
+<tr><td class="h"><a name="232"></a>232</td><td></td><td></td><td></td><td></td><td class="s"> die "URL must be absolute" unless $url->scheme;</td></tr>
+<tr><td class="h"><a name="233"></a>233</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="234"></a>234</td><td></td><td></td><td></td><td></td><td class="s"> $self->run_handlers("request_preprepare", $request);</td></tr>
+<tr><td class="h"><a name="235"></a>235</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="236"></a>236</td><td></td><td></td><td></td><td></td><td class="s"> if (my $def_headers = $self->{def_headers}) {</td></tr>
+<tr><td class="h"><a name="237"></a>237</td><td></td><td></td><td></td><td></td><td class="s"> for my $h ($def_headers->header_field_names) {</td></tr>
+<tr><td class="h"><a name="238"></a>238</td><td></td><td></td><td></td><td></td><td class="s"> $request->init_header($h => [$def_headers->header($h)]);</td></tr>
+<tr><td class="h"><a name="239"></a>239</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="240"></a>240</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="241"></a>241</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="242"></a>242</td><td></td><td></td><td></td><td></td><td class="s"> $self->run_handlers("request_prepare", $request);</td></tr>
+<tr><td class="h"><a name="243"></a>243</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="244"></a>244</td><td></td><td></td><td></td><td></td><td class="s"> return $request;</td></tr>
+<tr><td class="h"><a name="245"></a>245</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="246"></a>246</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="247"></a>247</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="248"></a>248</td><td></td><td></td><td></td><td></td><td class="s">sub simple_request</td></tr>
+<tr><td class="h"><a name="249"></a>249</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="250"></a>250</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $request, $arg, $size) = @_;</td></tr>
+<tr><td class="h"><a name="251"></a>251</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="252"></a>252</td><td></td><td></td><td></td><td></td><td class="s"> # sanity check the request passed in</td></tr>
+<tr><td class="h"><a name="253"></a>253</td><td></td><td></td><td></td><td></td><td class="s"> if (defined $request) {</td></tr>
+<tr><td class="h"><a name="254"></a>254</td><td></td><td></td><td></td><td></td><td class="s"> if (ref $request) {</td></tr>
+<tr><td class="h"><a name="255"></a>255</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("You need a request object, not a " . ref($request) . " object")</td></tr>
+<tr><td class="h"><a name="256"></a>256</td><td></td><td></td><td></td><td></td><td class="s"> if ref($request) eq 'ARRAY' or ref($request) eq 'HASH' or</td></tr>
+<tr><td class="h"><a name="257"></a>257</td><td></td><td></td><td></td><td></td><td class="s"> !$request->can('method') or !$request->can('uri');</td></tr>
+<tr><td class="h"><a name="258"></a>258</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="259"></a>259</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="260"></a>260</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("You need a request object, not '$request'");</td></tr>
+<tr><td class="h"><a name="261"></a>261</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="262"></a>262</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="263"></a>263</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="264"></a>264</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("No request object passed in");</td></tr>
+<tr><td class="h"><a name="265"></a>265</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="266"></a>266</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="267"></a>267</td><td></td><td></td><td></td><td></td><td class="s"> eval {</td></tr>
+<tr><td class="h"><a name="268"></a>268</td><td></td><td></td><td></td><td></td><td class="s"> $request = $self->prepare_request($request);</td></tr>
+<tr><td class="h"><a name="269"></a>269</td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
+<tr><td class="h"><a name="270"></a>270</td><td></td><td></td><td></td><td></td><td class="s"> if ($@) {</td></tr>
+<tr><td class="h"><a name="271"></a>271</td><td></td><td></td><td></td><td></td><td class="s"> $@ =~ s/ at .* line \d+.*//s; # remove file/line number</td></tr>
+<tr><td class="h"><a name="272"></a>272</td><td></td><td></td><td></td><td></td><td class="s"> return _new_response($request, &HTTP::Status::RC_BAD_REQUEST, $@);</td></tr>
+<tr><td class="h"><a name="273"></a>273</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="274"></a>274</td><td></td><td></td><td></td><td></td><td class="s"> return $self->send_request($request, $arg, $size);</td></tr>
+<tr><td class="h"><a name="275"></a>275</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="276"></a>276</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="277"></a>277</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="278"></a>278</td><td></td><td></td><td></td><td></td><td class="s">sub request</td></tr>
+<tr><td class="h"><a name="279"></a>279</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="280"></a>280</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $request, $arg, $size, $previous) = @_;</td></tr>
+<tr><td class="h"><a name="281"></a>281</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="282"></a>282</td><td></td><td></td><td></td><td></td><td class="s"> my $response = $self->simple_request($request, $arg, $size);</td></tr>
+<tr><td class="h"><a name="283"></a>283</td><td></td><td></td><td></td><td></td><td class="s"> $response->previous($previous) if $previous;</td></tr>
+<tr><td class="h"><a name="284"></a>284</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="285"></a>285</td><td></td><td></td><td></td><td></td><td class="s"> if ($response->redirects >= $self->{max_redirect}) {</td></tr>
+<tr><td class="h"><a name="286"></a>286</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" =></td></tr>
+<tr><td class="h"><a name="287"></a>287</td><td></td><td></td><td></td><td></td><td class="s"> "Redirect loop detected (max_redirect = $self->{max_redirect})");</td></tr>
+<tr><td class="h"><a name="288"></a>288</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="289"></a>289</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="290"></a>290</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="291"></a>291</td><td></td><td></td><td></td><td></td><td class="s"> if (my $req = $self->run_handlers("response_redirect", $response)) {</td></tr>
+<tr><td class="h"><a name="292"></a>292</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request($req, $arg, $size, $response);</td></tr>
+<tr><td class="h"><a name="293"></a>293</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="294"></a>294</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="295"></a>295</td><td></td><td></td><td></td><td></td><td class="s"> my $code = $response->code;</td></tr>
+<tr><td class="h"><a name="296"></a>296</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="297"></a>297</td><td></td><td></td><td></td><td></td><td class="s"> if ($code == &HTTP::Status::RC_MOVED_PERMANENTLY or</td></tr>
+<tr><td class="h"><a name="298"></a>298</td><td></td><td></td><td></td><td></td><td class="s"> $code == &HTTP::Status::RC_FOUND or</td></tr>
+<tr><td class="h"><a name="299"></a>299</td><td></td><td></td><td></td><td></td><td class="s"> $code == &HTTP::Status::RC_SEE_OTHER or</td></tr>
+<tr><td class="h"><a name="300"></a>300</td><td></td><td></td><td></td><td></td><td class="s"> $code == &HTTP::Status::RC_TEMPORARY_REDIRECT)</td></tr>
+<tr><td class="h"><a name="301"></a>301</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="302"></a>302</td><td></td><td></td><td></td><td></td><td class="s"> my $referral = $request->clone;</td></tr>
+<tr><td class="h"><a name="303"></a>303</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="304"></a>304</td><td></td><td></td><td></td><td></td><td class="s"> # These headers should never be forwarded</td></tr>
+<tr><td class="h"><a name="305"></a>305</td><td></td><td></td><td></td><td></td><td class="s"> $referral->remove_header('Host', 'Cookie');</td></tr>
+<tr><td class="h"><a name="306"></a>306</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="307"></a>307</td><td></td><td></td><td></td><td></td><td class="s"> if ($referral->header('Referer') &&</td></tr>
+<tr><td class="h"><a name="308"></a>308</td><td></td><td></td><td></td><td></td><td class="s"> $request->uri->scheme eq 'https' &&</td></tr>
+<tr><td class="h"><a name="309"></a>309</td><td></td><td></td><td></td><td></td><td class="s"> $referral->uri->scheme eq 'http')</td></tr>
+<tr><td class="h"><a name="310"></a>310</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="311"></a>311</td><td></td><td></td><td></td><td></td><td class="s"> # RFC 2616, section 15.1.3.</td></tr>
+<tr><td class="h"><a name="312"></a>312</td><td></td><td></td><td></td><td></td><td class="s"> # https -> http redirect, suppressing Referer</td></tr>
+<tr><td class="h"><a name="313"></a>313</td><td></td><td></td><td></td><td></td><td class="s"> $referral->remove_header('Referer');</td></tr>
+<tr><td class="h"><a name="314"></a>314</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="315"></a>315</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="316"></a>316</td><td></td><td></td><td></td><td></td><td class="s"> if ($code == &HTTP::Status::RC_SEE_OTHER ||</td></tr>
+<tr><td class="h"><a name="317"></a>317</td><td></td><td></td><td></td><td></td><td class="s"> $code == &HTTP::Status::RC_FOUND) </td></tr>
+<tr><td class="h"><a name="318"></a>318</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="319"></a>319</td><td></td><td></td><td></td><td></td><td class="s"> my $method = uc($referral->method);</td></tr>
+<tr><td class="h"><a name="320"></a>320</td><td></td><td></td><td></td><td></td><td class="s"> unless ($method eq "GET" || $method eq "HEAD") {</td></tr>
+<tr><td class="h"><a name="321"></a>321</td><td></td><td></td><td></td><td></td><td class="s"> $referral->method("GET");</td></tr>
+<tr><td class="h"><a name="322"></a>322</td><td></td><td></td><td></td><td></td><td class="s"> $referral->content("");</td></tr>
+<tr><td class="h"><a name="323"></a>323</td><td></td><td></td><td></td><td></td><td class="s"> $referral->remove_content_headers;</td></tr>
+<tr><td class="h"><a name="324"></a>324</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="325"></a>325</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="326"></a>326</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="327"></a>327</td><td></td><td></td><td></td><td></td><td class="s"> # And then we update the URL based on the Location:-header.</td></tr>
+<tr><td class="h"><a name="328"></a>328</td><td></td><td></td><td></td><td></td><td class="s"> my $referral_uri = $response->header('Location');</td></tr>
+<tr><td class="h"><a name="329"></a>329</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="330"></a>330</td><td></td><td></td><td></td><td></td><td class="s"> # Some servers erroneously return a relative URL for redirects,</td></tr>
+<tr><td class="h"><a name="331"></a>331</td><td></td><td></td><td></td><td></td><td class="s"> # so make it absolute if it not already is.</td></tr>
+<tr><td class="h"><a name="332"></a>332</td><td></td><td></td><td></td><td></td><td class="s"> local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1;</td></tr>
+<tr><td class="h"><a name="333"></a>333</td><td></td><td></td><td></td><td></td><td class="s"> my $base = $response->base;</td></tr>
+<tr><td class="h"><a name="334"></a>334</td><td></td><td></td><td></td><td></td><td class="s"> $referral_uri = "" unless defined $referral_uri;</td></tr>
+<tr><td class="h"><a name="335"></a>335</td><td></td><td></td><td></td><td></td><td class="s"> $referral_uri = $HTTP::URI_CLASS->new($referral_uri, $base)</td></tr>
+<tr><td class="h"><a name="336"></a>336</td><td></td><td></td><td></td><td></td><td class="s"> ->abs($base);</td></tr>
+<tr><td class="h"><a name="337"></a>337</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="338"></a>338</td><td></td><td></td><td></td><td></td><td class="s"> $referral->uri($referral_uri);</td></tr>
+<tr><td class="h"><a name="339"></a>339</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="340"></a>340</td><td></td><td></td><td></td><td></td><td class="s"> return $response unless $self->redirect_ok($referral, $response);</td></tr>
+<tr><td class="h"><a name="341"></a>341</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request($referral, $arg, $size, $response);</td></tr>
+<tr><td class="h"><a name="342"></a>342</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="343"></a>343</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="344"></a>344</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($code == &HTTP::Status::RC_UNAUTHORIZED ||</td></tr>
+<tr><td class="h"><a name="345"></a>345</td><td></td><td></td><td></td><td></td><td class="s"> $code == &HTTP::Status::RC_PROXY_AUTHENTICATION_REQUIRED</td></tr>
+<tr><td class="h"><a name="346"></a>346</td><td></td><td></td><td></td><td></td><td class="s"> )</td></tr>
+<tr><td class="h"><a name="347"></a>347</td><td></td><td></td><td></td><td></td><td class="s"> {</td></tr>
+<tr><td class="h"><a name="348"></a>348</td><td></td><td></td><td></td><td></td><td class="s"> my $proxy = ($code == &HTTP::Status::RC_PROXY_AUTHENTICATION_REQUIRED);</td></tr>
+<tr><td class="h"><a name="349"></a>349</td><td></td><td></td><td></td><td></td><td class="s"> my $ch_header = $proxy ? "Proxy-Authenticate" : "WWW-Authenticate";</td></tr>
+<tr><td class="h"><a name="350"></a>350</td><td></td><td></td><td></td><td></td><td class="s"> my @challenge = $response->header($ch_header);</td></tr>
+<tr><td class="h"><a name="351"></a>351</td><td></td><td></td><td></td><td></td><td class="s"> unless (@challenge) {</td></tr>
+<tr><td class="h"><a name="352"></a>352</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" => </td></tr>
+<tr><td class="h"><a name="353"></a>353</td><td></td><td></td><td></td><td></td><td class="s"> "Missing Authenticate header");</td></tr>
+<tr><td class="h"><a name="354"></a>354</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="355"></a>355</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="356"></a>356</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="357"></a>357</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Headers::Util;</td></tr>
+<tr><td class="h"><a name="358"></a>358</td><td></td><td></td><td></td><td></td><td class="s"> CHALLENGE: for my $challenge (@challenge) {</td></tr>
+<tr><td class="h"><a name="359"></a>359</td><td></td><td></td><td></td><td></td><td class="s"> $challenge =~ tr/,/;/; # "," is used to separate auth-params!!</td></tr>
+<tr><td class="h"><a name="360"></a>360</td><td></td><td></td><td></td><td></td><td class="s"> ($challenge) = HTTP::Headers::Util::split_header_words($challenge);</td></tr>
+<tr><td class="h"><a name="361"></a>361</td><td></td><td></td><td></td><td></td><td class="s"> my $scheme = shift(@$challenge);</td></tr>
+<tr><td class="h"><a name="362"></a>362</td><td></td><td></td><td></td><td></td><td class="s"> shift(@$challenge); # no value</td></tr>
+<tr><td class="h"><a name="363"></a>363</td><td></td><td></td><td></td><td></td><td class="s"> $challenge = { @$challenge }; # make rest into a hash</td></tr>
+<tr><td class="h"><a name="364"></a>364</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="365"></a>365</td><td></td><td></td><td></td><td></td><td class="s"> unless ($scheme =~ /^([a-z]+(?:-[a-z]+)*)$/) {</td></tr>
+<tr><td class="h"><a name="366"></a>366</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" => </td></tr>
+<tr><td class="h"><a name="367"></a>367</td><td></td><td></td><td></td><td></td><td class="s"> "Bad authentication scheme '$scheme'");</td></tr>
+<tr><td class="h"><a name="368"></a>368</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="369"></a>369</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="370"></a>370</td><td></td><td></td><td></td><td></td><td class="s"> $scheme = $1; # untainted now</td></tr>
+<tr><td class="h"><a name="371"></a>371</td><td></td><td></td><td></td><td></td><td class="s"> my $class = "LWP::Authen::\u$scheme";</td></tr>
+<tr><td class="h"><a name="372"></a>372</td><td></td><td></td><td></td><td></td><td class="s"> $class =~ s/-/_/g;</td></tr>
+<tr><td class="h"><a name="373"></a>373</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="374"></a>374</td><td class="c3">2</td><td class="c0"><span title="Avg 1.73ms">3.47ms</span></td><td class="c1">2</td><td class="c3">51µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 32µs (12+20) within LWP::UserAgent::BEGIN@374 which was called:
+# once (12µs+20µs) by Text::Tradition::Analysis::BEGIN@10 at <a href="LWP-UserAgent-pm-2083-block.html#374">line 374</a></div></div> no strict 'refs';<div class="calls"><div class="calls_out"> # spent 32µs making 1 call to <a href="LWP-UserAgent-pm-2083-block.html#374">LWP::UserAgent::BEGIN@374</a>
+ # spent 20µs making 1 call to <a href="strict-pm-3-block.html#39">strict::unimport</a></div></div></td></tr>
+<tr><td class="h"><a name="375"></a>375</td><td></td><td></td><td></td><td></td><td class="s"> unless (%{"$class\::"}) {</td></tr>
+<tr><td class="h"><a name="376"></a>376</td><td></td><td></td><td></td><td></td><td class="s"> # try to load it</td></tr>
+<tr><td class="h"><a name="377"></a>377</td><td></td><td></td><td></td><td></td><td class="s"> eval "require $class";</td></tr>
+<tr><td class="h"><a name="378"></a>378</td><td></td><td></td><td></td><td></td><td class="s"> if ($@) {</td></tr>
+<tr><td class="h"><a name="379"></a>379</td><td></td><td></td><td></td><td></td><td class="s"> if ($@ =~ /^Can\'t locate/) {</td></tr>
+<tr><td class="h"><a name="380"></a>380</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" =></td></tr>
+<tr><td class="h"><a name="381"></a>381</td><td></td><td></td><td></td><td></td><td class="s"> "Unsupported authentication scheme '$scheme'");</td></tr>
+<tr><td class="h"><a name="382"></a>382</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="383"></a>383</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="384"></a>384</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" => $@);</td></tr>
+<tr><td class="h"><a name="385"></a>385</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="386"></a>386</td><td></td><td></td><td></td><td></td><td class="s"> next CHALLENGE;</td></tr>
+<tr><td class="h"><a name="387"></a>387</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="388"></a>388</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="389"></a>389</td><td></td><td></td><td></td><td></td><td class="s"> unless ($class->can("authenticate")) {</td></tr>
+<tr><td class="h"><a name="390"></a>390</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" =></td></tr>
+<tr><td class="h"><a name="391"></a>391</td><td></td><td></td><td></td><td></td><td class="s"> "Unsupported authentication scheme '$scheme'");</td></tr>
+<tr><td class="h"><a name="392"></a>392</td><td></td><td></td><td></td><td></td><td class="s"> next CHALLENGE;</td></tr>
+<tr><td class="h"><a name="393"></a>393</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="394"></a>394</td><td></td><td></td><td></td><td></td><td class="s"> return $class->authenticate($self, $proxy, $challenge, $response,</td></tr>
+<tr><td class="h"><a name="395"></a>395</td><td></td><td></td><td></td><td></td><td class="s"> $request, $arg, $size);</td></tr>
+<tr><td class="h"><a name="396"></a>396</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="397"></a>397</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="398"></a>398</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="399"></a>399</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="400"></a>400</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="401"></a>401</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="402"></a>402</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="403"></a>403</td><td></td><td></td><td></td><td></td><td class="s">#</td></tr>
+<tr><td class="h"><a name="404"></a>404</td><td></td><td></td><td></td><td></td><td class="s"># Now the shortcuts...</td></tr>
+<tr><td class="h"><a name="405"></a>405</td><td></td><td></td><td></td><td></td><td class="s">#</td></tr>
+<tr><td class="h"><a name="406"></a>406</td><td></td><td></td><td></td><td></td><td class="s">sub get {</td></tr>
+<tr><td class="h"><a name="407"></a>407</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Request::Common;</td></tr>
+<tr><td class="h"><a name="408"></a>408</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @parameters) = @_;</td></tr>
+<tr><td class="h"><a name="409"></a>409</td><td></td><td></td><td></td><td></td><td class="s"> my @suff = $self->_process_colonic_headers(\@parameters,1);</td></tr>
+<tr><td class="h"><a name="410"></a>410</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request( HTTP::Request::Common::GET( @parameters ), @suff );</td></tr>
+<tr><td class="h"><a name="411"></a>411</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="412"></a>412</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="413"></a>413</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="414"></a>414</td><td></td><td></td><td></td><td></td><td class="s">sub post {</td></tr>
+<tr><td class="h"><a name="415"></a>415</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Request::Common;</td></tr>
+<tr><td class="h"><a name="416"></a>416</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @parameters) = @_;</td></tr>
+<tr><td class="h"><a name="417"></a>417</td><td></td><td></td><td></td><td></td><td class="s"> my @suff = $self->_process_colonic_headers(\@parameters, (ref($parameters[1]) ? 2 : 1));</td></tr>
+<tr><td class="h"><a name="418"></a>418</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request( HTTP::Request::Common::POST( @parameters ), @suff );</td></tr>
+<tr><td class="h"><a name="419"></a>419</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="420"></a>420</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="421"></a>421</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="422"></a>422</td><td></td><td></td><td></td><td></td><td class="s">sub head {</td></tr>
+<tr><td class="h"><a name="423"></a>423</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Request::Common;</td></tr>
+<tr><td class="h"><a name="424"></a>424</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @parameters) = @_;</td></tr>
+<tr><td class="h"><a name="425"></a>425</td><td></td><td></td><td></td><td></td><td class="s"> my @suff = $self->_process_colonic_headers(\@parameters,1);</td></tr>
+<tr><td class="h"><a name="426"></a>426</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request( HTTP::Request::Common::HEAD( @parameters ), @suff );</td></tr>
+<tr><td class="h"><a name="427"></a>427</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="428"></a>428</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="429"></a>429</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="430"></a>430</td><td></td><td></td><td></td><td></td><td class="s">sub put {</td></tr>
+<tr><td class="h"><a name="431"></a>431</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Request::Common;</td></tr>
+<tr><td class="h"><a name="432"></a>432</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @parameters) = @_;</td></tr>
+<tr><td class="h"><a name="433"></a>433</td><td></td><td></td><td></td><td></td><td class="s"> my @suff = $self->_process_colonic_headers(\@parameters, (ref($parameters[1]) ? 2 : 1));</td></tr>
+<tr><td class="h"><a name="434"></a>434</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request( HTTP::Request::Common::PUT( @parameters ), @suff );</td></tr>
+<tr><td class="h"><a name="435"></a>435</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="436"></a>436</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="437"></a>437</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="438"></a>438</td><td></td><td></td><td></td><td></td><td class="s">sub delete {</td></tr>
+<tr><td class="h"><a name="439"></a>439</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Request::Common;</td></tr>
+<tr><td class="h"><a name="440"></a>440</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @parameters) = @_;</td></tr>
+<tr><td class="h"><a name="441"></a>441</td><td></td><td></td><td></td><td></td><td class="s"> my @suff = $self->_process_colonic_headers(\@parameters,1);</td></tr>
+<tr><td class="h"><a name="442"></a>442</td><td></td><td></td><td></td><td></td><td class="s"> return $self->request( HTTP::Request::Common::DELETE( @parameters ), @suff );</td></tr>
+<tr><td class="h"><a name="443"></a>443</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="444"></a>444</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="445"></a>445</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="446"></a>446</td><td></td><td></td><td></td><td></td><td class="s">sub _process_colonic_headers {</td></tr>
+<tr><td class="h"><a name="447"></a>447</td><td></td><td></td><td></td><td></td><td class="s"> # Process :content_cb / :content_file / :read_size_hint headers.</td></tr>
+<tr><td class="h"><a name="448"></a>448</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $args, $start_index) = @_;</td></tr>
+<tr><td class="h"><a name="449"></a>449</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="450"></a>450</td><td></td><td></td><td></td><td></td><td class="s"> my($arg, $size);</td></tr>
+<tr><td class="h"><a name="451"></a>451</td><td></td><td></td><td></td><td></td><td class="s"> for(my $i = $start_index; $i < @$args; $i += 2) {</td></tr>
+<tr><td class="h"><a name="452"></a>452</td><td></td><td></td><td></td><td></td><td class="s"> next unless defined $args->[$i];</td></tr>
+<tr><td class="h"><a name="453"></a>453</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="454"></a>454</td><td></td><td></td><td></td><td></td><td class="s"> #printf "Considering %s => %s\n", $args->[$i], $args->[$i + 1];</td></tr>
+<tr><td class="h"><a name="455"></a>455</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="456"></a>456</td><td></td><td></td><td></td><td></td><td class="s"> if($args->[$i] eq ':content_cb') {</td></tr>
+<tr><td class="h"><a name="457"></a>457</td><td></td><td></td><td></td><td></td><td class="s"> # Some sanity-checking...</td></tr>
+<tr><td class="h"><a name="458"></a>458</td><td></td><td></td><td></td><td></td><td class="s"> $arg = $args->[$i + 1];</td></tr>
+<tr><td class="h"><a name="459"></a>459</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("A :content_cb value can't be undef") unless defined $arg;</td></tr>
+<tr><td class="h"><a name="460"></a>460</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("A :content_cb value must be a coderef")</td></tr>
+<tr><td class="h"><a name="461"></a>461</td><td></td><td></td><td></td><td></td><td class="s"> unless ref $arg and UNIVERSAL::isa($arg, 'CODE');</td></tr>
+<tr><td class="h"><a name="462"></a>462</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="463"></a>463</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="464"></a>464</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($args->[$i] eq ':content_file') {</td></tr>
+<tr><td class="h"><a name="465"></a>465</td><td></td><td></td><td></td><td></td><td class="s"> $arg = $args->[$i + 1];</td></tr>
+<tr><td class="h"><a name="466"></a>466</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="467"></a>467</td><td></td><td></td><td></td><td></td><td class="s"> # Some sanity-checking...</td></tr>
+<tr><td class="h"><a name="468"></a>468</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("A :content_file value can't be undef")</td></tr>
+<tr><td class="h"><a name="469"></a>469</td><td></td><td></td><td></td><td></td><td class="s"> unless defined $arg;</td></tr>
+<tr><td class="h"><a name="470"></a>470</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("A :content_file value can't be a reference")</td></tr>
+<tr><td class="h"><a name="471"></a>471</td><td></td><td></td><td></td><td></td><td class="s"> if ref $arg;</td></tr>
+<tr><td class="h"><a name="472"></a>472</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("A :content_file value can't be \"\"")</td></tr>
+<tr><td class="h"><a name="473"></a>473</td><td></td><td></td><td></td><td></td><td class="s"> unless length $arg;</td></tr>
+<tr><td class="h"><a name="474"></a>474</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="475"></a>475</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="476"></a>476</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($args->[$i] eq ':read_size_hint') {</td></tr>
+<tr><td class="h"><a name="477"></a>477</td><td></td><td></td><td></td><td></td><td class="s"> $size = $args->[$i + 1];</td></tr>
+<tr><td class="h"><a name="478"></a>478</td><td></td><td></td><td></td><td></td><td class="s"> # Bother checking it?</td></tr>
+<tr><td class="h"><a name="479"></a>479</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="480"></a>480</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="481"></a>481</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="482"></a>482</td><td></td><td></td><td></td><td></td><td class="s"> next;</td></tr>
+<tr><td class="h"><a name="483"></a>483</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="484"></a>484</td><td></td><td></td><td></td><td></td><td class="s"> splice @$args, $i, 2;</td></tr>
+<tr><td class="h"><a name="485"></a>485</td><td></td><td></td><td></td><td></td><td class="s"> $i -= 2;</td></tr>
+<tr><td class="h"><a name="486"></a>486</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="487"></a>487</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="488"></a>488</td><td></td><td></td><td></td><td></td><td class="s"> # And return a suitable suffix-list for request(REQ,...)</td></tr>
+<tr><td class="h"><a name="489"></a>489</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="490"></a>490</td><td></td><td></td><td></td><td></td><td class="s"> return unless defined $arg;</td></tr>
+<tr><td class="h"><a name="491"></a>491</td><td></td><td></td><td></td><td></td><td class="s"> return $arg, $size if defined $size;</td></tr>
+<tr><td class="h"><a name="492"></a>492</td><td></td><td></td><td></td><td></td><td class="s"> return $arg;</td></tr>
+<tr><td class="h"><a name="493"></a>493</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="494"></a>494</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="495"></a>495</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="496"></a>496</td><td></td><td></td><td></td><td></td><td class="s">sub is_online {</td></tr>
+<tr><td class="h"><a name="497"></a>497</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="498"></a>498</td><td></td><td></td><td></td><td></td><td class="s"> return 1 if $self->get("http://www.msftncsi.com/ncsi.txt")->content eq "Microsoft NCSI";</td></tr>
+<tr><td class="h"><a name="499"></a>499</td><td></td><td></td><td></td><td></td><td class="s"> return 1 if $self->get("http://www.apple.com")->content =~ m,<title>Apple</title>,;</td></tr>
+<tr><td class="h"><a name="500"></a>500</td><td></td><td></td><td></td><td></td><td class="s"> return 0;</td></tr>
+<tr><td class="h"><a name="501"></a>501</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="502"></a>502</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="503"></a>503</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="504"></a>504</td><td class="c3">1</td><td class="c3"><span title="Avg 1µs">1µs</span></td><td></td><td></td><td class="s">my @ANI = qw(- \ | /);</td></tr>
+<tr><td class="h"><a name="505"></a>505</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="506"></a>506</td><td></td><td></td><td></td><td></td><td class="s">sub progress {</td></tr>
+<tr><td class="h"><a name="507"></a>507</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $status, $m) = @_;</td></tr>
+<tr><td class="h"><a name="508"></a>508</td><td></td><td></td><td></td><td></td><td class="s"> return unless $self->{show_progress};</td></tr>
+<tr><td class="h"><a name="509"></a>509</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="510"></a>510</td><td></td><td></td><td></td><td></td><td class="s"> local($,, $\);</td></tr>
+<tr><td class="h"><a name="511"></a>511</td><td></td><td></td><td></td><td></td><td class="s"> if ($status eq "begin") {</td></tr>
+<tr><td class="h"><a name="512"></a>512</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR "** ", $m->method, " ", $m->uri, " ==> ";</td></tr>
+<tr><td class="h"><a name="513"></a>513</td><td></td><td></td><td></td><td></td><td class="s"> $self->{progress_start} = time;</td></tr>
+<tr><td class="h"><a name="514"></a>514</td><td></td><td></td><td></td><td></td><td class="s"> $self->{progress_lastp} = "";</td></tr>
+<tr><td class="h"><a name="515"></a>515</td><td></td><td></td><td></td><td></td><td class="s"> $self->{progress_ani} = 0;</td></tr>
+<tr><td class="h"><a name="516"></a>516</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="517"></a>517</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($status eq "end") {</td></tr>
+<tr><td class="h"><a name="518"></a>518</td><td></td><td></td><td></td><td></td><td class="s"> delete $self->{progress_lastp};</td></tr>
+<tr><td class="h"><a name="519"></a>519</td><td></td><td></td><td></td><td></td><td class="s"> delete $self->{progress_ani};</td></tr>
+<tr><td class="h"><a name="520"></a>520</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR $m->status_line;</td></tr>
+<tr><td class="h"><a name="521"></a>521</td><td></td><td></td><td></td><td></td><td class="s"> my $t = time - delete $self->{progress_start};</td></tr>
+<tr><td class="h"><a name="522"></a>522</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR " (${t}s)" if $t;</td></tr>
+<tr><td class="h"><a name="523"></a>523</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR "\n";</td></tr>
+<tr><td class="h"><a name="524"></a>524</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="525"></a>525</td><td></td><td></td><td></td><td></td><td class="s"> elsif ($status eq "tick") {</td></tr>
+<tr><td class="h"><a name="526"></a>526</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR "$ANI[$self->{progress_ani}++]\b";</td></tr>
+<tr><td class="h"><a name="527"></a>527</td><td></td><td></td><td></td><td></td><td class="s"> $self->{progress_ani} %= @ANI;</td></tr>
+<tr><td class="h"><a name="528"></a>528</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="529"></a>529</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="530"></a>530</td><td></td><td></td><td></td><td></td><td class="s"> my $p = sprintf "%3.0f%%", $status * 100;</td></tr>
+<tr><td class="h"><a name="531"></a>531</td><td></td><td></td><td></td><td></td><td class="s"> return if $p eq $self->{progress_lastp};</td></tr>
+<tr><td class="h"><a name="532"></a>532</td><td></td><td></td><td></td><td></td><td class="s"> print STDERR "$p\b\b\b\b";</td></tr>
+<tr><td class="h"><a name="533"></a>533</td><td></td><td></td><td></td><td></td><td class="s"> $self->{progress_lastp} = $p;</td></tr>
+<tr><td class="h"><a name="534"></a>534</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="535"></a>535</td><td></td><td></td><td></td><td></td><td class="s"> STDERR->flush;</td></tr>
+<tr><td class="h"><a name="536"></a>536</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="537"></a>537</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="538"></a>538</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="539"></a>539</td><td></td><td></td><td></td><td></td><td class="s">#</td></tr>
+<tr><td class="h"><a name="540"></a>540</td><td></td><td></td><td></td><td></td><td class="s"># This whole allow/forbid thing is based on man 1 at's way of doing things.</td></tr>
+<tr><td class="h"><a name="541"></a>541</td><td></td><td></td><td></td><td></td><td class="s">#</td></tr>
+<tr><td class="h"><a name="542"></a>542</td><td></td><td></td><td></td><td></td><td class="s">sub is_protocol_supported</td></tr>
+<tr><td class="h"><a name="543"></a>543</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="544"></a>544</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $scheme) = @_;</td></tr>
+<tr><td class="h"><a name="545"></a>545</td><td></td><td></td><td></td><td></td><td class="s"> if (ref $scheme) {</td></tr>
+<tr><td class="h"><a name="546"></a>546</td><td></td><td></td><td></td><td></td><td class="s"> # assume we got a reference to an URI object</td></tr>
+<tr><td class="h"><a name="547"></a>547</td><td></td><td></td><td></td><td></td><td class="s"> $scheme = $scheme->scheme;</td></tr>
+<tr><td class="h"><a name="548"></a>548</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="549"></a>549</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="550"></a>550</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("Illegal scheme '$scheme' passed to is_protocol_supported")</td></tr>
+<tr><td class="h"><a name="551"></a>551</td><td></td><td></td><td></td><td></td><td class="s"> if $scheme =~ /\W/;</td></tr>
+<tr><td class="h"><a name="552"></a>552</td><td></td><td></td><td></td><td></td><td class="s"> $scheme = lc $scheme;</td></tr>
+<tr><td class="h"><a name="553"></a>553</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="554"></a>554</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="555"></a>555</td><td></td><td></td><td></td><td></td><td class="s"> my $x;</td></tr>
+<tr><td class="h"><a name="556"></a>556</td><td></td><td></td><td></td><td></td><td class="s"> if(ref($self) and $x = $self->protocols_allowed) {</td></tr>
+<tr><td class="h"><a name="557"></a>557</td><td></td><td></td><td></td><td></td><td class="s"> return 0 unless grep lc($_) eq $scheme, @$x;</td></tr>
+<tr><td class="h"><a name="558"></a>558</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="559"></a>559</td><td></td><td></td><td></td><td></td><td class="s"> elsif (ref($self) and $x = $self->protocols_forbidden) {</td></tr>
+<tr><td class="h"><a name="560"></a>560</td><td></td><td></td><td></td><td></td><td class="s"> return 0 if grep lc($_) eq $scheme, @$x;</td></tr>
+<tr><td class="h"><a name="561"></a>561</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="562"></a>562</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="563"></a>563</td><td></td><td></td><td></td><td></td><td class="s"> local($SIG{__DIE__}); # protect against user defined die handlers</td></tr>
+<tr><td class="h"><a name="564"></a>564</td><td></td><td></td><td></td><td></td><td class="s"> $x = LWP::Protocol::implementor($scheme);</td></tr>
+<tr><td class="h"><a name="565"></a>565</td><td></td><td></td><td></td><td></td><td class="s"> return 1 if $x and $x ne 'LWP::Protocol::nogo';</td></tr>
+<tr><td class="h"><a name="566"></a>566</td><td></td><td></td><td></td><td></td><td class="s"> return 0;</td></tr>
+<tr><td class="h"><a name="567"></a>567</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="568"></a>568</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="569"></a>569</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="570"></a>570</td><td></td><td></td><td></td><td></td><td class="s">sub protocols_allowed { shift->_elem('protocols_allowed' , @_) }</td></tr>
+<tr><td class="h"><a name="571"></a>571</td><td></td><td></td><td></td><td></td><td class="s">sub protocols_forbidden { shift->_elem('protocols_forbidden' , @_) }</td></tr>
+<tr><td class="h"><a name="572"></a>572</td><td></td><td></td><td></td><td></td><td class="s">sub requests_redirectable { shift->_elem('requests_redirectable', @_) }</td></tr>
+<tr><td class="h"><a name="573"></a>573</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="574"></a>574</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="575"></a>575</td><td></td><td></td><td></td><td></td><td class="s">sub redirect_ok</td></tr>
+<tr><td class="h"><a name="576"></a>576</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="577"></a>577</td><td></td><td></td><td></td><td></td><td class="s"> # RFC 2616, section 10.3.2 and 10.3.3 say:</td></tr>
+<tr><td class="h"><a name="578"></a>578</td><td></td><td></td><td></td><td></td><td class="s"> # If the 30[12] status code is received in response to a request other</td></tr>
+<tr><td class="h"><a name="579"></a>579</td><td></td><td></td><td></td><td></td><td class="s"> # than GET or HEAD, the user agent MUST NOT automatically redirect the</td></tr>
+<tr><td class="h"><a name="580"></a>580</td><td></td><td></td><td></td><td></td><td class="s"> # request unless it can be confirmed by the user, since this might</td></tr>
+<tr><td class="h"><a name="581"></a>581</td><td></td><td></td><td></td><td></td><td class="s"> # change the conditions under which the request was issued.</td></tr>
+<tr><td class="h"><a name="582"></a>582</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="583"></a>583</td><td></td><td></td><td></td><td></td><td class="s"> # Note that this routine used to be just:</td></tr>
+<tr><td class="h"><a name="584"></a>584</td><td></td><td></td><td></td><td></td><td class="s"> # return 0 if $_[1]->method eq "POST"; return 1;</td></tr>
+<tr><td class="h"><a name="585"></a>585</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="586"></a>586</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $new_request, $response) = @_;</td></tr>
+<tr><td class="h"><a name="587"></a>587</td><td></td><td></td><td></td><td></td><td class="s"> my $method = $response->request->method;</td></tr>
+<tr><td class="h"><a name="588"></a>588</td><td></td><td></td><td></td><td></td><td class="s"> return 0 unless grep $_ eq $method,</td></tr>
+<tr><td class="h"><a name="589"></a>589</td><td></td><td></td><td></td><td></td><td class="s"> @{ $self->requests_redirectable || [] };</td></tr>
+<tr><td class="h"><a name="590"></a>590</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="591"></a>591</td><td></td><td></td><td></td><td></td><td class="s"> if ($new_request->uri->scheme eq 'file') {</td></tr>
+<tr><td class="h"><a name="592"></a>592</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" =></td></tr>
+<tr><td class="h"><a name="593"></a>593</td><td></td><td></td><td></td><td></td><td class="s"> "Can't redirect to a file:// URL!");</td></tr>
+<tr><td class="h"><a name="594"></a>594</td><td></td><td></td><td></td><td></td><td class="s"> return 0;</td></tr>
+<tr><td class="h"><a name="595"></a>595</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="596"></a>596</td><td></td><td></td><td></td><td></td><td class="s"> </td></tr>
+<tr><td class="h"><a name="597"></a>597</td><td></td><td></td><td></td><td></td><td class="s"> # Otherwise it's apparently okay...</td></tr>
+<tr><td class="h"><a name="598"></a>598</td><td></td><td></td><td></td><td></td><td class="s"> return 1;</td></tr>
+<tr><td class="h"><a name="599"></a>599</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="600"></a>600</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="601"></a>601</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="602"></a>602</td><td></td><td></td><td></td><td></td><td class="s">sub credentials</td></tr>
+<tr><td class="h"><a name="603"></a>603</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="604"></a>604</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="605"></a>605</td><td></td><td></td><td></td><td></td><td class="s"> my $netloc = lc(shift);</td></tr>
+<tr><td class="h"><a name="606"></a>606</td><td></td><td></td><td></td><td></td><td class="s"> my $realm = shift || "";</td></tr>
+<tr><td class="h"><a name="607"></a>607</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->{basic_authentication}{$netloc}{$realm};</td></tr>
+<tr><td class="h"><a name="608"></a>608</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="609"></a>609</td><td></td><td></td><td></td><td></td><td class="s"> $self->{basic_authentication}{$netloc}{$realm} = [@_];</td></tr>
+<tr><td class="h"><a name="610"></a>610</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="611"></a>611</td><td></td><td></td><td></td><td></td><td class="s"> return unless $old;</td></tr>
+<tr><td class="h"><a name="612"></a>612</td><td></td><td></td><td></td><td></td><td class="s"> return @$old if wantarray;</td></tr>
+<tr><td class="h"><a name="613"></a>613</td><td></td><td></td><td></td><td></td><td class="s"> return join(":", @$old);</td></tr>
+<tr><td class="h"><a name="614"></a>614</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="615"></a>615</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="616"></a>616</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="617"></a>617</td><td></td><td></td><td></td><td></td><td class="s">sub get_basic_credentials</td></tr>
+<tr><td class="h"><a name="618"></a>618</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="619"></a>619</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $realm, $uri, $proxy) = @_;</td></tr>
+<tr><td class="h"><a name="620"></a>620</td><td></td><td></td><td></td><td></td><td class="s"> return if $proxy;</td></tr>
+<tr><td class="h"><a name="621"></a>621</td><td></td><td></td><td></td><td></td><td class="s"> return $self->credentials($uri->host_port, $realm);</td></tr>
+<tr><td class="h"><a name="622"></a>622</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="623"></a>623</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="624"></a>624</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="625"></a>625</td><td></td><td></td><td></td><td></td><td class="s">sub timeout { shift->_elem('timeout', @_); }</td></tr>
+<tr><td class="h"><a name="626"></a>626</td><td></td><td></td><td></td><td></td><td class="s">sub local_address{ shift->_elem('local_address',@_); }</td></tr>
+<tr><td class="h"><a name="627"></a>627</td><td></td><td></td><td></td><td></td><td class="s">sub max_size { shift->_elem('max_size', @_); }</td></tr>
+<tr><td class="h"><a name="628"></a>628</td><td></td><td></td><td></td><td></td><td class="s">sub max_redirect { shift->_elem('max_redirect', @_); }</td></tr>
+<tr><td class="h"><a name="629"></a>629</td><td></td><td></td><td></td><td></td><td class="s">sub show_progress{ shift->_elem('show_progress', @_); }</td></tr>
+<tr><td class="h"><a name="630"></a>630</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="631"></a>631</td><td></td><td></td><td></td><td></td><td class="s">sub ssl_opts {</td></tr>
+<tr><td class="h"><a name="632"></a>632</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="633"></a>633</td><td></td><td></td><td></td><td></td><td class="s"> if (@_ == 1) {</td></tr>
+<tr><td class="h"><a name="634"></a>634</td><td></td><td></td><td></td><td></td><td class="s"> my $k = shift;</td></tr>
+<tr><td class="h"><a name="635"></a>635</td><td></td><td></td><td></td><td></td><td class="s"> return $self->{ssl_opts}{$k};</td></tr>
+<tr><td class="h"><a name="636"></a>636</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="637"></a>637</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="638"></a>638</td><td></td><td></td><td></td><td></td><td class="s"> my $old;</td></tr>
+<tr><td class="h"><a name="639"></a>639</td><td></td><td></td><td></td><td></td><td class="s"> while (@_) {</td></tr>
+<tr><td class="h"><a name="640"></a>640</td><td></td><td></td><td></td><td></td><td class="s"> my($k, $v) = splice(@_, 0, 2);</td></tr>
+<tr><td class="h"><a name="641"></a>641</td><td></td><td></td><td></td><td></td><td class="s"> $old = $self->{ssl_opts}{$k} unless @_;</td></tr>
+<tr><td class="h"><a name="642"></a>642</td><td></td><td></td><td></td><td></td><td class="s"> if (defined $v) {</td></tr>
+<tr><td class="h"><a name="643"></a>643</td><td></td><td></td><td></td><td></td><td class="s"> $self->{ssl_opts}{$k} = $v;</td></tr>
+<tr><td class="h"><a name="644"></a>644</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="645"></a>645</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="646"></a>646</td><td></td><td></td><td></td><td></td><td class="s"> delete $self->{ssl_opts}{$k};</td></tr>
+<tr><td class="h"><a name="647"></a>647</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="648"></a>648</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="649"></a>649</td><td></td><td></td><td></td><td></td><td class="s"> %{$self->{ssl_opts}} = (%{$self->{ssl_opts}}, @_);</td></tr>
+<tr><td class="h"><a name="650"></a>650</td><td></td><td></td><td></td><td></td><td class="s"> return $old;</td></tr>
+<tr><td class="h"><a name="651"></a>651</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="652"></a>652</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="653"></a>653</td><td></td><td></td><td></td><td></td><td class="s"> return keys %{$self->{ssl_opts}};</td></tr>
+<tr><td class="h"><a name="654"></a>654</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="655"></a>655</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="656"></a>656</td><td></td><td></td><td></td><td></td><td class="s">sub parse_head {</td></tr>
+<tr><td class="h"><a name="657"></a>657</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="658"></a>658</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="659"></a>659</td><td></td><td></td><td></td><td></td><td class="s"> my $flag = shift;</td></tr>
+<tr><td class="h"><a name="660"></a>660</td><td></td><td></td><td></td><td></td><td class="s"> my $parser;</td></tr>
+<tr><td class="h"><a name="661"></a>661</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->set_my_handler("response_header", $flag ? sub {</td></tr>
+<tr><td class="h"><a name="662"></a>662</td><td></td><td></td><td></td><td></td><td class="s"> my($response, $ua) = @_;</td></tr>
+<tr><td class="h"><a name="663"></a>663</td><td></td><td></td><td></td><td></td><td class="s"> require HTML::HeadParser;</td></tr>
+<tr><td class="h"><a name="664"></a>664</td><td></td><td></td><td></td><td></td><td class="s"> $parser = HTML::HeadParser->new;</td></tr>
+<tr><td class="h"><a name="665"></a>665</td><td></td><td></td><td></td><td></td><td class="s"> $parser->xml_mode(1) if $response->content_is_xhtml;</td></tr>
+<tr><td class="h"><a name="666"></a>666</td><td></td><td></td><td></td><td></td><td class="s"> $parser->utf8_mode(1) if $] >= 5.008 && $HTML::Parser::VERSION >= 3.40;</td></tr>
+<tr><td class="h"><a name="667"></a>667</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="668"></a>668</td><td></td><td></td><td></td><td></td><td class="s"> push(@{$response->{handlers}{response_data}}, {</td></tr>
+<tr><td class="h"><a name="669"></a>669</td><td></td><td></td><td></td><td></td><td class="s"> callback => sub {</td></tr>
+<tr><td class="h"><a name="670"></a>670</td><td></td><td></td><td></td><td></td><td class="s"> return unless $parser;</td></tr>
+<tr><td class="h"><a name="671"></a>671</td><td></td><td></td><td></td><td></td><td class="s"> unless ($parser->parse($_[3])) {</td></tr>
+<tr><td class="h"><a name="672"></a>672</td><td></td><td></td><td></td><td></td><td class="s"> my $h = $parser->header;</td></tr>
+<tr><td class="h"><a name="673"></a>673</td><td></td><td></td><td></td><td></td><td class="s"> my $r = $_[0];</td></tr>
+<tr><td class="h"><a name="674"></a>674</td><td></td><td></td><td></td><td></td><td class="s"> for my $f ($h->header_field_names) {</td></tr>
+<tr><td class="h"><a name="675"></a>675</td><td></td><td></td><td></td><td></td><td class="s"> $r->init_header($f, [$h->header($f)]);</td></tr>
+<tr><td class="h"><a name="676"></a>676</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="677"></a>677</td><td></td><td></td><td></td><td></td><td class="s"> undef($parser);</td></tr>
+<tr><td class="h"><a name="678"></a>678</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="679"></a>679</td><td></td><td></td><td></td><td></td><td class="s"> },</td></tr>
+<tr><td class="h"><a name="680"></a>680</td><td></td><td></td><td></td><td></td><td class="s"> });</td></tr>
+<tr><td class="h"><a name="681"></a>681</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="682"></a>682</td><td></td><td></td><td></td><td></td><td class="s"> } : undef,</td></tr>
+<tr><td class="h"><a name="683"></a>683</td><td></td><td></td><td></td><td></td><td class="s"> m_media_type => "html",</td></tr>
+<tr><td class="h"><a name="684"></a>684</td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
+<tr><td class="h"><a name="685"></a>685</td><td></td><td></td><td></td><td></td><td class="s"> return !!$old;</td></tr>
+<tr><td class="h"><a name="686"></a>686</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="687"></a>687</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="688"></a>688</td><td></td><td></td><td></td><td></td><td class="s"> return !!$self->get_my_handler("response_header");</td></tr>
+<tr><td class="h"><a name="689"></a>689</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="690"></a>690</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="691"></a>691</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="692"></a>692</td><td></td><td></td><td></td><td></td><td class="s">sub cookie_jar {</td></tr>
+<tr><td class="h"><a name="693"></a>693</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="694"></a>694</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->{cookie_jar};</td></tr>
+<tr><td class="h"><a name="695"></a>695</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="696"></a>696</td><td></td><td></td><td></td><td></td><td class="s"> my $jar = shift;</td></tr>
+<tr><td class="h"><a name="697"></a>697</td><td></td><td></td><td></td><td></td><td class="s"> if (ref($jar) eq "HASH") {</td></tr>
+<tr><td class="h"><a name="698"></a>698</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Cookies;</td></tr>
+<tr><td class="h"><a name="699"></a>699</td><td></td><td></td><td></td><td></td><td class="s"> $jar = HTTP::Cookies->new(%$jar);</td></tr>
+<tr><td class="h"><a name="700"></a>700</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="701"></a>701</td><td></td><td></td><td></td><td></td><td class="s"> $self->{cookie_jar} = $jar;</td></tr>
+<tr><td class="h"><a name="702"></a>702</td><td></td><td></td><td></td><td></td><td class="s"> $self->set_my_handler("request_prepare",</td></tr>
+<tr><td class="h"><a name="703"></a>703</td><td></td><td></td><td></td><td></td><td class="s"> $jar ? sub { $jar->add_cookie_header($_[0]); } : undef,</td></tr>
+<tr><td class="h"><a name="704"></a>704</td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
+<tr><td class="h"><a name="705"></a>705</td><td></td><td></td><td></td><td></td><td class="s"> $self->set_my_handler("response_done",</td></tr>
+<tr><td class="h"><a name="706"></a>706</td><td></td><td></td><td></td><td></td><td class="s"> $jar ? sub { $jar->extract_cookies($_[0]); } : undef,</td></tr>
+<tr><td class="h"><a name="707"></a>707</td><td></td><td></td><td></td><td></td><td class="s"> );</td></tr>
+<tr><td class="h"><a name="708"></a>708</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="709"></a>709</td><td></td><td></td><td></td><td></td><td class="s"> $old;</td></tr>
+<tr><td class="h"><a name="710"></a>710</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="711"></a>711</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="712"></a>712</td><td></td><td></td><td></td><td></td><td class="s">sub default_headers {</td></tr>
+<tr><td class="h"><a name="713"></a>713</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="714"></a>714</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->{def_headers} ||= HTTP::Headers->new;</td></tr>
+<tr><td class="h"><a name="715"></a>715</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="716"></a>716</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("default_headers not set to HTTP::Headers compatible object")</td></tr>
+<tr><td class="h"><a name="717"></a>717</td><td></td><td></td><td></td><td></td><td class="s"> unless @_ == 1 && $_[0]->can("header_field_names");</td></tr>
+<tr><td class="h"><a name="718"></a>718</td><td></td><td></td><td></td><td></td><td class="s"> $self->{def_headers} = shift;</td></tr>
+<tr><td class="h"><a name="719"></a>719</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="720"></a>720</td><td></td><td></td><td></td><td></td><td class="s"> return $old;</td></tr>
+<tr><td class="h"><a name="721"></a>721</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="722"></a>722</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="723"></a>723</td><td></td><td></td><td></td><td></td><td class="s">sub default_header {</td></tr>
+<tr><td class="h"><a name="724"></a>724</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="725"></a>725</td><td></td><td></td><td></td><td></td><td class="s"> return $self->default_headers->header(@_);</td></tr>
+<tr><td class="h"><a name="726"></a>726</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="727"></a>727</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="728"></a>728</td><td></td><td></td><td></td><td></td><td class="s">sub _agent { "libwww-perl/$LWP::VERSION" }</td></tr>
+<tr><td class="h"><a name="729"></a>729</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="730"></a>730</td><td></td><td></td><td></td><td></td><td class="s">sub agent {</td></tr>
+<tr><td class="h"><a name="731"></a>731</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="732"></a>732</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="733"></a>733</td><td></td><td></td><td></td><td></td><td class="s"> my $agent = shift;</td></tr>
+<tr><td class="h"><a name="734"></a>734</td><td></td><td></td><td></td><td></td><td class="s"> if ($agent) {</td></tr>
+<tr><td class="h"><a name="735"></a>735</td><td></td><td></td><td></td><td></td><td class="s"> $agent .= $self->_agent if $agent =~ /\s+$/;</td></tr>
+<tr><td class="h"><a name="736"></a>736</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="737"></a>737</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="738"></a>738</td><td></td><td></td><td></td><td></td><td class="s"> undef($agent)</td></tr>
+<tr><td class="h"><a name="739"></a>739</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="740"></a>740</td><td></td><td></td><td></td><td></td><td class="s"> return $self->default_header("User-Agent", $agent);</td></tr>
+<tr><td class="h"><a name="741"></a>741</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="742"></a>742</td><td></td><td></td><td></td><td></td><td class="s"> return $self->default_header("User-Agent");</td></tr>
+<tr><td class="h"><a name="743"></a>743</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="744"></a>744</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="745"></a>745</td><td></td><td></td><td></td><td></td><td class="s">sub from { # legacy</td></tr>
+<tr><td class="h"><a name="746"></a>746</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="747"></a>747</td><td></td><td></td><td></td><td></td><td class="s"> return $self->default_header("From", @_);</td></tr>
+<tr><td class="h"><a name="748"></a>748</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="749"></a>749</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="750"></a>750</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="751"></a>751</td><td></td><td></td><td></td><td></td><td class="s">sub conn_cache {</td></tr>
+<tr><td class="h"><a name="752"></a>752</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="753"></a>753</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->{conn_cache};</td></tr>
+<tr><td class="h"><a name="754"></a>754</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="755"></a>755</td><td></td><td></td><td></td><td></td><td class="s"> my $cache = shift;</td></tr>
+<tr><td class="h"><a name="756"></a>756</td><td></td><td></td><td></td><td></td><td class="s"> if (ref($cache) eq "HASH") {</td></tr>
+<tr><td class="h"><a name="757"></a>757</td><td></td><td></td><td></td><td></td><td class="s"> require LWP::ConnCache;</td></tr>
+<tr><td class="h"><a name="758"></a>758</td><td></td><td></td><td></td><td></td><td class="s"> $cache = LWP::ConnCache->new(%$cache);</td></tr>
+<tr><td class="h"><a name="759"></a>759</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="760"></a>760</td><td></td><td></td><td></td><td></td><td class="s"> $self->{conn_cache} = $cache;</td></tr>
+<tr><td class="h"><a name="761"></a>761</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="762"></a>762</td><td></td><td></td><td></td><td></td><td class="s"> $old;</td></tr>
+<tr><td class="h"><a name="763"></a>763</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="764"></a>764</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="765"></a>765</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="766"></a>766</td><td></td><td></td><td></td><td></td><td class="s">sub add_handler {</td></tr>
+<tr><td class="h"><a name="767"></a>767</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $phase, $cb, %spec) = @_;</td></tr>
+<tr><td class="h"><a name="768"></a>768</td><td></td><td></td><td></td><td></td><td class="s"> $spec{line} ||= join(":", (caller)[1,2]);</td></tr>
+<tr><td class="h"><a name="769"></a>769</td><td></td><td></td><td></td><td></td><td class="s"> my $conf = $self->{handlers}{$phase} ||= do {</td></tr>
+<tr><td class="h"><a name="770"></a>770</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Config;</td></tr>
+<tr><td class="h"><a name="771"></a>771</td><td></td><td></td><td></td><td></td><td class="s"> HTTP::Config->new;</td></tr>
+<tr><td class="h"><a name="772"></a>772</td><td></td><td></td><td></td><td></td><td class="s"> };</td></tr>
+<tr><td class="h"><a name="773"></a>773</td><td></td><td></td><td></td><td></td><td class="s"> $conf->add(%spec, callback => $cb);</td></tr>
+<tr><td class="h"><a name="774"></a>774</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="775"></a>775</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="776"></a>776</td><td></td><td></td><td></td><td></td><td class="s">sub set_my_handler {</td></tr>
+<tr><td class="h"><a name="777"></a>777</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $phase, $cb, %spec) = @_;</td></tr>
+<tr><td class="h"><a name="778"></a>778</td><td></td><td></td><td></td><td></td><td class="s"> $spec{owner} = (caller(1))[3] unless exists $spec{owner};</td></tr>
+<tr><td class="h"><a name="779"></a>779</td><td></td><td></td><td></td><td></td><td class="s"> $self->remove_handler($phase, %spec);</td></tr>
+<tr><td class="h"><a name="780"></a>780</td><td></td><td></td><td></td><td></td><td class="s"> $spec{line} ||= join(":", (caller)[1,2]);</td></tr>
+<tr><td class="h"><a name="781"></a>781</td><td></td><td></td><td></td><td></td><td class="s"> $self->add_handler($phase, $cb, %spec) if $cb;</td></tr>
+<tr><td class="h"><a name="782"></a>782</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="783"></a>783</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="784"></a>784</td><td></td><td></td><td></td><td></td><td class="s">sub get_my_handler {</td></tr>
+<tr><td class="h"><a name="785"></a>785</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="786"></a>786</td><td></td><td></td><td></td><td></td><td class="s"> my $phase = shift;</td></tr>
+<tr><td class="h"><a name="787"></a>787</td><td></td><td></td><td></td><td></td><td class="s"> my $init = pop if @_ % 2;</td></tr>
+<tr><td class="h"><a name="788"></a>788</td><td></td><td></td><td></td><td></td><td class="s"> my %spec = @_;</td></tr>
+<tr><td class="h"><a name="789"></a>789</td><td></td><td></td><td></td><td></td><td class="s"> my $conf = $self->{handlers}{$phase};</td></tr>
+<tr><td class="h"><a name="790"></a>790</td><td></td><td></td><td></td><td></td><td class="s"> unless ($conf) {</td></tr>
+<tr><td class="h"><a name="791"></a>791</td><td></td><td></td><td></td><td></td><td class="s"> return unless $init;</td></tr>
+<tr><td class="h"><a name="792"></a>792</td><td></td><td></td><td></td><td></td><td class="s"> require HTTP::Config;</td></tr>
+<tr><td class="h"><a name="793"></a>793</td><td></td><td></td><td></td><td></td><td class="s"> $conf = $self->{handlers}{$phase} = HTTP::Config->new;</td></tr>
+<tr><td class="h"><a name="794"></a>794</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="795"></a>795</td><td></td><td></td><td></td><td></td><td class="s"> $spec{owner} = (caller(1))[3] unless exists $spec{owner};</td></tr>
+<tr><td class="h"><a name="796"></a>796</td><td></td><td></td><td></td><td></td><td class="s"> my @h = $conf->find(%spec);</td></tr>
+<tr><td class="h"><a name="797"></a>797</td><td></td><td></td><td></td><td></td><td class="s"> if (!@h && $init) {</td></tr>
+<tr><td class="h"><a name="798"></a>798</td><td></td><td></td><td></td><td></td><td class="s"> if (ref($init) eq "CODE") {</td></tr>
+<tr><td class="h"><a name="799"></a>799</td><td></td><td></td><td></td><td></td><td class="s"> $init->(\%spec);</td></tr>
+<tr><td class="h"><a name="800"></a>800</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="801"></a>801</td><td></td><td></td><td></td><td></td><td class="s"> elsif (ref($init) eq "HASH") {</td></tr>
+<tr><td class="h"><a name="802"></a>802</td><td></td><td></td><td></td><td></td><td class="s"> while (my($k, $v) = each %$init) {</td></tr>
+<tr><td class="h"><a name="803"></a>803</td><td></td><td></td><td></td><td></td><td class="s"> $spec{$k} = $v;</td></tr>
+<tr><td class="h"><a name="804"></a>804</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="805"></a>805</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="806"></a>806</td><td></td><td></td><td></td><td></td><td class="s"> $spec{callback} ||= sub {};</td></tr>
+<tr><td class="h"><a name="807"></a>807</td><td></td><td></td><td></td><td></td><td class="s"> $spec{line} ||= join(":", (caller)[1,2]);</td></tr>
+<tr><td class="h"><a name="808"></a>808</td><td></td><td></td><td></td><td></td><td class="s"> $conf->add(\%spec);</td></tr>
+<tr><td class="h"><a name="809"></a>809</td><td></td><td></td><td></td><td></td><td class="s"> return \%spec;</td></tr>
+<tr><td class="h"><a name="810"></a>810</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="811"></a>811</td><td></td><td></td><td></td><td></td><td class="s"> return wantarray ? @h : $h[0];</td></tr>
+<tr><td class="h"><a name="812"></a>812</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="813"></a>813</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="814"></a>814</td><td></td><td></td><td></td><td></td><td class="s">sub remove_handler {</td></tr>
+<tr><td class="h"><a name="815"></a>815</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $phase, %spec) = @_;</td></tr>
+<tr><td class="h"><a name="816"></a>816</td><td></td><td></td><td></td><td></td><td class="s"> if ($phase) {</td></tr>
+<tr><td class="h"><a name="817"></a>817</td><td></td><td></td><td></td><td></td><td class="s"> my $conf = $self->{handlers}{$phase} || return;</td></tr>
+<tr><td class="h"><a name="818"></a>818</td><td></td><td></td><td></td><td></td><td class="s"> my @h = $conf->remove(%spec);</td></tr>
+<tr><td class="h"><a name="819"></a>819</td><td></td><td></td><td></td><td></td><td class="s"> delete $self->{handlers}{$phase} if $conf->empty;</td></tr>
+<tr><td class="h"><a name="820"></a>820</td><td></td><td></td><td></td><td></td><td class="s"> return @h;</td></tr>
+<tr><td class="h"><a name="821"></a>821</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="822"></a>822</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="823"></a>823</td><td></td><td></td><td></td><td></td><td class="s"> return unless $self->{handlers};</td></tr>
+<tr><td class="h"><a name="824"></a>824</td><td></td><td></td><td></td><td></td><td class="s"> return map $self->remove_handler($_), sort keys %{$self->{handlers}};</td></tr>
+<tr><td class="h"><a name="825"></a>825</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="826"></a>826</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="827"></a>827</td><td></td><td></td><td></td><td></td><td class="s">sub handlers {</td></tr>
+<tr><td class="h"><a name="828"></a>828</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $phase, $o) = @_;</td></tr>
+<tr><td class="h"><a name="829"></a>829</td><td></td><td></td><td></td><td></td><td class="s"> my @h;</td></tr>
+<tr><td class="h"><a name="830"></a>830</td><td></td><td></td><td></td><td></td><td class="s"> if ($o->{handlers} && $o->{handlers}{$phase}) {</td></tr>
+<tr><td class="h"><a name="831"></a>831</td><td></td><td></td><td></td><td></td><td class="s"> push(@h, @{$o->{handlers}{$phase}});</td></tr>
+<tr><td class="h"><a name="832"></a>832</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="833"></a>833</td><td></td><td></td><td></td><td></td><td class="s"> if (my $conf = $self->{handlers}{$phase}) {</td></tr>
+<tr><td class="h"><a name="834"></a>834</td><td></td><td></td><td></td><td></td><td class="s"> push(@h, $conf->matching($o));</td></tr>
+<tr><td class="h"><a name="835"></a>835</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="836"></a>836</td><td></td><td></td><td></td><td></td><td class="s"> return @h;</td></tr>
+<tr><td class="h"><a name="837"></a>837</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="838"></a>838</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="839"></a>839</td><td></td><td></td><td></td><td></td><td class="s">sub run_handlers {</td></tr>
+<tr><td class="h"><a name="840"></a>840</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $phase, $o) = @_;</td></tr>
+<tr><td class="h"><a name="841"></a>841</td><td></td><td></td><td></td><td></td><td class="s"> if (defined(wantarray)) {</td></tr>
+<tr><td class="h"><a name="842"></a>842</td><td></td><td></td><td></td><td></td><td class="s"> for my $h ($self->handlers($phase, $o)) {</td></tr>
+<tr><td class="h"><a name="843"></a>843</td><td></td><td></td><td></td><td></td><td class="s"> my $ret = $h->{callback}->($o, $self, $h);</td></tr>
+<tr><td class="h"><a name="844"></a>844</td><td></td><td></td><td></td><td></td><td class="s"> return $ret if $ret;</td></tr>
+<tr><td class="h"><a name="845"></a>845</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="846"></a>846</td><td></td><td></td><td></td><td></td><td class="s"> return undef;</td></tr>
+<tr><td class="h"><a name="847"></a>847</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="848"></a>848</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="849"></a>849</td><td></td><td></td><td></td><td></td><td class="s"> for my $h ($self->handlers($phase, $o)) {</td></tr>
+<tr><td class="h"><a name="850"></a>850</td><td></td><td></td><td></td><td></td><td class="s"> $h->{callback}->($o, $self, $h);</td></tr>
+<tr><td class="h"><a name="851"></a>851</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="852"></a>852</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="853"></a>853</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="854"></a>854</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="855"></a>855</td><td></td><td></td><td></td><td></td><td class="s"># depreciated</td></tr>
+<tr><td class="h"><a name="856"></a>856</td><td></td><td></td><td></td><td></td><td class="s">sub use_eval { shift->_elem('use_eval', @_); }</td></tr>
+<tr><td class="h"><a name="857"></a>857</td><td></td><td></td><td></td><td></td><td class="s">sub use_alarm</td></tr>
+<tr><td class="h"><a name="858"></a>858</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="859"></a>859</td><td></td><td></td><td></td><td></td><td class="s"> Carp::carp("LWP::UserAgent->use_alarm(BOOL) is a no-op")</td></tr>
+<tr><td class="h"><a name="860"></a>860</td><td></td><td></td><td></td><td></td><td class="s"> if @_ > 1 && $^W;</td></tr>
+<tr><td class="h"><a name="861"></a>861</td><td></td><td></td><td></td><td></td><td class="s"> "";</td></tr>
+<tr><td class="h"><a name="862"></a>862</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="863"></a>863</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="864"></a>864</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="865"></a>865</td><td></td><td></td><td></td><td></td><td class="s">sub clone</td></tr>
+<tr><td class="h"><a name="866"></a>866</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="867"></a>867</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="868"></a>868</td><td></td><td></td><td></td><td></td><td class="s"> my $copy = bless { %$self }, ref $self; # copy most fields</td></tr>
+<tr><td class="h"><a name="869"></a>869</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="870"></a>870</td><td></td><td></td><td></td><td></td><td class="s"> delete $copy->{handlers};</td></tr>
+<tr><td class="h"><a name="871"></a>871</td><td></td><td></td><td></td><td></td><td class="s"> delete $copy->{conn_cache};</td></tr>
+<tr><td class="h"><a name="872"></a>872</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="873"></a>873</td><td></td><td></td><td></td><td></td><td class="s"> # copy any plain arrays and hashes; known not to need recursive copy</td></tr>
+<tr><td class="h"><a name="874"></a>874</td><td></td><td></td><td></td><td></td><td class="s"> for my $k (qw(proxy no_proxy requests_redirectable ssl_opts)) {</td></tr>
+<tr><td class="h"><a name="875"></a>875</td><td></td><td></td><td></td><td></td><td class="s"> next unless $copy->{$k};</td></tr>
+<tr><td class="h"><a name="876"></a>876</td><td></td><td></td><td></td><td></td><td class="s"> if (ref($copy->{$k}) eq "ARRAY") {</td></tr>
+<tr><td class="h"><a name="877"></a>877</td><td></td><td></td><td></td><td></td><td class="s"> $copy->{$k} = [ @{$copy->{$k}} ];</td></tr>
+<tr><td class="h"><a name="878"></a>878</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="879"></a>879</td><td></td><td></td><td></td><td></td><td class="s"> elsif (ref($copy->{$k}) eq "HASH") {</td></tr>
+<tr><td class="h"><a name="880"></a>880</td><td></td><td></td><td></td><td></td><td class="s"> $copy->{$k} = { %{$copy->{$k}} };</td></tr>
+<tr><td class="h"><a name="881"></a>881</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="882"></a>882</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="883"></a>883</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="884"></a>884</td><td></td><td></td><td></td><td></td><td class="s"> if ($self->{def_headers}) {</td></tr>
+<tr><td class="h"><a name="885"></a>885</td><td></td><td></td><td></td><td></td><td class="s"> $copy->{def_headers} = $self->{def_headers}->clone;</td></tr>
+<tr><td class="h"><a name="886"></a>886</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="887"></a>887</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="888"></a>888</td><td></td><td></td><td></td><td></td><td class="s"> # re-enable standard handlers</td></tr>
+<tr><td class="h"><a name="889"></a>889</td><td></td><td></td><td></td><td></td><td class="s"> $copy->parse_head($self->parse_head);</td></tr>
+<tr><td class="h"><a name="890"></a>890</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="891"></a>891</td><td></td><td></td><td></td><td></td><td class="s"> # no easy way to clone the cookie jar; so let's just remove it for now</td></tr>
+<tr><td class="h"><a name="892"></a>892</td><td></td><td></td><td></td><td></td><td class="s"> $copy->cookie_jar(undef);</td></tr>
+<tr><td class="h"><a name="893"></a>893</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="894"></a>894</td><td></td><td></td><td></td><td></td><td class="s"> $copy;</td></tr>
+<tr><td class="h"><a name="895"></a>895</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="896"></a>896</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="897"></a>897</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="898"></a>898</td><td></td><td></td><td></td><td></td><td class="s">sub mirror</td></tr>
+<tr><td class="h"><a name="899"></a>899</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="900"></a>900</td><td></td><td></td><td></td><td></td><td class="s"> my($self, $url, $file) = @_;</td></tr>
+<tr><td class="h"><a name="901"></a>901</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="902"></a>902</td><td></td><td></td><td></td><td></td><td class="s"> my $request = HTTP::Request->new('GET', $url);</td></tr>
+<tr><td class="h"><a name="903"></a>903</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="904"></a>904</td><td></td><td></td><td></td><td></td><td class="s"> # If the file exists, add a cache-related header</td></tr>
+<tr><td class="h"><a name="905"></a>905</td><td></td><td></td><td></td><td></td><td class="s"> if ( -e $file ) {</td></tr>
+<tr><td class="h"><a name="906"></a>906</td><td></td><td></td><td></td><td></td><td class="s"> my ($mtime) = ( stat($file) )[9];</td></tr>
+<tr><td class="h"><a name="907"></a>907</td><td></td><td></td><td></td><td></td><td class="s"> if ($mtime) {</td></tr>
+<tr><td class="h"><a name="908"></a>908</td><td></td><td></td><td></td><td></td><td class="s"> $request->header( 'If-Modified-Since' => HTTP::Date::time2str($mtime) );</td></tr>
+<tr><td class="h"><a name="909"></a>909</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="910"></a>910</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="911"></a>911</td><td></td><td></td><td></td><td></td><td class="s"> my $tmpfile = "$file-$$";</td></tr>
+<tr><td class="h"><a name="912"></a>912</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="913"></a>913</td><td></td><td></td><td></td><td></td><td class="s"> my $response = $self->request($request, $tmpfile);</td></tr>
+<tr><td class="h"><a name="914"></a>914</td><td></td><td></td><td></td><td></td><td class="s"> if ( $response->header('X-Died') ) {</td></tr>
+<tr><td class="h"><a name="915"></a>915</td><td></td><td></td><td></td><td></td><td class="s"> die $response->header('X-Died');</td></tr>
+<tr><td class="h"><a name="916"></a>916</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="917"></a>917</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="918"></a>918</td><td></td><td></td><td></td><td></td><td class="s"> # Only fetching a fresh copy of the would be considered success.</td></tr>
+<tr><td class="h"><a name="919"></a>919</td><td></td><td></td><td></td><td></td><td class="s"> # If the file was not modified, "304" would returned, which </td></tr>
+<tr><td class="h"><a name="920"></a>920</td><td></td><td></td><td></td><td></td><td class="s"> # is considered by HTTP::Status to be a "redirect", /not/ "success"</td></tr>
+<tr><td class="h"><a name="921"></a>921</td><td></td><td></td><td></td><td></td><td class="s"> if ( $response->is_success ) {</td></tr>
+<tr><td class="h"><a name="922"></a>922</td><td></td><td></td><td></td><td></td><td class="s"> my @stat = stat($tmpfile) or die "Could not stat tmpfile '$tmpfile': $!";</td></tr>
+<tr><td class="h"><a name="923"></a>923</td><td></td><td></td><td></td><td></td><td class="s"> my $file_length = $stat[7];</td></tr>
+<tr><td class="h"><a name="924"></a>924</td><td></td><td></td><td></td><td></td><td class="s"> my ($content_length) = $response->header('Content-length');</td></tr>
+<tr><td class="h"><a name="925"></a>925</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="926"></a>926</td><td></td><td></td><td></td><td></td><td class="s"> if ( defined $content_length and $file_length < $content_length ) {</td></tr>
+<tr><td class="h"><a name="927"></a>927</td><td></td><td></td><td></td><td></td><td class="s"> unlink($tmpfile);</td></tr>
+<tr><td class="h"><a name="928"></a>928</td><td></td><td></td><td></td><td></td><td class="s"> die "Transfer truncated: " . "only $file_length out of $content_length bytes received\n";</td></tr>
+<tr><td class="h"><a name="929"></a>929</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="930"></a>930</td><td></td><td></td><td></td><td></td><td class="s"> elsif ( defined $content_length and $file_length > $content_length ) {</td></tr>
+<tr><td class="h"><a name="931"></a>931</td><td></td><td></td><td></td><td></td><td class="s"> unlink($tmpfile);</td></tr>
+<tr><td class="h"><a name="932"></a>932</td><td></td><td></td><td></td><td></td><td class="s"> die "Content-length mismatch: " . "expected $content_length bytes, got $file_length\n";</td></tr>
+<tr><td class="h"><a name="933"></a>933</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="934"></a>934</td><td></td><td></td><td></td><td></td><td class="s"> # The file was the expected length. </td></tr>
+<tr><td class="h"><a name="935"></a>935</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="936"></a>936</td><td></td><td></td><td></td><td></td><td class="s"> # Replace the stale file with a fresh copy</td></tr>
+<tr><td class="h"><a name="937"></a>937</td><td></td><td></td><td></td><td></td><td class="s"> if ( -e $file ) {</td></tr>
+<tr><td class="h"><a name="938"></a>938</td><td></td><td></td><td></td><td></td><td class="s"> # Some dosish systems fail to rename if the target exists</td></tr>
+<tr><td class="h"><a name="939"></a>939</td><td></td><td></td><td></td><td></td><td class="s"> chmod 0777, $file;</td></tr>
+<tr><td class="h"><a name="940"></a>940</td><td></td><td></td><td></td><td></td><td class="s"> unlink $file;</td></tr>
+<tr><td class="h"><a name="941"></a>941</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="942"></a>942</td><td></td><td></td><td></td><td></td><td class="s"> rename( $tmpfile, $file )</td></tr>
+<tr><td class="h"><a name="943"></a>943</td><td></td><td></td><td></td><td></td><td class="s"> or die "Cannot rename '$tmpfile' to '$file': $!\n";</td></tr>
+<tr><td class="h"><a name="944"></a>944</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="945"></a>945</td><td></td><td></td><td></td><td></td><td class="s"> # make sure the file has the same last modification time</td></tr>
+<tr><td class="h"><a name="946"></a>946</td><td></td><td></td><td></td><td></td><td class="s"> if ( my $lm = $response->last_modified ) {</td></tr>
+<tr><td class="h"><a name="947"></a>947</td><td></td><td></td><td></td><td></td><td class="s"> utime $lm, $lm, $file;</td></tr>
+<tr><td class="h"><a name="948"></a>948</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="949"></a>949</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="950"></a>950</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="951"></a>951</td><td></td><td></td><td></td><td></td><td class="s"> # The local copy is fresh enough, so just delete the temp file </td></tr>
+<tr><td class="h"><a name="952"></a>952</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="953"></a>953</td><td></td><td></td><td></td><td></td><td class="s"> unlink($tmpfile);</td></tr>
+<tr><td class="h"><a name="954"></a>954</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="955"></a>955</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="956"></a>956</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="957"></a>957</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="958"></a>958</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="959"></a>959</td><td></td><td></td><td></td><td></td><td class="s">sub _need_proxy {</td></tr>
+<tr><td class="h"><a name="960"></a>960</td><td></td><td></td><td></td><td></td><td class="s"> my($req, $ua) = @_;</td></tr>
+<tr><td class="h"><a name="961"></a>961</td><td></td><td></td><td></td><td></td><td class="s"> return if exists $req->{proxy};</td></tr>
+<tr><td class="h"><a name="962"></a>962</td><td></td><td></td><td></td><td></td><td class="s"> my $proxy = $ua->{proxy}{$req->uri->scheme} || return;</td></tr>
+<tr><td class="h"><a name="963"></a>963</td><td></td><td></td><td></td><td></td><td class="s"> if ($ua->{no_proxy}) {</td></tr>
+<tr><td class="h"><a name="964"></a>964</td><td></td><td></td><td></td><td></td><td class="s"> if (my $host = eval { $req->uri->host }) {</td></tr>
+<tr><td class="h"><a name="965"></a>965</td><td></td><td></td><td></td><td></td><td class="s"> for my $domain (@{$ua->{no_proxy}}) {</td></tr>
+<tr><td class="h"><a name="966"></a>966</td><td></td><td></td><td></td><td></td><td class="s"> if ($host =~ /\Q$domain\E$/) {</td></tr>
+<tr><td class="h"><a name="967"></a>967</td><td></td><td></td><td></td><td></td><td class="s"> return;</td></tr>
+<tr><td class="h"><a name="968"></a>968</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="969"></a>969</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="970"></a>970</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="971"></a>971</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="972"></a>972</td><td></td><td></td><td></td><td></td><td class="s"> $req->{proxy} = $HTTP::URI_CLASS->new($proxy);</td></tr>
+<tr><td class="h"><a name="973"></a>973</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="974"></a>974</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="975"></a>975</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="976"></a>976</td><td></td><td></td><td></td><td></td><td class="s">sub proxy</td></tr>
+<tr><td class="h"><a name="977"></a>977</td><td></td><td></td><td></td><td></td><td class="s">{</td></tr>
+<tr><td class="h"><a name="978"></a>978</td><td></td><td></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
+<tr><td class="h"><a name="979"></a>979</td><td></td><td></td><td></td><td></td><td class="s"> my $key = shift;</td></tr>
+<tr><td class="h"><a name="980"></a>980</td><td></td><td></td><td></td><td></td><td class="s"> return map $self->proxy($_, @_), @$key if ref $key;</td></tr>
+<tr><td class="h"><a name="981"></a>981</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="982"></a>982</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("'$key' is not a valid URI scheme") unless $key =~ /^$URI::scheme_re\z/;</td></tr>
+<tr><td class="h"><a name="983"></a>983</td><td></td><td></td><td></td><td></td><td class="s"> my $old = $self->{'proxy'}{$key};</td></tr>
+<tr><td class="h"><a name="984"></a>984</td><td></td><td></td><td></td><td></td><td class="s"> if (@_) {</td></tr>
+<tr><td class="h"><a name="985"></a>985</td><td></td><td></td><td></td><td></td><td class="s"> my $url = shift;</td></tr>
+<tr><td class="h"><a name="986"></a>986</td><td></td><td></td><td></td><td></td><td class="s"> if (defined($url) && length($url)) {</td></tr>
+<tr><td class="h"><a name="987"></a>987</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("Proxy must be specified as absolute URI; '$url' is not") unless $url =~ /^$URI::scheme_re:/;</td></tr>
+<tr><td class="h"><a name="988"></a>988</td><td></td><td></td><td></td><td></td><td class="s"> Carp::croak("Bad http proxy specification '$url'") if $url =~ /^https?:/ && $url !~ m,^https?://\w,;</td></tr>
+<tr><td class="h"><a name="989"></a>989</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="990"></a>990</td><td></td><td></td><td></td><td></td><td class="s"> $self->{proxy}{$key} = $url;</td></tr>
+<tr><td class="h"><a name="991"></a>991</td><td></td><td></td><td></td><td></td><td class="s"> $self->set_my_handler("request_preprepare", \&_need_proxy)</td></tr>
+<tr><td class="h"><a name="992"></a>992</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="993"></a>993</td><td></td><td></td><td></td><td></td><td class="s"> return $old;</td></tr>
+<tr><td class="h"><a name="994"></a>994</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="995"></a>995</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="996"></a>996</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="997"></a>997</td><td></td><td></td><td></td><td></td><td class="s">sub env_proxy {</td></tr>
+<tr><td class="h"><a name="998"></a>998</td><td></td><td></td><td></td><td></td><td class="s"> my ($self) = @_;</td></tr>
+<tr><td class="h"><a name="999"></a>999</td><td></td><td></td><td></td><td></td><td class="s"> require Encode;</td></tr>
+<tr><td class="h"><a name="1000"></a>1000</td><td></td><td></td><td></td><td></td><td class="s"> require Encode::Locale;</td></tr>
+<tr><td class="h"><a name="1001"></a>1001</td><td></td><td></td><td></td><td></td><td class="s"> my($k,$v);</td></tr>
+<tr><td class="h"><a name="1002"></a>1002</td><td></td><td></td><td></td><td></td><td class="s"> while(($k, $v) = each %ENV) {</td></tr>
+<tr><td class="h"><a name="1003"></a>1003</td><td></td><td></td><td></td><td></td><td class="s"> if ($ENV{REQUEST_METHOD}) {</td></tr>
+<tr><td class="h"><a name="1004"></a>1004</td><td></td><td></td><td></td><td></td><td class="s"> # Need to be careful when called in the CGI environment, as</td></tr>
+<tr><td class="h"><a name="1005"></a>1005</td><td></td><td></td><td></td><td></td><td class="s"> # the HTTP_PROXY variable is under control of that other guy.</td></tr>
+<tr><td class="h"><a name="1006"></a>1006</td><td></td><td></td><td></td><td></td><td class="s"> next if $k =~ /^HTTP_/;</td></tr>
+<tr><td class="h"><a name="1007"></a>1007</td><td></td><td></td><td></td><td></td><td class="s"> $k = "HTTP_PROXY" if $k eq "CGI_HTTP_PROXY";</td></tr>
+<tr><td class="h"><a name="1008"></a>1008</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1009"></a>1009</td><td></td><td></td><td></td><td></td><td class="s"> $k = lc($k);</td></tr>
+<tr><td class="h"><a name="1010"></a>1010</td><td></td><td></td><td></td><td></td><td class="s"> next unless $k =~ /^(.*)_proxy$/;</td></tr>
+<tr><td class="h"><a name="1011"></a>1011</td><td></td><td></td><td></td><td></td><td class="s"> $k = $1;</td></tr>
+<tr><td class="h"><a name="1012"></a>1012</td><td></td><td></td><td></td><td></td><td class="s"> if ($k eq 'no') {</td></tr>
+<tr><td class="h"><a name="1013"></a>1013</td><td></td><td></td><td></td><td></td><td class="s"> $self->no_proxy(split(/\s*,\s*/, $v));</td></tr>
+<tr><td class="h"><a name="1014"></a>1014</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1015"></a>1015</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="1016"></a>1016</td><td></td><td></td><td></td><td></td><td class="s"> # Ignore random _proxy variables, allow only valid schemes</td></tr>
+<tr><td class="h"><a name="1017"></a>1017</td><td></td><td></td><td></td><td></td><td class="s"> next unless $k =~ /^$URI::scheme_re\z/;</td></tr>
+<tr><td class="h"><a name="1018"></a>1018</td><td></td><td></td><td></td><td></td><td class="s"> # Ignore xxx_proxy variables if xxx isn't a supported protocol</td></tr>
+<tr><td class="h"><a name="1019"></a>1019</td><td></td><td></td><td></td><td></td><td class="s"> next unless LWP::Protocol::implementor($k);</td></tr>
+<tr><td class="h"><a name="1020"></a>1020</td><td></td><td></td><td></td><td></td><td class="s"> $self->proxy($k, Encode::decode(locale => $v));</td></tr>
+<tr><td class="h"><a name="1021"></a>1021</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1022"></a>1022</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1023"></a>1023</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="1024"></a>1024</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1025"></a>1025</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1026"></a>1026</td><td></td><td></td><td></td><td></td><td class="s">sub no_proxy {</td></tr>
+<tr><td class="h"><a name="1027"></a>1027</td><td></td><td></td><td></td><td></td><td class="s"> my($self, @no) = @_;</td></tr>
+<tr><td class="h"><a name="1028"></a>1028</td><td></td><td></td><td></td><td></td><td class="s"> if (@no) {</td></tr>
+<tr><td class="h"><a name="1029"></a>1029</td><td></td><td></td><td></td><td></td><td class="s"> push(@{ $self->{'no_proxy'} }, @no);</td></tr>
+<tr><td class="h"><a name="1030"></a>1030</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1031"></a>1031</td><td></td><td></td><td></td><td></td><td class="s"> else {</td></tr>
+<tr><td class="h"><a name="1032"></a>1032</td><td></td><td></td><td></td><td></td><td class="s"> $self->{'no_proxy'} = [];</td></tr>
+<tr><td class="h"><a name="1033"></a>1033</td><td></td><td></td><td></td><td></td><td class="s"> }</td></tr>
+<tr><td class="h"><a name="1034"></a>1034</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="1035"></a>1035</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1036"></a>1036</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1037"></a>1037</td><td></td><td></td><td></td><td></td><td class="s">sub _new_response {</td></tr>
+<tr><td class="h"><a name="1038"></a>1038</td><td></td><td></td><td></td><td></td><td class="s"> my($request, $code, $message, $content) = @_;</td></tr>
+<tr><td class="h"><a name="1039"></a>1039</td><td></td><td></td><td></td><td></td><td class="s"> my $response = HTTP::Response->new($code, $message);</td></tr>
+<tr><td class="h"><a name="1040"></a>1040</td><td></td><td></td><td></td><td></td><td class="s"> $response->request($request);</td></tr>
+<tr><td class="h"><a name="1041"></a>1041</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Date" => HTTP::Date::time2str(time));</td></tr>
+<tr><td class="h"><a name="1042"></a>1042</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Client-Warning" => "Internal response");</td></tr>
+<tr><td class="h"><a name="1043"></a>1043</td><td></td><td></td><td></td><td></td><td class="s"> $response->header("Content-Type" => "text/plain");</td></tr>
+<tr><td class="h"><a name="1044"></a>1044</td><td></td><td></td><td></td><td></td><td class="s"> $response->content($content || "$code $message\n");</td></tr>
+<tr><td class="h"><a name="1045"></a>1045</td><td></td><td></td><td></td><td></td><td class="s"> return $response;</td></tr>
+<tr><td class="h"><a name="1046"></a>1046</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
+<tr><td class="h"><a name="1047"></a>1047</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1048"></a>1048</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1049"></a>1049</td><td class="c3">1</td><td class="c3"><span title="Avg 9µs">9µs</span></td><td></td><td></td><td class="s">1;</td></tr>
+<tr><td class="h"><a name="1050"></a>1050</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
+<tr><td class="h"><a name="1051"></a>1051</td><td></td><td></td><td></td><td></td><td class="s">__END__</td></tr>
+</tbody></table></div>
+
+ <script type="text/javascript"> $(document).ready(function() {
+
+ $("#subs_table").tablesorter({
+ sortList: [[3,1]],
+ headers: {
+ 3: { sorter: 'fmt_time' },
+ 4: { sorter: 'fmt_time' }
+ }
+ });
+
+ } ); </script>
+
+ <div class="footer">Report produced by the
+ <a href="http://search.cpan.org/dist/Devel-NYTProf/">NYTProf 4.06</a>
+ Perl profiler, developed by
+ <a href="http://www.linkedin.com/in/timbunce">Tim Bunce</a> and
+ <a href="http://code.nytimes.com">Adam Kaplan</a>.
+ </div>
+ <br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
+ </body></html>
\ No newline at end of file