rfuzz 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/Rakefile +1 -1
  2. data/doc/rdoc/classes/RFuzz.html +1 -1
  3. data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
  4. data/doc/rdoc/classes/RFuzz/Browser.src/M000084.html +12 -10
  5. data/doc/rdoc/classes/RFuzz/Browser.src/M000085.html +10 -11
  6. data/doc/rdoc/classes/RFuzz/Browser.src/M000086.html +24 -0
  7. data/doc/rdoc/classes/RFuzz/HttpClient.html +72 -64
  8. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html +12 -21
  9. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +21 -15
  10. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +15 -17
  11. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +17 -22
  12. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -9
  13. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +9 -31
  14. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +31 -25
  15. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000027.html +25 -13
  16. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html +13 -21
  17. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html +21 -5
  18. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +5 -13
  19. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html +26 -0
  20. data/doc/rdoc/classes/RFuzz/HttpResponse.html +15 -15
  21. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +9 -5
  22. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +5 -5
  23. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html +18 -0
  24. data/doc/rdoc/classes/RFuzz/Notifier.html +36 -36
  25. data/doc/rdoc/classes/RFuzz/Notifier.src/M000059.html +4 -4
  26. data/doc/rdoc/classes/RFuzz/Notifier.src/M000060.html +4 -4
  27. data/doc/rdoc/classes/RFuzz/Notifier.src/M000061.html +4 -4
  28. data/doc/rdoc/classes/RFuzz/Notifier.src/M000062.html +4 -4
  29. data/doc/rdoc/classes/RFuzz/Notifier.src/M000063.html +4 -4
  30. data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +4 -4
  31. data/doc/rdoc/classes/RFuzz/Notifier.src/{M000058.html → M000065.html} +4 -4
  32. data/doc/rdoc/classes/RFuzz/PushBackIO.html +55 -40
  33. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +2 -1
  34. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +6 -5
  35. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +8 -6
  36. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +7 -5
  37. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +6 -31
  38. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +32 -5
  39. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +6 -5
  40. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +6 -5
  41. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +5 -9
  42. data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html +22 -0
  43. data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
  44. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html +8 -10
  45. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html +23 -0
  46. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html +9 -7
  47. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html +7 -9
  48. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html +9 -7
  49. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000054.html +7 -5
  50. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html +5 -5
  51. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html +5 -9
  52. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html +9 -5
  53. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html +18 -0
  54. data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
  55. data/doc/rdoc/classes/RFuzz/Sampler.src/M000072.html +6 -10
  56. data/doc/rdoc/classes/RFuzz/Sampler.src/M000073.html +10 -13
  57. data/doc/rdoc/classes/RFuzz/Sampler.src/M000074.html +13 -5
  58. data/doc/rdoc/classes/RFuzz/Sampler.src/M000075.html +5 -5
  59. data/doc/rdoc/classes/RFuzz/Sampler.src/M000076.html +5 -5
  60. data/doc/rdoc/classes/RFuzz/Sampler.src/M000077.html +5 -5
  61. data/doc/rdoc/classes/RFuzz/Sampler.src/M000078.html +5 -6
  62. data/doc/rdoc/classes/RFuzz/Sampler.src/M000079.html +6 -5
  63. data/doc/rdoc/classes/RFuzz/Sampler.src/M000080.html +5 -10
  64. data/doc/rdoc/classes/RFuzz/Sampler.src/M000081.html +10 -5
  65. data/doc/rdoc/classes/RFuzz/Sampler.src/M000082.html +5 -7
  66. data/doc/rdoc/classes/RFuzz/Sampler.src/M000083.html +20 -0
  67. data/doc/rdoc/classes/RFuzz/Session.html +63 -63
  68. data/doc/rdoc/classes/RFuzz/Session.src/M000035.html +18 -5
  69. data/doc/rdoc/classes/RFuzz/Session.src/M000036.html +5 -5
  70. data/doc/rdoc/classes/RFuzz/Session.src/M000037.html +5 -21
  71. data/doc/rdoc/classes/RFuzz/Session.src/M000038.html +21 -6
  72. data/doc/rdoc/classes/RFuzz/Session.src/M000039.html +6 -6
  73. data/doc/rdoc/classes/RFuzz/Session.src/M000040.html +6 -13
  74. data/doc/rdoc/classes/RFuzz/Session.src/M000041.html +13 -16
  75. data/doc/rdoc/classes/RFuzz/Session.src/M000042.html +16 -6
  76. data/doc/rdoc/classes/RFuzz/Session.src/M000043.html +6 -5
  77. data/doc/rdoc/classes/RFuzz/Session.src/M000044.html +5 -5
  78. data/doc/rdoc/classes/RFuzz/Session.src/M000045.html +5 -10
  79. data/doc/rdoc/classes/RFuzz/Session.src/M000046.html +23 -0
  80. data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
  81. data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html +6 -6
  82. data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html +6 -5
  83. data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html +5 -5
  84. data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html +5 -15
  85. data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html +15 -5
  86. data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000065.html → M000071.html} +5 -6
  87. data/doc/rdoc/created.rid +1 -1
  88. data/doc/rdoc/files/lib/rfuzz/client_rb.html +1 -1
  89. data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +1 -1
  90. data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
  91. data/doc/rdoc/fr_method_index.html +76 -75
  92. data/examples/kill_routes.rb +5 -4
  93. data/examples/mongrel_test_suite/test/rails/put.rb +14 -7
  94. data/examples/random_sockets.rb +37 -0
  95. data/examples/randomizer.rb +19 -0
  96. data/ext/http11_client/http11_parser.c +33 -34
  97. data/lib/rfuzz/client.rb +1 -1
  98. data/lib/rfuzz/pushbackio.rb +16 -2
  99. data/lib/rfuzz/session.rb +1 -1
  100. metadata +14 -11
  101. data/doc/rdoc/classes/RFuzz/Browser.src/M000083.html +0 -25
  102. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +0 -25
  103. data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +0 -22
  104. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000046.html +0 -21
  105. data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000050.html +0 -22
  106. data/doc/rdoc/classes/RFuzz/Sampler.src/M000071.html +0 -19
  107. data/doc/rdoc/classes/RFuzz/Session.src/M000034.html +0 -31
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.8"
21
+ version="0.9"
22
22
  name="rfuzz"
23
23
 
24
24
  setup_gem(name, version) do |spec|
@@ -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#M000082">Sampler.tick</a> to get it to add a time
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&#8217;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="#M000085">links</a>&nbsp;&nbsp;
96
- <a href="#M000083">new</a>&nbsp;&nbsp;
97
- <a href="#M000084">start</a>&nbsp;&nbsp;
95
+ <a href="#M000086">links</a>&nbsp;&nbsp;
96
+ <a href="#M000084">new</a>&nbsp;&nbsp;
97
+ <a href="#M000085">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-M000083" class="method-detail">
161
- <a name="M000083"></a>
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/M000083.html" target="Code" class="method-signature"
165
- onclick="popupCode('Browser.src/M000083.html');return false;">
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-M000085" class="method-detail">
181
- <a name="M000085"></a>
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/M000085.html" target="Code" class="method-signature"
185
- onclick="popupCode('Browser.src/M000085.html');return false;">
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&#8217;ll only return those links.
196
196
  </div>
197
197
  </div>
198
198
 
199
- <div id="method-M000084" class="method-detail">
200
- <a name="M000084"></a>
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/M000084.html" target="Code" class="method-signature"
204
- onclick="popupCode('Browser.src/M000084.html');return false;">
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>start (RFuzz::Browser)</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 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">&quot;200&quot;</span>
17
- 33: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Invalid status: #{@response.http_status}&quot;</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>
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">&quot;User-Agent&quot;</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>links (RFuzz::Browser)</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 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">&quot;href&quot;</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>
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">&quot;200&quot;</span>
17
+ 33: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Invalid status: #{@response.http_status}&quot;</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">&quot;href&quot;</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&#8217;s a few examples:
105
105
  client.reset
106
106
  </pre>
107
107
  <p>
108
- The <a href="HttpClient.html#M000029">HttpClient.reset</a> call clears
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#M000027">method_missing</a> to do the
112
+ It uses <a href="HttpClient.html#M000028">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,18 +145,18 @@ information.
145
145
  <h3 class="section-bar">Methods</h3>
146
146
 
147
147
  <div class="name-list">
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;
148
+ <a href="#M000021">build_request</a>&nbsp;&nbsp;
149
+ <a href="#M000028">method_missing</a>&nbsp;&nbsp;
150
+ <a href="#M000020">new</a>&nbsp;&nbsp;
151
+ <a href="#M000031">notify</a>&nbsp;&nbsp;
152
+ <a href="#M000024">read_chunked_body</a>&nbsp;&nbsp;
153
+ <a href="#M000023">read_chunked_header</a>&nbsp;&nbsp;
154
+ <a href="#M000022">read_parsed_header</a>&nbsp;&nbsp;
155
+ <a href="#M000026">read_response</a>&nbsp;&nbsp;
156
+ <a href="#M000029">redirect</a>&nbsp;&nbsp;
157
+ <a href="#M000030">reset</a>&nbsp;&nbsp;
158
+ <a href="#M000027">send_request</a>&nbsp;&nbsp;
159
+ <a href="#M000025">store_cookies</a>&nbsp;&nbsp;
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">&nbsp;[RW]&nbsp;</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-M000019" class="method-detail">
303
- <a name="M000019"></a>
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/M000019.html" target="Code" class="method-signature"
307
- onclick="popupCode('HttpClient.src/M000019.html');return false;">
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&#8216;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-M000020" class="method-detail">
322
- <a name="M000020"></a>
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/M000020.html" target="Code" class="method-signature"
326
- onclick="popupCode('HttpClient.src/M000020.html');return false;">
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-M000027" class="method-detail">
344
- <a name="M000027"></a>
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/M000027.html" target="Code" class="method-signature"
348
- onclick="popupCode('HttpClient.src/M000027.html');return false;">
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 =&gt; [:put, :get, &#8230;]
360
368
  </div>
361
369
  </div>
362
370
 
363
- <div id="method-M000030" class="method-detail">
364
- <a name="M000030"></a>
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/M000030.html" target="Code" class="method-signature"
368
- onclick="popupCode('HttpClient.src/M000030.html');return false;">
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-M000023" class="method-detail">
386
- <a name="M000023"></a>
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/M000023.html" target="Code" class="method-signature"
390
- onclick="popupCode('HttpClient.src/M000023.html');return false;">
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-M000022" class="method-detail">
405
- <a name="M000022"></a>
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/M000022.html" target="Code" class="method-signature"
409
- onclick="popupCode('HttpClient.src/M000022.html');return false;">
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-M000021" class="method-detail">
422
- <a name="M000021"></a>
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/M000021.html" target="Code" class="method-signature"
426
- onclick="popupCode('HttpClient.src/M000021.html');return false;">
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-M000025" class="method-detail">
441
- <a name="M000025"></a>
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/M000025.html" target="Code" class="method-signature"
445
- onclick="popupCode('HttpClient.src/M000025.html');return false;">
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-M000028" class="method-detail">
465
- <a name="M000028"></a>
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/M000028.html" target="Code" class="method-signature"
469
- onclick="popupCode('HttpClient.src/M000028.html');return false;">
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&#8217;t receive a 3XX request.
478
486
  </div>
479
487
  </div>
480
488
 
481
- <div id="method-M000029" class="method-detail">
482
- <a name="M000029"></a>
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/M000029.html" target="Code" class="method-signature"
486
- onclick="popupCode('HttpClient.src/M000029.html');return false;">
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-M000026" class="method-detail">
499
- <a name="M000026"></a>
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/M000026.html" target="Code" class="method-signature"
503
- onclick="popupCode('HttpClient.src/M000026.html');return false;">
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#M000020">build_request</a>, <a
512
- href="HttpClient.html#M000025">read_response</a> calls finally returning
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-M000024" class="method-detail">
519
- <a name="M000024"></a>
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/M000024.html" target="Code" class="method-signature"
523
- onclick="popupCode('HttpClient.src/M000024.html');return false;">
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>build_request (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 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>
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>