##// END OF EJS Templates
tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman -
r7395:e2048f5c default
parent child Browse files
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -75,21 +75,17 b' files, or words in the commit message</s'
75 </table>
75 </table>
76
76
77 <div class="overflow">
77 <div class="overflow">
78 <table class="bigtable">
78 <div class="sourcefirst"> line diff</div>
79 <tr>
79
80 <th class="lineno">line</th>
80 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
81 <th class="source">diff</th>
81 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
82 </tr>
82 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
83 </table>
83 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
84 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
84 </span></div><div class="source bottomline parity1"><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
85 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
85 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000
86 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source atline">@@ -0,0 +1,1 @@
86 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
87 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source plusline">+a
87 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b
88 </td></tr></table><table class="bigtable parity1"><tr><td class="lineno"><a href="#l2.1" id="l2.1"> 2.1</a></td><td class="source minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
88 </span></div>
89 </td></tr><tr><td class="lineno"><a href="#l2.2" id="l2.2"> 2.2</a></td><td class="source plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000
90 </td></tr><tr><td class="lineno"><a href="#l2.3" id="l2.3"> 2.3</a></td><td class="source atline">@@ -0,0 +1,1 @@
91 </td></tr><tr><td class="lineno"><a href="#l2.4" id="l2.4"> 2.4</a></td><td class="source plusline">+b
92 </td></tr></table>
93 </div>
89 </div>
94
90
95 </div>
91 </div>
@@ -172,18 +168,13 b' files, or words in the commit message</s'
172 </table>
168 </table>
173
169
174 <div class="overflow">
170 <div class="overflow">
175 <table class="bigtable">
171 <div class="sourcefirst"> line diff</div>
176 <tr>
177 <th class="lineno">line</th>
178 <th class="source">diff</th>
179 </tr>
180 </table>
181
172
182 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
173 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
183 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
174 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
184 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source atline">@@ -0,0 +1,1 @@
175 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
185 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source plusline">+a
176 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
186 </td></tr></table>
177 </span></div>
187 </div>
178 </div>
188 </div>
179 </div>
189 </div>
180 </div>
@@ -266,23 +257,19 b' files, or words in the commit message</s'
266 </table>
257 </table>
267
258
268 <div class="overflow">
259 <div class="overflow">
269 <table class="bigtable">
260 <div class="sourcefirst"> line diff</div>
270 <tr>
261
271 <th class="lineno">line</th>
262 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644
272 <th class="source">diff</th>
263 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
273 </tr>
264 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
274 </table>
265 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
275 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source">new file mode 100644
266 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
276 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source minusline">--- /dev/null
267 </span></div><div class="source bottomline parity1"><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644
277 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source plusline">+++ b/a
268 <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null
278 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source atline">@@ -0,0 +1,1 @@
269 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b
279 </td></tr><tr><td class="lineno"><a href="#l1.5" id="l1.5"> 1.5</a></td><td class="source plusline">+a
270 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@
280 </td></tr></table><table class="bigtable parity1"><tr><td class="lineno"><a href="#l2.1" id="l2.1"> 2.1</a></td><td class="source">new file mode 100644
271 </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b
281 </td></tr><tr><td class="lineno"><a href="#l2.2" id="l2.2"> 2.2</a></td><td class="source minusline">--- /dev/null
272 </span></div>
282 </td></tr><tr><td class="lineno"><a href="#l2.3" id="l2.3"> 2.3</a></td><td class="source plusline">+++ b/b
283 </td></tr><tr><td class="lineno"><a href="#l2.4" id="l2.4"> 2.4</a></td><td class="source atline">@@ -0,0 +1,1 @@
284 </td></tr><tr><td class="lineno"><a href="#l2.5" id="l2.5"> 2.5</a></td><td class="source plusline">+b
285 </td></tr></table>
286 </div>
273 </div>
287
274
288 </div>
275 </div>
@@ -365,19 +352,14 b' files, or words in the commit message</s'
365 </table>
352 </table>
366
353
367 <div class="overflow">
354 <div class="overflow">
368 <table class="bigtable">
355 <div class="sourcefirst"> line diff</div>
369 <tr>
370 <th class="lineno">line</th>
371 <th class="source">diff</th>
372 </tr>
373 </table>
374
356
375 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source">new file mode 100755
357 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755
376 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source minusline">--- /dev/null
358 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
377 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source plusline">+++ b/a
359 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
378 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source atline">@@ -0,0 +1,1 @@
360 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
379 </td></tr><tr><td class="lineno"><a href="#l1.5" id="l1.5"> 1.5</a></td><td class="source plusline">+a
361 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
380 </td></tr></table>
362 </span></div>
381 </div>
363 </div>
382 </div>
364 </div>
383 </div>
365 </div>
@@ -73,17 +73,13 b' files, or words in the commit message</s'
73 </table>
73 </table>
74
74
75 <div class="overflow">
75 <div class="overflow">
76 <table class="bigtable">
76 <div class="sourcefirst"> line diff</div>
77 <tr>
77
78 <th class="lineno">line</th>
78 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
79 <th class="source">diff</th>
79 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
80 </tr>
80 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
81 </table>
81 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
82 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
82 </span></div>
83 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
84 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source atline">@@ -1,1 +0,0 @@
85 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source minusline">-a
86 </td></tr></table>
87 </div>
83 </div>
88
84
89 </div>
85 </div>
@@ -166,18 +162,13 b' files, or words in the commit message</s'
166 </table>
162 </table>
167
163
168 <div class="overflow">
164 <div class="overflow">
169 <table class="bigtable">
165 <div class="sourcefirst"> line diff</div>
170 <tr>
171 <th class="lineno">line</th>
172 <th class="source">diff</th>
173 </tr>
174 </table>
175
166
176 <table class="bigtable parity0"><tr><td class="lineno"><a href="#l1.1" id="l1.1"> 1.1</a></td><td class="source minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
167 <div class="source bottomline parity0"><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
177 </td></tr><tr><td class="lineno"><a href="#l1.2" id="l1.2"> 1.2</a></td><td class="source plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
168 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
178 </td></tr><tr><td class="lineno"><a href="#l1.3" id="l1.3"> 1.3</a></td><td class="source atline">@@ -1,1 +0,0 @@
169 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
179 </td></tr><tr><td class="lineno"><a href="#l1.4" id="l1.4"> 1.4</a></td><td class="source minusline">-a
170 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
180 </td></tr></table>
171 </span></div>
181 </div>
172 </div>
182 </div>
173 </div>
183 </div>
174 </div>
@@ -75,13 +75,9 b' files, or words in the commit message</s'
75 </table>
75 </table>
76
76
77 <div class="overflow">
77 <div class="overflow">
78 <table class="bigtable">
78 <div class="sourcefirst"> line source</div>
79 <tr>
79 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></div><div class="parity1 source"><a href="#l2" id="l2"> 2</a> </div><div class="parity0 source"><a href="#l3" id="l3"> 3</a> <span class="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></div><div class="parity1 source"><a href="#l4" id="l4"> 4</a> <span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></div><div class="parity0 source"><a href="#l5" id="l5"> 5</a> </div><div class="parity1 source"><a href="#l6" id="l6"> 6</a> <span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span></div><div class="parity0 source"><a href="#l7" id="l7"> 7</a> </div><div class="parity1 source"><a href="#l8" id="l8"> 8</a> <span class="kn">try</span><span class="p">:</span></div><div class="parity0 source"><a href="#l9" id="l9"> 9</a> <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></div><div class="parity1 source"><a href="#l10" id="l10"> 10</a> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></div><div class="parity0 source"><a href="#l11" id="l11"> 11</a> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></div><div class="parity1 source"><a href="#l12" id="l12"> 12</a> <span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></div><div class="parity0 source"><a href="#l13" id="l13"> 13</a> <span class="kn">pass</span></div><div class="parity1 source"><a href="#l14" id="l14"> 14</a> </div><div class="parity0 source"><a href="#l15" id="l15"> 15</a> <span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></div><div class="parity1 source"><a href="#l16" id="l16"> 16</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></div><div class="parity0 source"><a href="#l17" id="l17"> 17</a> <span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">,</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">2</span><span class="p">])</span></div><div class="parity1 source"><a href="#l18" id="l18"> 18</a> <span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></div><div class="parity0 source"><a href="#l19" id="l19"> 19</a> <span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></div><div class="parity1 source"><a href="#l20" id="l20"> 20</a> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></div><div class="parity0 source"><a href="#l21" id="l21"> 21</a> <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></div><div class="parity1 source"><a href="#l22" id="l22"> 22</a> <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></div><div class="parity0 source"><a href="#l23" id="l23"> 23</a> <span class="kn">print</span></div><div class="parity1 source"><a href="#l24" id="l24"> 24</a> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">())</span></div><div class="parity0 source"><a href="#l25" id="l25"> 25</a> </div><div class="parity1 source"><a href="#l26" id="l26"> 26</a> <span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></div><div class="parity0 source"><a href="#l27" id="l27"> 27</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></div><div class="parity1 source"><a href="#l28" id="l28"> 28</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></div>
80 <th class="lineno">line</th>
80 <div class="sourcelast"></div>
81 <th class="source">source</th>
82 </tr>
83 <tr class="parity0"><td class="lineno"><a href="#l1" id="l1"> 1</a></td><td class="source"><span class="c">#!/usr/bin/env python</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l2" id="l2"> 2</a></td><td class="source"></td></tr><tr class="parity0"><td class="lineno"><a href="#l3" id="l3"> 3</a></td><td class="source"><span class="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l4" id="l4"> 4</a></td><td class="source"><span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l5" id="l5"> 5</a></td><td class="source"></td></tr><tr class="parity1"><td class="lineno"><a href="#l6" id="l6"> 6</a></td><td class="source"><span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l7" id="l7"> 7</a></td><td class="source"></td></tr><tr class="parity1"><td class="lineno"><a href="#l8" id="l8"> 8</a></td><td class="source"><span class="kn">try</span><span class="p">:</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l9" id="l9"> 9</a></td><td class="source"> <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l10" id="l10"> 10</a></td><td class="source"> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l11" id="l11"> 11</a></td><td class="source"> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l12" id="l12"> 12</a></td><td class="source"><span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l13" id="l13"> 13</a></td><td class="source"> <span class="kn">pass</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l14" id="l14"> 14</a></td><td class="source"></td></tr><tr class="parity0"><td class="lineno"><a href="#l15" id="l15"> 15</a></td><td class="source"><span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l16" id="l16"> 16</a></td><td class="source"><span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l17" id="l17"> 17</a></td><td class="source"><span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">,</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">2</span><span class="p">])</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l18" id="l18"> 18</a></td><td class="source"><span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l19" id="l19"> 19</a></td><td class="source"><span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l20" id="l20"> 20</a></td><td class="source"><span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l21" id="l21"> 21</a></td><td class="source"> <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l22" id="l22"> 22</a></td><td class="source"> <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l23" id="l23"> 23</a></td><td class="source"><span class="kn">print</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l24" id="l24"> 24</a></td><td class="source"><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">())</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l25" id="l25"> 25</a></td><td class="source"></td></tr><tr class="parity1"><td class="lineno"><a href="#l26" id="l26"> 26</a></td><td class="source"><span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></td></tr><tr class="parity0"><td class="lineno"><a href="#l27" id="l27"> 27</a></td><td class="source"> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></td></tr><tr class="parity1"><td class="lineno"><a href="#l28" id="l28"> 28</a></td><td class="source"><span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></td></tr>
84 </table>
85 </div>
81 </div>
86 </div>
82 </div>
87 </div>
83 </div>
@@ -165,13 +161,9 b' files, or words in the commit message</s'
165 </table>
161 </table>
166
162
167 <div class="overflow">
163 <div class="overflow">
168 <table class="bigtable">
164 <div class="sourcefirst"> line source</div>
169 <tr>
165 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> h?bsch</div>
170 <th class="lineno">line</th>
166 <div class="sourcelast"></div>
171 <th class="source">source</th>
172 </tr>
173 <tr class="parity0"><td class="lineno"><a href="#l1" id="l1"> 1</a></td><td class="source">h?bsch</td></tr>
174 </table>
175 </div>
167 </div>
176 </div>
168 </div>
177 </div>
169 </div>
@@ -261,10 +253,9 b' files, or words in the commit message</s'
261 <table class="bigtable">
253 <table class="bigtable">
262 <tr>
254 <tr>
263 <th class="annotate">rev</th>
255 <th class="annotate">rev</th>
264 <th class="lineno">line</th>
256 <th class="line">&nbsp;&nbsp;line source</th>
265 <th class="line">source</th>
266 </tr>
257 </tr>
267 <tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#1" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l1" id="l1"> 1</a></td><td class="source"><span class="c">#!/usr/bin/env python</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#2" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l2" id="l2"> 2</a></td><td class="source"></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#3" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l3" id="l3"> 3</a></td><td class="source"><span class="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#4" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l4" id="l4"> 4</a></td><td class="source"><span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#5" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l5" id="l5"> 5</a></td><td class="source"></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#6" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l6" id="l6"> 6</a></td><td class="source"><span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#7" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l7" id="l7"> 7</a></td><td class="source"></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#8" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l8" id="l8"> 8</a></td><td class="source"><span class="kn">try</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#9" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l9" id="l9"> 9</a></td><td class="source"> <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#10" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l10" id="l10"> 10</a></td><td class="source"> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#11" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l11" id="l11"> 11</a></td><td class="source"> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#12" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l12" id="l12"> 12</a></td><td class="source"><span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#13" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l13" id="l13"> 13</a></td><td class="source"> <span class="kn">pass</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#14" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l14" id="l14"> 14</a></td><td class="source"></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#15" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l15" id="l15"> 15</a></td><td class="source"><span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#16" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l16" id="l16"> 16</a></td><td class="source"><span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#17" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l17" id="l17"> 17</a></td><td class="source"><span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">,</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">2</span><span class="p">])</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#18" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l18" id="l18"> 18</a></td><td class="source"><span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#19" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l19" id="l19"> 19</a></td><td class="source"><span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#20" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l20" id="l20"> 20</a></td><td class="source"><span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#21" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l21" id="l21"> 21</a></td><td class="source"> <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#22" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l22" id="l22"> 22</a></td><td class="source"> <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#23" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l23" id="l23"> 23</a></td><td class="source"><span class="kn">print</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#24" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l24" id="l24"> 24</a></td><td class="source"><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">())</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#25" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l25" id="l25"> 25</a></td><td class="source"></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#26" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l26" id="l26"> 26</a></td><td class="source"><span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#27" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l27" id="l27"> 27</a></td><td class="source"> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#28" title="7697c52ca9b0: a">test@0</a></td><td class="lineno"><a href="#l28" id="l28"> 28</a></td><td class="source"><span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></td></tr>
258 <tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#1" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#2" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l2" id="l2"> 2</a> </td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#3" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l3" id="l3"> 3</a> <span class="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#4" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l4" id="l4"> 4</a> <span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#5" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l5" id="l5"> 5</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#6" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l6" id="l6"> 6</a> <span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#7" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l7" id="l7"> 7</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#8" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l8" id="l8"> 8</a> <span class="kn">try</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#9" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l9" id="l9"> 9</a> <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#10" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l10" id="l10"> 10</a> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#11" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l11" id="l11"> 11</a> <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#12" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l12" id="l12"> 12</a> <span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#13" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l13" id="l13"> 13</a> <span class="kn">pass</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#14" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l14" id="l14"> 14</a> </td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#15" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l15" id="l15"> 15</a> <span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#16" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l16" id="l16"> 16</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#17" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l17" id="l17"> 17</a> <span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">,</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">2</span><span class="p">])</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#18" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l18" id="l18"> 18</a> <span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#19" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l19" id="l19"> 19</a> <span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#20" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#21" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l21" id="l21"> 21</a> <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#22" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l22" id="l22"> 22</a> <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#23" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l23" id="l23"> 23</a> <span class="kn">print</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#24" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l24" id="l24"> 24</a> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">())</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#25" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l25" id="l25"> 25</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#26" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#27" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l27" id="l27"> 27</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7697c52ca9b0/get-with-headers.py#28" title="7697c52ca9b0: a">test@0</a></td><td class="source"><a href="#l28" id="l28"> 28</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></td></tr>
268 </table>
259 </table>
269 </div>
260 </div>
270 </div>
261 </div>
General Comments 0
You need to be logged in to leave comments. Login now