rfuzz 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/doc/rdoc/classes/RFuzz.html +1 -1
- data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
- data/doc/rdoc/classes/RFuzz/Browser.src/M000084.html +12 -10
- data/doc/rdoc/classes/RFuzz/Browser.src/M000085.html +10 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000086.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +72 -64
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html +12 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +21 -15
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +15 -17
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +17 -22
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -9
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +9 -31
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +31 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000027.html +25 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html +13 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html +21 -5
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +5 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +15 -15
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +9 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +5 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html +18 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +36 -36
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000059.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000060.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000061.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000062.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000063.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000058.html → M000065.html} +4 -4
- data/doc/rdoc/classes/RFuzz/PushBackIO.html +55 -40
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +2 -1
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +8 -6
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +7 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +6 -31
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +32 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +5 -9
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html +8 -10
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html +23 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html +7 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000054.html +7 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html +5 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html +5 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html +9 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000072.html +6 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000073.html +10 -13
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000074.html +13 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000075.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000076.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000077.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000078.html +5 -6
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000079.html +6 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000080.html +5 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000081.html +10 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000082.html +5 -7
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000083.html +20 -0
- data/doc/rdoc/classes/RFuzz/Session.html +63 -63
- data/doc/rdoc/classes/RFuzz/Session.src/M000035.html +18 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000036.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000037.html +5 -21
- data/doc/rdoc/classes/RFuzz/Session.src/M000038.html +21 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000039.html +6 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000040.html +6 -13
- data/doc/rdoc/classes/RFuzz/Session.src/M000041.html +13 -16
- data/doc/rdoc/classes/RFuzz/Session.src/M000042.html +16 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000043.html +6 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000044.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000045.html +5 -10
- data/doc/rdoc/classes/RFuzz/Session.src/M000046.html +23 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html +6 -6
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html +6 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html +5 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html +5 -15
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html +15 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000065.html → M000071.html} +5 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
- data/doc/rdoc/fr_method_index.html +76 -75
- data/examples/kill_routes.rb +5 -4
- data/examples/mongrel_test_suite/test/rails/put.rb +14 -7
- data/examples/random_sockets.rb +37 -0
- data/examples/randomizer.rb +19 -0
- data/ext/http11_client/http11_parser.c +33 -34
- data/lib/rfuzz/client.rb +1 -1
- data/lib/rfuzz/pushbackio.rb +16 -2
- data/lib/rfuzz/session.rb +1 -1
- metadata +14 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000083.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +0 -22
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000046.html +0 -21
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000050.html +0 -22
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000071.html +0 -19
- data/doc/rdoc/classes/RFuzz/Session.src/M000034.html +0 -31
data/Rakefile
CHANGED
data/doc/rdoc/classes/RFuzz.html
CHANGED
@@ -96,7 +96,7 @@
|
|
96
96
|
<p>
|
97
97
|
A very simple little class for doing some basic fast statistics sampling.
|
98
98
|
You feed it either samples of numeric data you want measured or you call <a
|
99
|
-
href="RFuzz/Sampler.html#
|
99
|
+
href="RFuzz/Sampler.html#M000083">Sampler.tick</a> to get it to add a time
|
100
100
|
delta between the last time you called it. When you’re done either
|
101
101
|
call sum, sumsq, n, min, max, mean or sd to get the information. The other
|
102
102
|
option is to just call dump and see everything.
|
@@ -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="#M000086">links</a>
|
96
|
+
<a href="#M000084">new</a>
|
97
|
+
<a href="#M000085">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-M000084" class="method-detail">
|
161
|
+
<a name="M000084"></a>
|
162
162
|
|
163
163
|
<div class="method-heading">
|
164
|
-
<a href="Browser.src/
|
165
|
-
onclick="popupCode('Browser.src/
|
164
|
+
<a href="Browser.src/M000084.html" target="Code" class="method-signature"
|
165
|
+
onclick="popupCode('Browser.src/M000084.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-M000086" class="method-detail">
|
181
|
+
<a name="M000086"></a>
|
182
182
|
|
183
183
|
<div class="method-heading">
|
184
|
-
<a href="Browser.src/
|
185
|
-
onclick="popupCode('Browser.src/
|
184
|
+
<a href="Browser.src/M000086.html" target="Code" class="method-signature"
|
185
|
+
onclick="popupCode('Browser.src/M000086.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-M000085" class="method-detail">
|
200
|
+
<a name="M000085"></a>
|
201
201
|
|
202
202
|
<div class="method-heading">
|
203
|
-
<a href="Browser.src/
|
204
|
-
onclick="popupCode('Browser.src/
|
203
|
+
<a href="Browser.src/M000085.html" target="Code" class="method-signature"
|
204
|
+
onclick="popupCode('Browser.src/M000085.html');return false;">
|
205
205
|
<span class="method-name">start</span><span class="method-args">(uri, ops={})</span>
|
206
206
|
</a>
|
207
207
|
</div>
|
@@ -5,19 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (RFuzz::Browser)</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/browser.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/browser.rb, line 17</span>
|
14
|
+
17: <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-value">80</span>, <span class="ruby-identifier">ops</span>={}, <span class="ruby-identifier">agent</span>=<span class="ruby-constant">DEFAULT_AGENT</span>)
|
15
|
+
18: <span class="ruby-ivar">@agent</span> = <span class="ruby-identifier">agent</span>
|
16
|
+
19: <span class="ruby-ivar">@client</span> = <span class="ruby-constant">HttpClient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">ops</span>)
|
17
|
+
20:
|
18
|
+
21: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>] <span class="ruby-operator">||=</span> {}
|
19
|
+
22: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:head</span>][<span class="ruby-value str">"User-Agent"</span>] <span class="ruby-operator">||=</span> <span class="ruby-ivar">@agent</span>
|
20
|
+
23:
|
21
|
+
24: <span class="ruby-ivar">@doc</span> = <span class="ruby-keyword kw">nil</span>
|
22
|
+
25: <span class="ruby-ivar">@response</span> = <span class="ruby-keyword kw">nil</span>
|
23
|
+
26: <span class="ruby-keyword kw">end</span></pre>
|
22
24
|
</body>
|
23
25
|
</html>
|
@@ -5,20 +5,19 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>start (RFuzz::Browser)</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/browser.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
50: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/browser.rb, line 30</span>
|
14
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">ops</span>={})
|
15
|
+
31: <span class="ruby-ivar">@response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">ops</span>)
|
16
|
+
32: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@response</span>.<span class="ruby-identifier">http_status</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"200"</span>
|
17
|
+
33: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Invalid status: #{@response.http_status}"</span>
|
18
|
+
34: <span class="ruby-keyword kw">end</span>
|
19
|
+
35:
|
20
|
+
36: <span class="ruby-ivar">@doc</span> = <span class="ruby-constant">Hpricot</span>(<span class="ruby-ivar">@response</span>.<span class="ruby-identifier">http_body</span>)
|
21
|
+
37: <span class="ruby-keyword kw">end</span></pre>
|
23
22
|
</body>
|
24
23
|
</html>
|
@@ -0,0 +1,24 @@
|
|
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>links (RFuzz::Browser)</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/browser.rb, line 42</span>
|
14
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">links</span>(<span class="ruby-identifier">matching</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
+
43: <span class="ruby-identifier">links</span> = <span class="ruby-ivar">@doc</span><span class="ruby-operator">/</span><span class="ruby-identifier">:a</span>
|
16
|
+
44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">matching</span>
|
17
|
+
45: <span class="ruby-comment cmt"># return only the ones that match</span>
|
18
|
+
46: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">links</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">matching</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"href"</span>]}
|
19
|
+
47: <span class="ruby-keyword kw">else</span>
|
20
|
+
48: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">links</span>
|
21
|
+
49: <span class="ruby-keyword kw">end</span>
|
22
|
+
50: <span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -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#M000030">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#M000028">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,18 +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="#
|
158
|
-
<a href="#
|
159
|
-
<a href="#
|
148
|
+
<a href="#M000021">build_request</a>
|
149
|
+
<a href="#M000028">method_missing</a>
|
150
|
+
<a href="#M000020">new</a>
|
151
|
+
<a href="#M000031">notify</a>
|
152
|
+
<a href="#M000024">read_chunked_body</a>
|
153
|
+
<a href="#M000023">read_chunked_header</a>
|
154
|
+
<a href="#M000022">read_parsed_header</a>
|
155
|
+
<a href="#M000026">read_response</a>
|
156
|
+
<a href="#M000029">redirect</a>
|
157
|
+
<a href="#M000030">reset</a>
|
158
|
+
<a href="#M000027">send_request</a>
|
159
|
+
<a href="#M000025">store_cookies</a>
|
160
160
|
</div>
|
161
161
|
</div>
|
162
162
|
|
@@ -287,6 +287,14 @@ Access to the host, port, default options, and cookies currently in play
|
|
287
287
|
<td class="context-item-desc">
|
288
288
|
Access to the host, port, default options, and cookies currently in play
|
289
289
|
|
290
|
+
</td>
|
291
|
+
</tr>
|
292
|
+
<tr class="top-aligned-row context-row">
|
293
|
+
<td class="context-item-name">sock</td>
|
294
|
+
<td class="context-item-value"> [RW] </td>
|
295
|
+
<td class="context-item-desc">
|
296
|
+
Access to the host, port, default options, and cookies currently in play
|
297
|
+
|
290
298
|
</td>
|
291
299
|
</tr>
|
292
300
|
</table>
|
@@ -299,12 +307,12 @@ Access to the host, port, default options, and cookies currently in play
|
|
299
307
|
<div id="methods">
|
300
308
|
<h3 class="section-bar">Public Class methods</h3>
|
301
309
|
|
302
|
-
<div id="method-
|
303
|
-
<a name="
|
310
|
+
<div id="method-M000020" class="method-detail">
|
311
|
+
<a name="M000020"></a>
|
304
312
|
|
305
313
|
<div class="method-heading">
|
306
|
-
<a href="HttpClient.src/
|
307
|
-
onclick="popupCode('HttpClient.src/
|
314
|
+
<a href="HttpClient.src/M000020.html" target="Code" class="method-signature"
|
315
|
+
onclick="popupCode('HttpClient.src/M000020.html');return false;">
|
308
316
|
<span class="method-name">new</span><span class="method-args">(host, port, options = {})</span>
|
309
317
|
</a>
|
310
318
|
</div>
|
@@ -318,12 +326,12 @@ Doesn‘t make the connect until you actually call a .put,.get, etc.
|
|
318
326
|
|
319
327
|
<h3 class="section-bar">Public Instance methods</h3>
|
320
328
|
|
321
|
-
<div id="method-
|
322
|
-
<a name="
|
329
|
+
<div id="method-M000021" class="method-detail">
|
330
|
+
<a name="M000021"></a>
|
323
331
|
|
324
332
|
<div class="method-heading">
|
325
|
-
<a href="HttpClient.src/
|
326
|
-
onclick="popupCode('HttpClient.src/
|
333
|
+
<a href="HttpClient.src/M000021.html" target="Code" class="method-signature"
|
334
|
+
onclick="popupCode('HttpClient.src/M000021.html');return false;">
|
327
335
|
<span class="method-name">build_request</span><span class="method-args">(out, method, uri, req)</span>
|
328
336
|
</a>
|
329
337
|
</div>
|
@@ -340,12 +348,12 @@ resolution).
|
|
340
348
|
</div>
|
341
349
|
</div>
|
342
350
|
|
343
|
-
<div id="method-
|
344
|
-
<a name="
|
351
|
+
<div id="method-M000028" class="method-detail">
|
352
|
+
<a name="M000028"></a>
|
345
353
|
|
346
354
|
<div class="method-heading">
|
347
|
-
<a href="HttpClient.src/
|
348
|
-
onclick="popupCode('HttpClient.src/
|
355
|
+
<a href="HttpClient.src/M000028.html" target="Code" class="method-signature"
|
356
|
+
onclick="popupCode('HttpClient.src/M000028.html');return false;">
|
349
357
|
<span class="method-name">method_missing</span><span class="method-args">(symbol, *args)</span>
|
350
358
|
</a>
|
351
359
|
</div>
|
@@ -360,12 +368,12 @@ construction with :allowed_methods => [:put, :get, …]
|
|
360
368
|
</div>
|
361
369
|
</div>
|
362
370
|
|
363
|
-
<div id="method-
|
364
|
-
<a name="
|
371
|
+
<div id="method-M000031" class="method-detail">
|
372
|
+
<a name="M000031"></a>
|
365
373
|
|
366
374
|
<div class="method-heading">
|
367
|
-
<a href="HttpClient.src/
|
368
|
-
onclick="popupCode('HttpClient.src/
|
375
|
+
<a href="HttpClient.src/M000031.html" target="Code" class="method-signature"
|
376
|
+
onclick="popupCode('HttpClient.src/M000031.html');return false;">
|
369
377
|
<span class="method-name">notify</span><span class="method-args">(event) {|| ...}</span>
|
370
378
|
</a>
|
371
379
|
</div>
|
@@ -382,12 +390,12 @@ attempt fails.
|
|
382
390
|
</div>
|
383
391
|
</div>
|
384
392
|
|
385
|
-
<div id="method-
|
386
|
-
<a name="
|
393
|
+
<div id="method-M000024" class="method-detail">
|
394
|
+
<a name="M000024"></a>
|
387
395
|
|
388
396
|
<div class="method-heading">
|
389
|
-
<a href="HttpClient.src/
|
390
|
-
onclick="popupCode('HttpClient.src/
|
397
|
+
<a href="HttpClient.src/M000024.html" target="Code" class="method-signature"
|
398
|
+
onclick="popupCode('HttpClient.src/M000024.html');return false;">
|
391
399
|
<span class="method-name">read_chunked_body</span><span class="method-args">(header)</span>
|
392
400
|
</a>
|
393
401
|
</div>
|
@@ -401,12 +409,12 @@ analysis.
|
|
401
409
|
</div>
|
402
410
|
</div>
|
403
411
|
|
404
|
-
<div id="method-
|
405
|
-
<a name="
|
412
|
+
<div id="method-M000023" class="method-detail">
|
413
|
+
<a name="M000023"></a>
|
406
414
|
|
407
415
|
<div class="method-heading">
|
408
|
-
<a href="HttpClient.src/
|
409
|
-
onclick="popupCode('HttpClient.src/
|
416
|
+
<a href="HttpClient.src/M000023.html" target="Code" class="method-signature"
|
417
|
+
onclick="popupCode('HttpClient.src/M000023.html');return false;">
|
410
418
|
<span class="method-name">read_chunked_header</span><span class="method-args">()</span>
|
411
419
|
</a>
|
412
420
|
</div>
|
@@ -418,12 +426,12 @@ Used to process chunked headers and then read up their bodies.
|
|
418
426
|
</div>
|
419
427
|
</div>
|
420
428
|
|
421
|
-
<div id="method-
|
422
|
-
<a name="
|
429
|
+
<div id="method-M000022" class="method-detail">
|
430
|
+
<a name="M000022"></a>
|
423
431
|
|
424
432
|
<div class="method-heading">
|
425
|
-
<a href="HttpClient.src/
|
426
|
-
onclick="popupCode('HttpClient.src/
|
433
|
+
<a href="HttpClient.src/M000022.html" target="Code" class="method-signature"
|
434
|
+
onclick="popupCode('HttpClient.src/M000022.html');return false;">
|
427
435
|
<span class="method-name">read_parsed_header</span><span class="method-args">()</span>
|
428
436
|
</a>
|
429
437
|
</div>
|
@@ -437,12 +445,12 @@ encoding header (since the @parser handles both).
|
|
437
445
|
</div>
|
438
446
|
</div>
|
439
447
|
|
440
|
-
<div id="method-
|
441
|
-
<a name="
|
448
|
+
<div id="method-M000026" class="method-detail">
|
449
|
+
<a name="M000026"></a>
|
442
450
|
|
443
451
|
<div class="method-heading">
|
444
|
-
<a href="HttpClient.src/
|
445
|
-
onclick="popupCode('HttpClient.src/
|
452
|
+
<a href="HttpClient.src/M000026.html" target="Code" class="method-signature"
|
453
|
+
onclick="popupCode('HttpClient.src/M000026.html');return false;">
|
446
454
|
<span class="method-name">read_response</span><span class="method-args">()</span>
|
447
455
|
</a>
|
448
456
|
</div>
|
@@ -461,12 +469,12 @@ so either write a wrapper, use net/http, or deal with it on your end.
|
|
461
469
|
</div>
|
462
470
|
</div>
|
463
471
|
|
464
|
-
<div id="method-
|
465
|
-
<a name="
|
472
|
+
<div id="method-M000029" class="method-detail">
|
473
|
+
<a name="M000029"></a>
|
466
474
|
|
467
475
|
<div class="method-heading">
|
468
|
-
<a href="HttpClient.src/
|
469
|
-
onclick="popupCode('HttpClient.src/
|
476
|
+
<a href="HttpClient.src/M000029.html" target="Code" class="method-signature"
|
477
|
+
onclick="popupCode('HttpClient.src/M000029.html');return false;">
|
470
478
|
<span class="method-name">redirect</span><span class="method-args">(method, resp, *args)</span>
|
471
479
|
</a>
|
472
480
|
</div>
|
@@ -478,12 +486,12 @@ Keeps doing requests until it doesn’t receive a 3XX request.
|
|
478
486
|
</div>
|
479
487
|
</div>
|
480
488
|
|
481
|
-
<div id="method-
|
482
|
-
<a name="
|
489
|
+
<div id="method-M000030" class="method-detail">
|
490
|
+
<a name="M000030"></a>
|
483
491
|
|
484
492
|
<div class="method-heading">
|
485
|
-
<a href="HttpClient.src/
|
486
|
-
onclick="popupCode('HttpClient.src/
|
493
|
+
<a href="HttpClient.src/M000030.html" target="Code" class="method-signature"
|
494
|
+
onclick="popupCode('HttpClient.src/M000030.html');return false;">
|
487
495
|
<span class="method-name">reset</span><span class="method-args">()</span>
|
488
496
|
</a>
|
489
497
|
</div>
|
@@ -495,12 +503,12 @@ Clears out the cookies in use so far in order to get a clean slate.
|
|
495
503
|
</div>
|
496
504
|
</div>
|
497
505
|
|
498
|
-
<div id="method-
|
499
|
-
<a name="
|
506
|
+
<div id="method-M000027" class="method-detail">
|
507
|
+
<a name="M000027"></a>
|
500
508
|
|
501
509
|
<div class="method-heading">
|
502
|
-
<a href="HttpClient.src/
|
503
|
-
onclick="popupCode('HttpClient.src/
|
510
|
+
<a href="HttpClient.src/M000027.html" target="Code" class="method-signature"
|
511
|
+
onclick="popupCode('HttpClient.src/M000027.html');return false;">
|
504
512
|
<span class="method-name">send_request</span><span class="method-args">(method, uri, req)</span>
|
505
513
|
</a>
|
506
514
|
</div>
|
@@ -508,19 +516,19 @@ Clears out the cookies in use so far in order to get a clean slate.
|
|
508
516
|
<div class="method-description">
|
509
517
|
<p>
|
510
518
|
Does the socket connect and then <a
|
511
|
-
href="HttpClient.html#
|
512
|
-
href="HttpClient.html#
|
519
|
+
href="HttpClient.html#M000021">build_request</a>, <a
|
520
|
+
href="HttpClient.html#M000026">read_response</a> calls finally returning
|
513
521
|
the result.
|
514
522
|
</p>
|
515
523
|
</div>
|
516
524
|
</div>
|
517
525
|
|
518
|
-
<div id="method-
|
519
|
-
<a name="
|
526
|
+
<div id="method-M000025" class="method-detail">
|
527
|
+
<a name="M000025"></a>
|
520
528
|
|
521
529
|
<div class="method-heading">
|
522
|
-
<a href="HttpClient.src/
|
523
|
-
onclick="popupCode('HttpClient.src/
|
530
|
+
<a href="HttpClient.src/M000025.html" target="Code" class="method-signature"
|
531
|
+
onclick="popupCode('HttpClient.src/M000025.html');return false;">
|
524
532
|
<span class="method-name">store_cookies</span><span class="method-args">(resp)</span>
|
525
533
|
</a>
|
526
534
|
</div>
|
@@ -5,30 +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
|
-
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>
|
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>
|
33
24
|
</body>
|
34
25
|
</html>
|