rfuzz 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/Rakefile +1 -1
  2. data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
  3. data/doc/rdoc/classes/RFuzz/Browser.src/{M000068.html → M000083.html} +0 -0
  4. data/doc/rdoc/classes/RFuzz/Browser.src/{M000069.html → M000084.html} +0 -0
  5. data/doc/rdoc/classes/RFuzz/Browser.src/{M000070.html → M000085.html} +0 -0
  6. data/doc/rdoc/classes/RFuzz/HttpClient.html +114 -57
  7. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +12 -13
  8. data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000011.html → M000020.html} +20 -20
  9. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +28 -0
  10. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +30 -0
  11. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +35 -0
  12. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -0
  13. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +44 -0
  14. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +38 -0
  15. data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000016.html → M000027.html} +12 -12
  16. data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000017.html → M000028.html} +20 -20
  17. data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000018.html → M000029.html} +4 -4
  18. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +26 -0
  19. data/doc/rdoc/classes/RFuzz/HttpClientError.html +118 -0
  20. data/doc/rdoc/classes/RFuzz/HttpEncoding.html +7 -4
  21. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +12 -12
  22. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +4 -4
  23. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +12 -12
  24. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +4 -4
  25. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +18 -18
  26. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +4 -4
  27. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +6 -6
  28. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +6 -6
  29. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +18 -18
  30. data/doc/rdoc/classes/RFuzz/HttpResponse.html +74 -13
  31. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +22 -0
  32. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +18 -0
  33. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +18 -0
  34. data/doc/rdoc/classes/RFuzz/Notifier.html +49 -31
  35. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000044.html → M000058.html} +3 -3
  36. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000045.html → M000059.html} +3 -3
  37. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000047.html → M000060.html} +2 -2
  38. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000048.html → M000061.html} +2 -2
  39. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000049.html → M000062.html} +2 -2
  40. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000046.html → M000063.html} +4 -4
  41. data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +17 -0
  42. data/doc/rdoc/classes/RFuzz/PushBackIO.html +296 -0
  43. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +19 -0
  44. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +20 -0
  45. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +19 -0
  46. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +18 -0
  47. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +44 -0
  48. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +18 -0
  49. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +18 -0
  50. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +18 -0
  51. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +22 -0
  52. data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
  53. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000032.html → M000046.html} +0 -0
  54. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000033.html → M000047.html} +0 -0
  55. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000036.html → M000050.html} +0 -0
  56. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000037.html → M000051.html} +0 -0
  57. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000038.html → M000052.html} +0 -0
  58. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000039.html → M000053.html} +0 -0
  59. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000040.html → M000054.html} +0 -0
  60. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000041.html → M000055.html} +0 -0
  61. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000042.html → M000056.html} +0 -0
  62. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000043.html → M000057.html} +0 -0
  63. data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
  64. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000056.html → M000071.html} +0 -0
  65. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000057.html → M000072.html} +0 -0
  66. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000058.html → M000073.html} +0 -0
  67. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000059.html → M000074.html} +0 -0
  68. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000060.html → M000075.html} +0 -0
  69. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000061.html → M000076.html} +0 -0
  70. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000062.html → M000077.html} +0 -0
  71. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000063.html → M000078.html} +0 -0
  72. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000064.html → M000079.html} +0 -0
  73. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000065.html → M000080.html} +0 -0
  74. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000066.html → M000081.html} +0 -0
  75. data/doc/rdoc/classes/RFuzz/Sampler.src/{M000067.html → M000082.html} +0 -0
  76. data/doc/rdoc/classes/RFuzz/Session.html +63 -63
  77. data/doc/rdoc/classes/RFuzz/Session.src/{M000020.html → M000034.html} +0 -0
  78. data/doc/rdoc/classes/RFuzz/Session.src/{M000021.html → M000035.html} +0 -0
  79. data/doc/rdoc/classes/RFuzz/Session.src/{M000022.html → M000036.html} +0 -0
  80. data/doc/rdoc/classes/RFuzz/Session.src/{M000023.html → M000037.html} +0 -0
  81. data/doc/rdoc/classes/RFuzz/Session.src/{M000024.html → M000038.html} +0 -0
  82. data/doc/rdoc/classes/RFuzz/Session.src/{M000025.html → M000039.html} +0 -0
  83. data/doc/rdoc/classes/RFuzz/Session.src/{M000026.html → M000040.html} +0 -0
  84. data/doc/rdoc/classes/RFuzz/Session.src/{M000027.html → M000041.html} +0 -0
  85. data/doc/rdoc/classes/RFuzz/Session.src/{M000028.html → M000042.html} +0 -0
  86. data/doc/rdoc/classes/RFuzz/Session.src/{M000029.html → M000043.html} +0 -0
  87. data/doc/rdoc/classes/RFuzz/Session.src/{M000030.html → M000044.html} +0 -0
  88. data/doc/rdoc/classes/RFuzz/Session.src/{M000031.html → M000045.html} +0 -0
  89. data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
  90. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000050.html → M000065.html} +0 -0
  91. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000051.html → M000066.html} +0 -0
  92. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000052.html → M000067.html} +0 -0
  93. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000053.html → M000068.html} +0 -0
  94. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000054.html → M000069.html} +0 -0
  95. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000055.html → M000070.html} +0 -0
  96. data/doc/rdoc/classes/RFuzz.html +7 -1
  97. data/doc/rdoc/created.rid +1 -1
  98. data/doc/rdoc/files/lib/rfuzz/client_rb.html +2 -2
  99. data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +108 -0
  100. data/doc/rdoc/fr_class_index.html +2 -0
  101. data/doc/rdoc/fr_file_index.html +1 -0
  102. data/doc/rdoc/fr_method_index.html +76 -61
  103. data/examples/cl_watcher.rb +12 -9
  104. data/examples/hpricot_pudding.rb +1 -1
  105. data/examples/mongrel_test_suite/test/http/protocol_parameters.rb +0 -3
  106. data/examples/mongrel_test_suite/test/rails/catastrophe.rb +26 -0
  107. data/examples/mongrel_test_suite/test/rails/conditional.rb +81 -0
  108. data/examples/mongrel_test_suite/test/rails/put.rb +25 -0
  109. data/examples/mongrel_test_suite/test/rails/redirect.rb +13 -0
  110. data/examples/mongrel_test_suite/test/rails/static_files.rb +47 -2
  111. data/examples/rails_security_test.rb +61 -0
  112. data/ext/http11_client/http11_client.c +15 -1
  113. data/ext/http11_client/http11_parser.c +627 -203
  114. data/ext/http11_client/http11_parser.h +2 -0
  115. data/ext/http11_client/http11_parser.rl +8 -4
  116. data/lib/rfuzz/client.rb +124 -115
  117. data/lib/rfuzz/pushbackio.rb +90 -0
  118. metadata +86 -60
  119. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +0 -24
  120. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +0 -50
  121. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +0 -49
  122. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +0 -57
  123. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +0 -37
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ setup_extension('fuzzrnd','fuzzrnd')
18
18
  desc "Does a full compile, test run"
19
19
  task :default => [:http11_client, :fuzzrnd, :test]
20
20
 
21
- version="0.7"
21
+ version="0.8"
22
22
  name="rfuzz"
23
23
 
24
24
  setup_gem(name, version) do |spec|
@@ -92,9 +92,9 @@ A simple class that emulates a browser using hpricot.
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000070">links</a>&nbsp;&nbsp;
96
- <a href="#M000068">new</a>&nbsp;&nbsp;
97
- <a href="#M000069">start</a>&nbsp;&nbsp;
95
+ <a href="#M000085">links</a>&nbsp;&nbsp;
96
+ <a href="#M000083">new</a>&nbsp;&nbsp;
97
+ <a href="#M000084">start</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -157,12 +157,12 @@ A simple class that emulates a browser using hpricot.
157
157
  <div id="methods">
158
158
  <h3 class="section-bar">Public Class methods</h3>
159
159
 
160
- <div id="method-M000068" class="method-detail">
161
- <a name="M000068"></a>
160
+ <div id="method-M000083" class="method-detail">
161
+ <a name="M000083"></a>
162
162
 
163
163
  <div class="method-heading">
164
- <a href="Browser.src/M000068.html" target="Code" class="method-signature"
165
- onclick="popupCode('Browser.src/M000068.html');return false;">
164
+ <a href="Browser.src/M000083.html" target="Code" class="method-signature"
165
+ onclick="popupCode('Browser.src/M000083.html');return false;">
166
166
  <span class="method-name">new</span><span class="method-args">(host, port=80, ops={}, agent=DEFAULT_AGENT)</span>
167
167
  </a>
168
168
  </div>
@@ -177,12 +177,12 @@ change it to something else.
177
177
 
178
178
  <h3 class="section-bar">Public Instance methods</h3>
179
179
 
180
- <div id="method-M000070" class="method-detail">
181
- <a name="M000070"></a>
180
+ <div id="method-M000085" class="method-detail">
181
+ <a name="M000085"></a>
182
182
 
183
183
  <div class="method-heading">
184
- <a href="Browser.src/M000070.html" target="Code" class="method-signature"
185
- onclick="popupCode('Browser.src/M000070.html');return false;">
184
+ <a href="Browser.src/M000085.html" target="Code" class="method-signature"
185
+ onclick="popupCode('Browser.src/M000085.html');return false;">
186
186
  <span class="method-name">links</span><span class="method-args">(matching=nil)</span>
187
187
  </a>
188
188
  </div>
@@ -196,12 +196,12 @@ it&#8217;ll only return those links.
196
196
  </div>
197
197
  </div>
198
198
 
199
- <div id="method-M000069" class="method-detail">
200
- <a name="M000069"></a>
199
+ <div id="method-M000084" class="method-detail">
200
+ <a name="M000084"></a>
201
201
 
202
202
  <div class="method-heading">
203
- <a href="Browser.src/M000069.html" target="Code" class="method-signature"
204
- onclick="popupCode('Browser.src/M000069.html');return false;">
203
+ <a href="Browser.src/M000084.html" target="Code" class="method-signature"
204
+ onclick="popupCode('Browser.src/M000084.html');return false;">
205
205
  <span class="method-name">start</span><span class="method-args">(uri, ops={})</span>
206
206
  </a>
207
207
  </div>
@@ -105,11 +105,11 @@ Here&#8217;s a few examples:
105
105
  client.reset
106
106
  </pre>
107
107
  <p>
108
- The <a href="HttpClient.html#M000018">HttpClient.reset</a> call clears
108
+ The <a href="HttpClient.html#M000029">HttpClient.reset</a> call clears
109
109
  cookies that are maintained.
110
110
  </p>
111
111
  <p>
112
- It uses <a href="HttpClient.html#M000016">method_missing</a> to do the
112
+ It uses <a href="HttpClient.html#M000027">method_missing</a> to do the
113
113
  translation of .put to &quot;PUT /testput HTTP/1.1&quot; so you can get
114
114
  into trouble if you&#8217;re calling unknown methods on it. By default the
115
115
  methods are PUT, GET, POST, DELETE, HEAD. You can change the allowed
@@ -145,16 +145,18 @@ information.
145
145
  <h3 class="section-bar">Methods</h3>
146
146
 
147
147
  <div class="name-list">
148
- <a href="#M000011">build_request</a>&nbsp;&nbsp;
149
- <a href="#M000016">method_missing</a>&nbsp;&nbsp;
150
- <a href="#M000010">new</a>&nbsp;&nbsp;
151
- <a href="#M000019">notify</a>&nbsp;&nbsp;
152
- <a href="#M000013">read_chunked_encoding</a>&nbsp;&nbsp;
153
- <a href="#M000012">read_chunks</a>&nbsp;&nbsp;
154
- <a href="#M000014">read_response</a>&nbsp;&nbsp;
155
- <a href="#M000017">redirect</a>&nbsp;&nbsp;
156
- <a href="#M000018">reset</a>&nbsp;&nbsp;
157
- <a href="#M000015">send_request</a>&nbsp;&nbsp;
148
+ <a href="#M000020">build_request</a>&nbsp;&nbsp;
149
+ <a href="#M000027">method_missing</a>&nbsp;&nbsp;
150
+ <a href="#M000019">new</a>&nbsp;&nbsp;
151
+ <a href="#M000030">notify</a>&nbsp;&nbsp;
152
+ <a href="#M000023">read_chunked_body</a>&nbsp;&nbsp;
153
+ <a href="#M000022">read_chunked_header</a>&nbsp;&nbsp;
154
+ <a href="#M000021">read_parsed_header</a>&nbsp;&nbsp;
155
+ <a href="#M000025">read_response</a>&nbsp;&nbsp;
156
+ <a href="#M000028">redirect</a>&nbsp;&nbsp;
157
+ <a href="#M000029">reset</a>&nbsp;&nbsp;
158
+ <a href="#M000026">send_request</a>&nbsp;&nbsp;
159
+ <a href="#M000024">store_cookies</a>&nbsp;&nbsp;
158
160
  </div>
159
161
  </div>
160
162
 
@@ -218,6 +220,16 @@ information.
218
220
  <td>=</td>
219
221
  <td class="context-item-value">&quot;Host&quot;</td>
220
222
  </tr>
223
+ <tr class="top-aligned-row context-row">
224
+ <td class="context-item-name">CHUNK_SIZE</td>
225
+ <td>=</td>
226
+ <td class="context-item-value">1024 * 16</td>
227
+ </tr>
228
+ <tr class="top-aligned-row context-row">
229
+ <td class="context-item-name">CRLF</td>
230
+ <td>=</td>
231
+ <td class="context-item-value">&quot;\r\n&quot;</td>
232
+ </tr>
221
233
  </table>
222
234
  </div>
223
235
  </div>
@@ -287,12 +299,12 @@ Access to the host, port, default options, and cookies currently in play
287
299
  <div id="methods">
288
300
  <h3 class="section-bar">Public Class methods</h3>
289
301
 
290
- <div id="method-M000010" class="method-detail">
291
- <a name="M000010"></a>
302
+ <div id="method-M000019" class="method-detail">
303
+ <a name="M000019"></a>
292
304
 
293
305
  <div class="method-heading">
294
- <a href="HttpClient.src/M000010.html" target="Code" class="method-signature"
295
- onclick="popupCode('HttpClient.src/M000010.html');return false;">
306
+ <a href="HttpClient.src/M000019.html" target="Code" class="method-signature"
307
+ onclick="popupCode('HttpClient.src/M000019.html');return false;">
296
308
  <span class="method-name">new</span><span class="method-args">(host, port, options = {})</span>
297
309
  </a>
298
310
  </div>
@@ -306,12 +318,12 @@ Doesn&#8216;t make the connect until you actually call a .put,.get, etc.
306
318
 
307
319
  <h3 class="section-bar">Public Instance methods</h3>
308
320
 
309
- <div id="method-M000011" class="method-detail">
310
- <a name="M000011"></a>
321
+ <div id="method-M000020" class="method-detail">
322
+ <a name="M000020"></a>
311
323
 
312
324
  <div class="method-heading">
313
- <a href="HttpClient.src/M000011.html" target="Code" class="method-signature"
314
- onclick="popupCode('HttpClient.src/M000011.html');return false;">
325
+ <a href="HttpClient.src/M000020.html" target="Code" class="method-signature"
326
+ onclick="popupCode('HttpClient.src/M000020.html');return false;">
315
327
  <span class="method-name">build_request</span><span class="method-args">(out, method, uri, req)</span>
316
328
  </a>
317
329
  </div>
@@ -328,12 +340,12 @@ resolution).
328
340
  </div>
329
341
  </div>
330
342
 
331
- <div id="method-M000016" class="method-detail">
332
- <a name="M000016"></a>
343
+ <div id="method-M000027" class="method-detail">
344
+ <a name="M000027"></a>
333
345
 
334
346
  <div class="method-heading">
335
- <a href="HttpClient.src/M000016.html" target="Code" class="method-signature"
336
- onclick="popupCode('HttpClient.src/M000016.html');return false;">
347
+ <a href="HttpClient.src/M000027.html" target="Code" class="method-signature"
348
+ onclick="popupCode('HttpClient.src/M000027.html');return false;">
337
349
  <span class="method-name">method_missing</span><span class="method-args">(symbol, *args)</span>
338
350
  </a>
339
351
  </div>
@@ -348,12 +360,12 @@ construction with :allowed_methods =&gt; [:put, :get, &#8230;]
348
360
  </div>
349
361
  </div>
350
362
 
351
- <div id="method-M000019" class="method-detail">
352
- <a name="M000019"></a>
363
+ <div id="method-M000030" class="method-detail">
364
+ <a name="M000030"></a>
353
365
 
354
366
  <div class="method-heading">
355
- <a href="HttpClient.src/M000019.html" target="Code" class="method-signature"
356
- onclick="popupCode('HttpClient.src/M000019.html');return false;">
367
+ <a href="HttpClient.src/M000030.html" target="Code" class="method-signature"
368
+ onclick="popupCode('HttpClient.src/M000030.html');return false;">
357
369
  <span class="method-name">notify</span><span class="method-args">(event) {|| ...}</span>
358
370
  </a>
359
371
  </div>
@@ -370,41 +382,68 @@ attempt fails.
370
382
  </div>
371
383
  </div>
372
384
 
373
- <div id="method-M000013" class="method-detail">
374
- <a name="M000013"></a>
385
+ <div id="method-M000023" class="method-detail">
386
+ <a name="M000023"></a>
387
+
388
+ <div class="method-heading">
389
+ <a href="HttpClient.src/M000023.html" target="Code" class="method-signature"
390
+ onclick="popupCode('HttpClient.src/M000023.html');return false;">
391
+ <span class="method-name">read_chunked_body</span><span class="method-args">(header)</span>
392
+ </a>
393
+ </div>
394
+
395
+ <div class="method-description">
396
+ <p>
397
+ Collects up a chunked body both collecting the body together <b>and</b>
398
+ collecting the chunks into HttpResponse.raw_chunks[] for alternative
399
+ analysis.
400
+ </p>
401
+ </div>
402
+ </div>
403
+
404
+ <div id="method-M000022" class="method-detail">
405
+ <a name="M000022"></a>
375
406
 
376
407
  <div class="method-heading">
377
- <a href="HttpClient.src/M000013.html" target="Code" class="method-signature"
378
- onclick="popupCode('HttpClient.src/M000013.html');return false;">
379
- <span class="method-name">read_chunked_encoding</span><span class="method-args">(resp, sock, parser)</span>
408
+ <a href="HttpClient.src/M000022.html" target="Code" class="method-signature"
409
+ onclick="popupCode('HttpClient.src/M000022.html');return false;">
410
+ <span class="method-name">read_chunked_header</span><span class="method-args">()</span>
380
411
  </a>
381
412
  </div>
382
413
 
383
414
  <div class="method-description">
415
+ <p>
416
+ Used to process chunked headers and then read up their bodies.
417
+ </p>
384
418
  </div>
385
419
  </div>
386
420
 
387
- <div id="method-M000012" class="method-detail">
388
- <a name="M000012"></a>
421
+ <div id="method-M000021" class="method-detail">
422
+ <a name="M000021"></a>
389
423
 
390
424
  <div class="method-heading">
391
- <a href="HttpClient.src/M000012.html" target="Code" class="method-signature"
392
- onclick="popupCode('HttpClient.src/M000012.html');return false;">
393
- <span class="method-name">read_chunks</span><span class="method-args">(input, out, parser)</span>
425
+ <a href="HttpClient.src/M000021.html" target="Code" class="method-signature"
426
+ onclick="popupCode('HttpClient.src/M000021.html');return false;">
427
+ <span class="method-name">read_parsed_header</span><span class="method-args">()</span>
394
428
  </a>
395
429
  </div>
396
430
 
397
431
  <div class="method-description">
432
+ <p>
433
+ Does the read operations needed to parse a header with the @parser. A
434
+ &quot;header&quot; in this case is either an HTTP header or a Chunked
435
+ encoding header (since the @parser handles both).
436
+ </p>
398
437
  </div>
399
438
  </div>
400
439
 
401
- <div id="method-M000014" class="method-detail">
402
- <a name="M000014"></a>
440
+ <div id="method-M000025" class="method-detail">
441
+ <a name="M000025"></a>
403
442
 
404
443
  <div class="method-heading">
405
- <a href="HttpClient.src/M000014.html" target="Code" class="method-signature"
406
- onclick="popupCode('HttpClient.src/M000014.html');return false;">
407
- <span class="method-name">read_response</span><span class="method-args">(sock)</span>
444
+ <a href="HttpClient.src/M000025.html" target="Code" class="method-signature"
445
+ onclick="popupCode('HttpClient.src/M000025.html');return false;">
446
+ <span class="method-name">read_response</span><span class="method-args">()</span>
408
447
  </a>
409
448
  </div>
410
449
 
@@ -422,12 +461,12 @@ so either write a wrapper, use net/http, or deal with it on your end.
422
461
  </div>
423
462
  </div>
424
463
 
425
- <div id="method-M000017" class="method-detail">
426
- <a name="M000017"></a>
464
+ <div id="method-M000028" class="method-detail">
465
+ <a name="M000028"></a>
427
466
 
428
467
  <div class="method-heading">
429
- <a href="HttpClient.src/M000017.html" target="Code" class="method-signature"
430
- onclick="popupCode('HttpClient.src/M000017.html');return false;">
468
+ <a href="HttpClient.src/M000028.html" target="Code" class="method-signature"
469
+ onclick="popupCode('HttpClient.src/M000028.html');return false;">
431
470
  <span class="method-name">redirect</span><span class="method-args">(method, resp, *args)</span>
432
471
  </a>
433
472
  </div>
@@ -439,12 +478,12 @@ Keeps doing requests until it doesn&#8217;t receive a 3XX request.
439
478
  </div>
440
479
  </div>
441
480
 
442
- <div id="method-M000018" class="method-detail">
443
- <a name="M000018"></a>
481
+ <div id="method-M000029" class="method-detail">
482
+ <a name="M000029"></a>
444
483
 
445
484
  <div class="method-heading">
446
- <a href="HttpClient.src/M000018.html" target="Code" class="method-signature"
447
- onclick="popupCode('HttpClient.src/M000018.html');return false;">
485
+ <a href="HttpClient.src/M000029.html" target="Code" class="method-signature"
486
+ onclick="popupCode('HttpClient.src/M000029.html');return false;">
448
487
  <span class="method-name">reset</span><span class="method-args">()</span>
449
488
  </a>
450
489
  </div>
@@ -456,12 +495,12 @@ Clears out the cookies in use so far in order to get a clean slate.
456
495
  </div>
457
496
  </div>
458
497
 
459
- <div id="method-M000015" class="method-detail">
460
- <a name="M000015"></a>
498
+ <div id="method-M000026" class="method-detail">
499
+ <a name="M000026"></a>
461
500
 
462
501
  <div class="method-heading">
463
- <a href="HttpClient.src/M000015.html" target="Code" class="method-signature"
464
- onclick="popupCode('HttpClient.src/M000015.html');return false;">
502
+ <a href="HttpClient.src/M000026.html" target="Code" class="method-signature"
503
+ onclick="popupCode('HttpClient.src/M000026.html');return false;">
465
504
  <span class="method-name">send_request</span><span class="method-args">(method, uri, req)</span>
466
505
  </a>
467
506
  </div>
@@ -469,13 +508,31 @@ Clears out the cookies in use so far in order to get a clean slate.
469
508
  <div class="method-description">
470
509
  <p>
471
510
  Does the socket connect and then <a
472
- href="HttpClient.html#M000011">build_request</a>, <a
473
- href="HttpClient.html#M000014">read_response</a> calls finally returning
511
+ href="HttpClient.html#M000020">build_request</a>, <a
512
+ href="HttpClient.html#M000025">read_response</a> calls finally returning
474
513
  the result.
475
514
  </p>
476
515
  </div>
477
516
  </div>
478
517
 
518
+ <div id="method-M000024" class="method-detail">
519
+ <a name="M000024"></a>
520
+
521
+ <div class="method-heading">
522
+ <a href="HttpClient.src/M000024.html" target="Code" class="method-signature"
523
+ onclick="popupCode('HttpClient.src/M000024.html');return false;">
524
+ <span class="method-name">store_cookies</span><span class="method-args">(resp)</span>
525
+ </a>
526
+ </div>
527
+
528
+ <div class="method-description">
529
+ <p>
530
+ Reads the SET_COOKIE string out of resp and translates it into the @cookies
531
+ store for this <a href="HttpClient.html">HttpClient</a>.
532
+ </p>
533
+ </div>
534
+ </div>
535
+
479
536
 
480
537
  </div>
481
538
 
@@ -5,22 +5,21 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>notify (RFuzz::HttpClient)</title>
8
+ <title>new (RFuzz::HttpClient)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 447</span>
14
- 447: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notify</span>(<span class="ruby-identifier">event</span>)
15
- 448: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
16
- 449:
17
- 450: <span class="ruby-keyword kw">begin</span>
18
- 451: <span class="ruby-keyword kw">yield</span>
19
- 452: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
20
- 453: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span>
21
- 454: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:error</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
22
- 455: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">$!</span>
23
- 456: <span class="ruby-keyword kw">end</span>
24
- 457: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 230</span>
14
+ 230: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">options</span> = {})
15
+ 231: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
16
+ 232: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
17
+ 233: <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
18
+ 234: <span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:cookies</span>] <span class="ruby-operator">||</span> {}
19
+ 235: <span class="ruby-ivar">@allowed_methods</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:allowed_methods</span>] <span class="ruby-operator">||</span> [<span class="ruby-identifier">:put</span>, <span class="ruby-identifier">:get</span>, <span class="ruby-identifier">:post</span>, <span class="ruby-identifier">:delete</span>, <span class="ruby-identifier">:head</span>]
20
+ 236: <span class="ruby-ivar">@notifier</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:notifier</span>]
21
+ 237: <span class="ruby-ivar">@redirect</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:redirect</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
22
+ 238: <span class="ruby-ivar">@parser</span> = <span class="ruby-constant">HttpClientParser</span>.<span class="ruby-identifier">new</span>
23
+ 239: <span class="ruby-keyword kw">end</span></pre>
25
24
  </body>
26
25
  </html>
@@ -10,25 +10,25 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 230</span>
14
- 230: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_request</span>(<span class="ruby-identifier">out</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">req</span>)
15
- 231: <span class="ruby-identifier">ops</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">req</span>)
16
- 232: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:query</span>]
17
- 233:
18
- 234: <span class="ruby-comment cmt"># merge head differently since that's typically what they mean</span>
19
- 235: <span class="ruby-identifier">head</span> = <span class="ruby-identifier">req</span>[<span class="ruby-identifier">:head</span>] <span class="ruby-operator">||</span> {}
20
- 236: <span class="ruby-identifier">head</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>].<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">head</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>]
21
- 237:
22
- 238: <span class="ruby-comment cmt"># setup basic headers we always need</span>
23
- 239: <span class="ruby-identifier">head</span>[<span class="ruby-constant">REQ_HOST</span>] = <span class="ruby-identifier">encode_host</span>(<span class="ruby-ivar">@host</span>,<span class="ruby-ivar">@port</span>)
24
- 240: <span class="ruby-identifier">head</span>[<span class="ruby-constant">REQ_CONTENT_LENGTH</span>] = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
25
- 241:
26
- 242: <span class="ruby-comment cmt"># blast it out</span>
27
- 243: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">HTTP_REQUEST_HEADER</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">method</span>, <span class="ruby-identifier">encode_query</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">query</span>)])
28
- 244: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">encode_headers</span>(<span class="ruby-identifier">head</span>))
29
- 245: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">encode_cookies</span>(<span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">req</span>[<span class="ruby-identifier">:cookies</span>] <span class="ruby-operator">||</span> {})))
30
- 246: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;\r\n&quot;</span>)
31
- 247: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>
32
- 248: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 247</span>
14
+ 247: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_request</span>(<span class="ruby-identifier">out</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">req</span>)
15
+ 248: <span class="ruby-identifier">ops</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">req</span>)
16
+ 249: <span class="ruby-identifier">query</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:query</span>]
17
+ 250:
18
+ 251: <span class="ruby-comment cmt"># merge head differently since that's typically what they mean</span>
19
+ 252: <span class="ruby-identifier">head</span> = <span class="ruby-identifier">req</span>[<span class="ruby-identifier">:head</span>] <span class="ruby-operator">||</span> {}
20
+ 253: <span class="ruby-identifier">head</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>].<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">head</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>]
21
+ 254:
22
+ 255: <span class="ruby-comment cmt"># setup basic headers we always need</span>
23
+ 256: <span class="ruby-identifier">head</span>[<span class="ruby-constant">REQ_HOST</span>] = <span class="ruby-identifier">encode_host</span>(<span class="ruby-ivar">@host</span>,<span class="ruby-ivar">@port</span>)
24
+ 257: <span class="ruby-identifier">head</span>[<span class="ruby-constant">REQ_CONTENT_LENGTH</span>] = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
25
+ 258:
26
+ 259: <span class="ruby-comment cmt"># blast it out</span>
27
+ 260: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">HTTP_REQUEST_HEADER</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">method</span>, <span class="ruby-identifier">encode_query</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">query</span>)])
28
+ 261: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">encode_headers</span>(<span class="ruby-identifier">head</span>))
29
+ 262: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">encode_cookies</span>(<span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">req</span>[<span class="ruby-identifier">:cookies</span>] <span class="ruby-operator">||</span> {})))
30
+ 263: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">CRLF</span>)
31
+ 264: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:body</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>
32
+ 265: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>read_parsed_header (RFuzz::HttpClient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 270</span>
14
+ 270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_parsed_header</span>
15
+ 271: <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">reset</span>
16
+ 272: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">HttpResponse</span>.<span class="ruby-identifier">new</span>
17
+ 273: <span class="ruby-identifier">data</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">CHUNK_SIZE</span>, <span class="ruby-identifier">partial</span>=<span class="ruby-keyword kw">true</span>)
18
+ 274: <span class="ruby-identifier">nread</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span>, <span class="ruby-value">0</span>)
19
+ 275:
20
+ 276: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">finished?</span>
21
+ 277: <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">CHUNK_SIZE</span>, <span class="ruby-identifier">partial</span>=<span class="ruby-keyword kw">true</span>)
22
+ 278: <span class="ruby-identifier">nread</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">nread</span>)
23
+ 279: <span class="ruby-keyword kw">end</span>
24
+ 280:
25
+ 281: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
26
+ 282: <span class="ruby-keyword kw">end</span></pre>
27
+ </body>
28
+ </html>
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>read_chunked_header (RFuzz::HttpClient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 286</span>
14
+ 286: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_chunked_header</span>
15
+ 287: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">read_parsed_header</span>
16
+ 288: <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>)
17
+ 289:
18
+ 290: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">resp</span>.<span class="ruby-identifier">last_chunk?</span>
19
+ 291: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">chunk_size</span>)
20
+ 292:
21
+ 293: <span class="ruby-identifier">trail</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
22
+ 294: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">trail</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">CRLF</span>
23
+ 295: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientParserError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Chunk ended in #{trail.inspect} not #{CRLF.inspect}&quot;</span>)
24
+ 296: <span class="ruby-keyword kw">end</span>
25
+ 297: <span class="ruby-keyword kw">end</span>
26
+ 298:
27
+ 299: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
28
+ 300: <span class="ruby-keyword kw">end</span></pre>
29
+ </body>
30
+ </html>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>read_chunked_body (RFuzz::HttpClient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 306</span>
14
+ 306: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_chunked_body</span>(<span class="ruby-identifier">header</span>)
15
+ 307: <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span>)
16
+ 308: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-value str">&quot;&quot;</span>
17
+ 309: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">raw_chunks</span> = []
18
+ 310:
19
+ 311: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
20
+ 312: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
21
+ 313: <span class="ruby-identifier">chunk</span> = <span class="ruby-identifier">read_chunked_header</span>
22
+ 314: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">raw_chunks</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">chunk</span>
23
+ 315: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">last_chunk?</span>
24
+ 316: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">http_body</span>
25
+ 317: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:end</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
26
+ 318: <span class="ruby-keyword kw">else</span>
27
+ 319: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:end</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
28
+ 320: <span class="ruby-keyword kw">break</span> <span class="ruby-comment cmt"># last chunk, done</span>
29
+ 321: <span class="ruby-keyword kw">end</span>
30
+ 322: <span class="ruby-keyword kw">end</span>
31
+ 323:
32
+ 324: <span class="ruby-identifier">header</span>
33
+ 325: <span class="ruby-keyword kw">end</span></pre>
34
+ </body>
35
+ </html>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>store_cookies (RFuzz::HttpClient)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 329</span>
14
+ 329: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_cookies</span>(<span class="ruby-identifier">resp</span>)
15
+ 330: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>]
16
+ 331: <span class="ruby-identifier">cookies</span> = <span class="ruby-identifier">query_parse</span>(<span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>], <span class="ruby-value str">';'</span>)
17
+ 332: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">cookies</span>
18
+ 333: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">&quot;path&quot;</span>
19
+ 334: <span class="ruby-keyword kw">end</span>
20
+ 335: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>