rfuzz 0.7 → 0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
- data/doc/rdoc/classes/RFuzz/Browser.src/{M000068.html → M000083.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Browser.src/{M000069.html → M000084.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Browser.src/{M000070.html → M000085.html} +0 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +114 -57
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +12 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000011.html → M000020.html} +20 -20
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +28 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +30 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +35 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +44 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +38 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000016.html → M000027.html} +12 -12
- data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000017.html → M000028.html} +20 -20
- data/doc/rdoc/classes/RFuzz/HttpClient.src/{M000018.html → M000029.html} +4 -4
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpClientError.html +118 -0
- data/doc/rdoc/classes/RFuzz/HttpEncoding.html +7 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +12 -12
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +18 -18
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +4 -4
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +6 -6
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +6 -6
- data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +18 -18
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +74 -13
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +22 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +18 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +18 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +49 -31
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000044.html → M000058.html} +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000045.html → M000059.html} +3 -3
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000047.html → M000060.html} +2 -2
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000048.html → M000061.html} +2 -2
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000049.html → M000062.html} +2 -2
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000046.html → M000063.html} +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +17 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.html +296 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +19 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +20 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +19 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +18 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +44 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +18 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +18 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +18 -0
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000032.html → M000046.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000033.html → M000047.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000036.html → M000050.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000037.html → M000051.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000038.html → M000052.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000039.html → M000053.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000040.html → M000054.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000041.html → M000055.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000042.html → M000056.html} +0 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/{M000043.html → M000057.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000056.html → M000071.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000057.html → M000072.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000058.html → M000073.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000059.html → M000074.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000060.html → M000075.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000061.html → M000076.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000062.html → M000077.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000063.html → M000078.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000064.html → M000079.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000065.html → M000080.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000066.html → M000081.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Sampler.src/{M000067.html → M000082.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.html +63 -63
- data/doc/rdoc/classes/RFuzz/Session.src/{M000020.html → M000034.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000021.html → M000035.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000022.html → M000036.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000023.html → M000037.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000024.html → M000038.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000025.html → M000039.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000026.html → M000040.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000027.html → M000041.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000028.html → M000042.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000029.html → M000043.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000030.html → M000044.html} +0 -0
- data/doc/rdoc/classes/RFuzz/Session.src/{M000031.html → M000045.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000050.html → M000065.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000051.html → M000066.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000052.html → M000067.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000053.html → M000068.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000054.html → M000069.html} +0 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000055.html → M000070.html} +0 -0
- data/doc/rdoc/classes/RFuzz.html +7 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +2 -2
- data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +108 -0
- data/doc/rdoc/fr_class_index.html +2 -0
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +76 -61
- data/examples/cl_watcher.rb +12 -9
- data/examples/hpricot_pudding.rb +1 -1
- data/examples/mongrel_test_suite/test/http/protocol_parameters.rb +0 -3
- data/examples/mongrel_test_suite/test/rails/catastrophe.rb +26 -0
- data/examples/mongrel_test_suite/test/rails/conditional.rb +81 -0
- data/examples/mongrel_test_suite/test/rails/put.rb +25 -0
- data/examples/mongrel_test_suite/test/rails/redirect.rb +13 -0
- data/examples/mongrel_test_suite/test/rails/static_files.rb +47 -2
- data/examples/rails_security_test.rb +61 -0
- data/ext/http11_client/http11_client.c +15 -1
- data/ext/http11_client/http11_parser.c +627 -203
- data/ext/http11_client/http11_parser.h +2 -0
- data/ext/http11_client/http11_parser.rl +8 -4
- data/lib/rfuzz/client.rb +124 -115
- data/lib/rfuzz/pushbackio.rb +90 -0
- metadata +86 -60
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +0 -24
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +0 -50
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +0 -49
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +0 -57
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +0 -37
data/Rakefile
CHANGED
|
@@ -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="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
95
|
+
<a href="#M000085">links</a>
|
|
96
|
+
<a href="#M000083">new</a>
|
|
97
|
+
<a href="#M000084">start</a>
|
|
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-
|
|
161
|
-
<a name="
|
|
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/
|
|
165
|
-
onclick="popupCode('Browser.src/
|
|
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-
|
|
181
|
-
<a name="
|
|
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/
|
|
185
|
-
onclick="popupCode('Browser.src/
|
|
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’ll only return those links.
|
|
|
196
196
|
</div>
|
|
197
197
|
</div>
|
|
198
198
|
|
|
199
|
-
<div id="method-
|
|
200
|
-
<a name="
|
|
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/
|
|
204
|
-
onclick="popupCode('Browser.src/
|
|
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>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -105,11 +105,11 @@ Here’s a few examples:
|
|
|
105
105
|
client.reset
|
|
106
106
|
</pre>
|
|
107
107
|
<p>
|
|
108
|
-
The <a href="HttpClient.html#
|
|
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#
|
|
112
|
+
It uses <a href="HttpClient.html#M000027">method_missing</a> to do the
|
|
113
113
|
translation of .put to "PUT /testput HTTP/1.1" so you can get
|
|
114
114
|
into trouble if you’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="#
|
|
149
|
-
<a href="#
|
|
150
|
-
<a href="#
|
|
151
|
-
<a href="#
|
|
152
|
-
<a href="#
|
|
153
|
-
<a href="#
|
|
154
|
-
<a href="#
|
|
155
|
-
<a href="#
|
|
156
|
-
<a href="#
|
|
157
|
-
<a href="#
|
|
148
|
+
<a href="#M000020">build_request</a>
|
|
149
|
+
<a href="#M000027">method_missing</a>
|
|
150
|
+
<a href="#M000019">new</a>
|
|
151
|
+
<a href="#M000030">notify</a>
|
|
152
|
+
<a href="#M000023">read_chunked_body</a>
|
|
153
|
+
<a href="#M000022">read_chunked_header</a>
|
|
154
|
+
<a href="#M000021">read_parsed_header</a>
|
|
155
|
+
<a href="#M000025">read_response</a>
|
|
156
|
+
<a href="#M000028">redirect</a>
|
|
157
|
+
<a href="#M000029">reset</a>
|
|
158
|
+
<a href="#M000026">send_request</a>
|
|
159
|
+
<a href="#M000024">store_cookies</a>
|
|
158
160
|
</div>
|
|
159
161
|
</div>
|
|
160
162
|
|
|
@@ -218,6 +220,16 @@ information.
|
|
|
218
220
|
<td>=</td>
|
|
219
221
|
<td class="context-item-value">"Host"</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">"\r\n"</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-
|
|
291
|
-
<a name="
|
|
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/
|
|
295
|
-
onclick="popupCode('HttpClient.src/
|
|
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‘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-
|
|
310
|
-
<a name="
|
|
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/
|
|
314
|
-
onclick="popupCode('HttpClient.src/
|
|
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-
|
|
332
|
-
<a name="
|
|
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/
|
|
336
|
-
onclick="popupCode('HttpClient.src/
|
|
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 => [:put, :get, …]
|
|
|
348
360
|
</div>
|
|
349
361
|
</div>
|
|
350
362
|
|
|
351
|
-
<div id="method-
|
|
352
|
-
<a name="
|
|
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/
|
|
356
|
-
onclick="popupCode('HttpClient.src/
|
|
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-
|
|
374
|
-
<a name="
|
|
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/
|
|
378
|
-
onclick="popupCode('HttpClient.src/
|
|
379
|
-
<span class="method-name">
|
|
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-
|
|
388
|
-
<a name="
|
|
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/
|
|
392
|
-
onclick="popupCode('HttpClient.src/
|
|
393
|
-
<span class="method-name">
|
|
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
|
+
"header" 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-
|
|
402
|
-
<a name="
|
|
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/
|
|
406
|
-
onclick="popupCode('HttpClient.src/
|
|
407
|
-
<span class="method-name">read_response</span><span class="method-args">(
|
|
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-
|
|
426
|
-
<a name="
|
|
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/
|
|
430
|
-
onclick="popupCode('HttpClient.src/
|
|
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’t receive a 3XX request.
|
|
|
439
478
|
</div>
|
|
440
479
|
</div>
|
|
441
480
|
|
|
442
|
-
<div id="method-
|
|
443
|
-
<a name="
|
|
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/
|
|
447
|
-
onclick="popupCode('HttpClient.src/
|
|
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-
|
|
460
|
-
<a name="
|
|
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/
|
|
464
|
-
onclick="popupCode('HttpClient.src/
|
|
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#
|
|
473
|
-
href="HttpClient.html#
|
|
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>
|
|
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
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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">""</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"><<</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">"Chunk ended in #{trail.inspect} not #{CRLF.inspect}"</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">""</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"><<</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"><<</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">"path"</span>
|
|
19
|
+
334: <span class="ruby-keyword kw">end</span>
|
|
20
|
+
335: <span class="ruby-keyword kw">end</span></pre>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|