rfuzz 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/README +18 -17
  2. data/Rakefile +8 -3
  3. data/doc/rdoc/classes/RFuzz/Browser.html +229 -0
  4. data/doc/rdoc/classes/RFuzz/Browser.src/M000068.html +25 -0
  5. data/doc/rdoc/classes/RFuzz/Browser.src/M000069.html +23 -0
  6. data/doc/rdoc/classes/RFuzz/Browser.src/M000070.html +24 -0
  7. data/doc/rdoc/classes/RFuzz/HttpClient.html +10 -0
  8. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000010.html +10 -10
  9. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000011.html +18 -18
  10. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000012.html +36 -35
  11. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000013.html +35 -35
  12. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000014.html +43 -43
  13. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000015.html +22 -22
  14. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000016.html +12 -12
  15. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000017.html +18 -18
  16. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000018.html +4 -4
  17. data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +12 -12
  18. data/doc/rdoc/classes/RFuzz/HttpEncoding.html +13 -0
  19. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000001.html +12 -12
  20. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000002.html +4 -4
  21. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000003.html +12 -12
  22. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000004.html +4 -4
  23. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000005.html +18 -18
  24. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000006.html +4 -4
  25. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000007.html +6 -6
  26. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000008.html +6 -6
  27. data/doc/rdoc/classes/RFuzz/HttpEncoding.src/M000009.html +18 -18
  28. data/doc/rdoc/classes/RFuzz/Notifier.src/M000044.html +3 -3
  29. data/doc/rdoc/classes/RFuzz/Notifier.src/M000045.html +3 -3
  30. data/doc/rdoc/classes/RFuzz/Notifier.src/M000046.html +3 -3
  31. data/doc/rdoc/classes/RFuzz/Notifier.src/M000047.html +3 -3
  32. data/doc/rdoc/classes/RFuzz/Notifier.src/M000048.html +3 -3
  33. data/doc/rdoc/classes/RFuzz/Notifier.src/M000049.html +3 -3
  34. data/doc/rdoc/classes/RFuzz/Session.html +11 -1
  35. data/doc/rdoc/classes/RFuzz/Session.src/M000020.html +16 -16
  36. data/doc/rdoc/classes/RFuzz/Session.src/M000021.html +4 -4
  37. data/doc/rdoc/classes/RFuzz/Session.src/M000022.html +4 -4
  38. data/doc/rdoc/classes/RFuzz/Session.src/M000023.html +20 -20
  39. data/doc/rdoc/classes/RFuzz/Session.src/M000024.html +5 -5
  40. data/doc/rdoc/classes/RFuzz/Session.src/M000025.html +5 -5
  41. data/doc/rdoc/classes/RFuzz/Session.src/M000026.html +12 -12
  42. data/doc/rdoc/classes/RFuzz/Session.src/M000027.html +15 -15
  43. data/doc/rdoc/classes/RFuzz/Session.src/M000028.html +5 -5
  44. data/doc/rdoc/classes/RFuzz/Session.src/M000029.html +4 -4
  45. data/doc/rdoc/classes/RFuzz/Session.src/M000030.html +4 -4
  46. data/doc/rdoc/classes/RFuzz/Session.src/M000031.html +9 -9
  47. data/doc/rdoc/classes/RFuzz.html +5 -0
  48. data/doc/rdoc/created.rid +1 -1
  49. data/doc/rdoc/files/COPYING.html +1 -1
  50. data/doc/rdoc/files/LICENSE.html +1 -1
  51. data/doc/rdoc/files/README.html +23 -24
  52. data/doc/rdoc/files/lib/rfuzz/browser_rb.html +109 -0
  53. data/doc/rdoc/files/lib/rfuzz/client_rb.html +2 -1
  54. data/doc/rdoc/files/lib/rfuzz/random_rb.html +1 -1
  55. data/doc/rdoc/files/lib/rfuzz/rfuzz_rb.html +1 -1
  56. data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
  57. data/doc/rdoc/files/lib/rfuzz/stats_rb.html +1 -1
  58. data/doc/rdoc/fr_class_index.html +1 -0
  59. data/doc/rdoc/fr_file_index.html +1 -0
  60. data/doc/rdoc/fr_method_index.html +9 -6
  61. data/examples/cl_watcher.rb +36 -0
  62. data/examples/mongrel_test_suite/test/http/access_authentication.rb +8 -0
  63. data/examples/mongrel_test_suite/test/http/appendix.rb +76 -0
  64. data/examples/mongrel_test_suite/test/http/base_protocol.rb +4 -7
  65. data/examples/mongrel_test_suite/test/http/caching_in_http.rb +140 -0
  66. data/examples/mongrel_test_suite/test/http/connections.rb +48 -0
  67. data/examples/mongrel_test_suite/test/http/content_negotiation.rb +20 -0
  68. data/examples/mongrel_test_suite/test/http/entity.rb +24 -0
  69. data/examples/mongrel_test_suite/test/http/header_field_definitions.rb +231 -0
  70. data/examples/mongrel_test_suite/test/http/http_message.rb +122 -0
  71. data/examples/mongrel_test_suite/test/http/method_definitions.rb +52 -0
  72. data/examples/mongrel_test_suite/test/http/protocol_parameters.rb +286 -0
  73. data/examples/mongrel_test_suite/test/http/request.rb +28 -0
  74. data/examples/mongrel_test_suite/test/http/response.rb +20 -0
  75. data/examples/mongrel_test_suite/test/http/security_considerations.rb +54 -0
  76. data/examples/mongrel_test_suite/test/http/status_code_definitions.rb +192 -0
  77. data/ext/fuzzrnd/fuzzrnd.c +1 -2
  78. data/lib/rfuzz/browser.rb +53 -0
  79. data/lib/rfuzz/client.rb +11 -6
  80. data/lib/rfuzz/session.rb +3 -1
  81. data/tools/rakehelp.rb +4 -2
  82. metadata +24 -15
  83. data/test/coverage/index.html +0 -388
  84. data/test/coverage/lib-rfuzz-client_rb.html +0 -1127
  85. data/test/coverage/lib-rfuzz-random_rb.html +0 -739
  86. data/test/coverage/lib-rfuzz-session_rb.html +0 -783
  87. data/test/coverage/lib-rfuzz-stats_rb.html +0 -788
  88. data/test/server.rb +0 -101
  89. data/test/test_client.rb +0 -164
  90. data/test/test_fuzzrnd.rb +0 -31
  91. data/test/test_httpparser.rb +0 -48
  92. data/test/test_random.rb +0 -75
  93. data/test/test_session.rb +0 -33
  94. data/test/test_stats.rb +0 -45
@@ -10,40 +10,40 @@
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 281</span>
14
- 281: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_chunked_encoding</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">sock</span>, <span class="ruby-identifier">parser</span>)
15
- 282: <span class="ruby-identifier">out</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
16
- 283: <span class="ruby-identifier">input</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>)
17
- 284:
18
- 285: <span class="ruby-comment cmt"># read from the http body first, then continue at the socket</span>
19
- 286: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">result</span> = <span class="ruby-identifier">read_chunks</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">out</span>, <span class="ruby-identifier">parser</span>)
20
- 287:
21
- 288: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">status</span>
22
- 289: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_trailer</span>
23
- 290: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">nil?</span>
24
- 291: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
25
- 292: <span class="ruby-keyword kw">else</span>
26
- 293: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">result</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">2</span>)
27
- 294: <span class="ruby-keyword kw">end</span>
28
- 295: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_body</span>
29
- 296: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">result</span>)) <span class="ruby-comment cmt"># read the remaining</span>
30
- 297: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
31
- 298: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_header</span>
32
- 299: <span class="ruby-comment cmt"># push what we read back onto the socket, but backwards</span>
33
- 300: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reverse!</span>
34
- 301: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">each_byte</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">ungetc</span>(<span class="ruby-identifier">b</span>) }
35
- 302: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:finished</span>
36
- 303: <span class="ruby-comment cmt"># all done, get out</span>
37
- 304: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>
38
- 305: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:eof_error</span>
39
- 306: <span class="ruby-comment cmt"># read everything we could, ignore</span>
40
- 307: <span class="ruby-keyword kw">end</span>
41
- 308:
42
- 309: <span class="ruby-comment cmt"># then continue reading them from the socket</span>
43
- 310: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">result</span> = <span class="ruby-identifier">read_chunks</span>(<span class="ruby-identifier">sock</span>, <span class="ruby-identifier">out</span>, <span class="ruby-identifier">parser</span>)
44
- 311:
45
- 312: <span class="ruby-comment cmt"># and now the http_body is the chunk</span>
46
- 313: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>
47
- 314: <span class="ruby-keyword kw">end</span></pre>
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_encoding</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">sock</span>, <span class="ruby-identifier">parser</span>)
15
+ 287: <span class="ruby-identifier">out</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
16
+ 288: <span class="ruby-identifier">input</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>)
17
+ 289:
18
+ 290: <span class="ruby-comment cmt"># read from the http body first, then continue at the socket</span>
19
+ 291: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">result</span> = <span class="ruby-identifier">read_chunks</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">out</span>, <span class="ruby-identifier">parser</span>)
20
+ 292:
21
+ 293: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">status</span>
22
+ 294: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_trailer</span>
23
+ 295: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">nil?</span>
24
+ 296: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
25
+ 297: <span class="ruby-keyword kw">else</span>
26
+ 298: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>((<span class="ruby-identifier">result</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">2</span>).<span class="ruby-identifier">abs</span>)
27
+ 299: <span class="ruby-keyword kw">end</span>
28
+ 300: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_body</span>
29
+ 301: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">result</span>)) <span class="ruby-comment cmt"># read the remaining</span>
30
+ 302: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
31
+ 303: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:incomplete_header</span>
32
+ 304: <span class="ruby-comment cmt"># push what we read back onto the socket, but backwards</span>
33
+ 305: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">reverse!</span>
34
+ 306: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">each_byte</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">ungetc</span>(<span class="ruby-identifier">b</span>) }
35
+ 307: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:finished</span>
36
+ 308: <span class="ruby-comment cmt"># all done, get out</span>
37
+ 309: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>
38
+ 310: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:eof_error</span>
39
+ 311: <span class="ruby-comment cmt"># read everything we could, ignore</span>
40
+ 312: <span class="ruby-keyword kw">end</span>
41
+ 313:
42
+ 314: <span class="ruby-comment cmt"># then continue reading them from the socket</span>
43
+ 315: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">result</span> = <span class="ruby-identifier">read_chunks</span>(<span class="ruby-identifier">sock</span>, <span class="ruby-identifier">out</span>, <span class="ruby-identifier">parser</span>)
44
+ 316:
45
+ 317: <span class="ruby-comment cmt"># and now the http_body is the chunk</span>
46
+ 318: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>
47
+ 319: <span class="ruby-keyword kw">end</span></pre>
48
48
  </body>
49
49
  </html>
@@ -10,48 +10,48 @@
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 323</span>
14
- 323: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_response</span>(<span class="ruby-identifier">sock</span>)
15
- 324: <span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>
16
- 325: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">HttpClientParser</span>.<span class="ruby-identifier">new</span>
17
- 326: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">HttpResponse</span>.<span class="ruby-identifier">new</span>
18
- 327:
19
- 328: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:read_header</span> <span class="ruby-keyword kw">do</span>
20
- 329: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">1024</span>)
21
- 330: <span class="ruby-identifier">nread</span> = <span class="ruby-identifier">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>)
22
- 331:
23
- 332: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">finished?</span>
24
- 333: <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">1024</span>)
25
- 334: <span class="ruby-identifier">nread</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">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>)
26
- 335: <span class="ruby-keyword kw">end</span>
27
- 336: <span class="ruby-keyword kw">end</span>
28
- 337:
29
- 338: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:read_body</span> <span class="ruby-keyword kw">do</span>
30
- 339: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">TRANSFER_ENCODING</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">TRANSFER_ENCODING</span>].<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;chunked&quot;</span>)
31
- 340: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-identifier">read_chunked_encoding</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">sock</span>, <span class="ruby-identifier">parser</span>)
32
- 341: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
33
- 342: <span class="ruby-identifier">cl</span> = <span class="ruby-identifier">resp</span>[<span class="ruby-constant">CONTENT_LENGTH</span>].<span class="ruby-identifier">to_i</span>
34
- 343: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cl</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
35
- 344: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">cl</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span>)
36
- 345: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cl</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span>
37
- 346: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Web site sucks, they said Content-Length: #{cl}, but sent a longer body length: #{resp.http_body.length}&quot;</span>
38
- 347: <span class="ruby-keyword kw">end</span>
39
- 348: <span class="ruby-keyword kw">else</span>
40
- 349: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>
41
- 350: <span class="ruby-keyword kw">end</span>
42
- 351: <span class="ruby-keyword kw">end</span>
43
- 352:
44
- 353: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>]
45
- 354: <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>)
46
- 355: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">cookies</span>
47
- 356: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">&quot;path&quot;</span>
48
- 357: <span class="ruby-keyword kw">end</span>
49
- 358:
50
- 359: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:close</span> <span class="ruby-keyword kw">do</span>
51
- 360: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">close</span>
52
- 361: <span class="ruby-keyword kw">end</span>
53
- 362:
54
- 363: <span class="ruby-identifier">resp</span>
55
- 364: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 328</span>
14
+ 328: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_response</span>(<span class="ruby-identifier">sock</span>)
15
+ 329: <span class="ruby-identifier">data</span>, <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>
16
+ 330: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">HttpClientParser</span>.<span class="ruby-identifier">new</span>
17
+ 331: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">HttpResponse</span>.<span class="ruby-identifier">new</span>
18
+ 332:
19
+ 333: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:read_header</span> <span class="ruby-keyword kw">do</span>
20
+ 334: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">1024</span>)
21
+ 335: <span class="ruby-identifier">nread</span> = <span class="ruby-identifier">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>)
22
+ 336:
23
+ 337: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">finished?</span>
24
+ 338: <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">1024</span>)
25
+ 339: <span class="ruby-identifier">nread</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">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>)
26
+ 340: <span class="ruby-keyword kw">end</span>
27
+ 341: <span class="ruby-keyword kw">end</span>
28
+ 342:
29
+ 343: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:read_body</span> <span class="ruby-keyword kw">do</span>
30
+ 344: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">TRANSFER_ENCODING</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">TRANSFER_ENCODING</span>].<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;chunked&quot;</span>)
31
+ 345: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-identifier">read_chunked_encoding</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">sock</span>, <span class="ruby-identifier">parser</span>)
32
+ 346: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
33
+ 347: <span class="ruby-identifier">cl</span> = <span class="ruby-identifier">resp</span>[<span class="ruby-constant">CONTENT_LENGTH</span>].<span class="ruby-identifier">to_i</span>
34
+ 348: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cl</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
35
+ 349: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">cl</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span>)
36
+ 350: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cl</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>.<span class="ruby-identifier">length</span>
37
+ 351: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Web site sucks, they said Content-Length: #{cl}, but sent a longer body length: #{resp.http_body.length}&quot;</span>
38
+ 352: <span class="ruby-keyword kw">end</span>
39
+ 353: <span class="ruby-keyword kw">else</span>
40
+ 354: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">read</span>
41
+ 355: <span class="ruby-keyword kw">end</span>
42
+ 356: <span class="ruby-keyword kw">end</span>
43
+ 357:
44
+ 358: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>]
45
+ 359: <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>)
46
+ 360: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">cookies</span>
47
+ 361: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">&quot;path&quot;</span>
48
+ 362: <span class="ruby-keyword kw">end</span>
49
+ 363:
50
+ 364: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:close</span> <span class="ruby-keyword kw">do</span>
51
+ 365: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">close</span>
52
+ 366: <span class="ruby-keyword kw">end</span>
53
+ 367:
54
+ 368: <span class="ruby-identifier">resp</span>
55
+ 369: <span class="ruby-keyword kw">end</span></pre>
56
56
  </body>
57
57
  </html>
@@ -10,28 +10,28 @@
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 368</span>
14
- 368: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">req</span>)
15
- 369: <span class="ruby-keyword kw">begin</span>
16
- 370: <span class="ruby-identifier">sock</span> = <span class="ruby-keyword kw">nil</span>
17
- 371: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:connect</span> <span class="ruby-keyword kw">do</span>
18
- 372: <span class="ruby-identifier">sock</span> = <span class="ruby-constant">TCPSocket</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@port</span>)
19
- 373: <span class="ruby-keyword kw">end</span>
20
- 374:
21
- 375: <span class="ruby-identifier">out</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
22
- 376: <span class="ruby-identifier">body</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>)
23
- 377:
24
- 378: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:send_request</span> <span class="ruby-keyword kw">do</span>
25
- 379: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">out</span>.<span class="ruby-identifier">string</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">body</span>)
26
- 380: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">flush</span>
27
- 381: <span class="ruby-keyword kw">end</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 373</span>
14
+ 373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">req</span>)
15
+ 374: <span class="ruby-keyword kw">begin</span>
16
+ 375: <span class="ruby-identifier">sock</span> = <span class="ruby-keyword kw">nil</span>
17
+ 376: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:connect</span> <span class="ruby-keyword kw">do</span>
18
+ 377: <span class="ruby-identifier">sock</span> = <span class="ruby-constant">TCPSocket</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@port</span>)
19
+ 378: <span class="ruby-keyword kw">end</span>
20
+ 379:
21
+ 380: <span class="ruby-identifier">out</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
22
+ 381: <span class="ruby-identifier">body</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>)
28
23
  382:
29
- 383: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">read_response</span>(<span class="ruby-identifier">sock</span>)
30
- 384: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span>
31
- 385: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">$!</span>
32
- 386: <span class="ruby-keyword kw">ensure</span>
33
- 387: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">unless</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">sock</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">closed?</span>)
34
- 388: <span class="ruby-keyword kw">end</span>
35
- 389: <span class="ruby-keyword kw">end</span></pre>
24
+ 383: <span class="ruby-identifier">notify</span> <span class="ruby-identifier">:send_request</span> <span class="ruby-keyword kw">do</span>
25
+ 384: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">out</span>.<span class="ruby-identifier">string</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">body</span>)
26
+ 385: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">flush</span>
27
+ 386: <span class="ruby-keyword kw">end</span>
28
+ 387:
29
+ 388: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">read_response</span>(<span class="ruby-identifier">sock</span>)
30
+ 389: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span>
31
+ 390: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">$!</span>
32
+ 391: <span class="ruby-keyword kw">ensure</span>
33
+ 392: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">unless</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">sock</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">closed?</span>)
34
+ 393: <span class="ruby-keyword kw">end</span>
35
+ 394: <span class="ruby-keyword kw">end</span></pre>
36
36
  </body>
37
37
  </html>
@@ -10,17 +10,17 @@
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 396</span>
14
- 396: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- 397: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@allowed_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">symbol</span>
16
- 398: <span class="ruby-identifier">method</span> = <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>
17
- 399: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">||</span> {})
18
- 400: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">resp</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@redirect</span>
19
- 401:
20
- 402: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
21
- 403: <span class="ruby-keyword kw">else</span>
22
- 404: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Invalid method: #{symbol}&quot;</span>
23
- 405: <span class="ruby-keyword kw">end</span>
24
- 406: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 401</span>
14
+ 401: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
+ 402: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@allowed_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">symbol</span>
16
+ 403: <span class="ruby-identifier">method</span> = <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>
17
+ 404: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">args</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">||</span> {})
18
+ 405: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">resp</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@redirect</span>
19
+ 406:
20
+ 407: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
21
+ 408: <span class="ruby-keyword kw">else</span>
22
+ 409: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Invalid method: #{symbol}&quot;</span>
23
+ 410: <span class="ruby-keyword kw">end</span>
24
+ 411: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </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 409</span>
14
- 409: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- 410: <span class="ruby-ivar">@redirect</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
16
- 411: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_status</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;3&quot;</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
17
- 412:
18
- 413: <span class="ruby-identifier">host</span> = <span class="ruby-identifier">encode_host</span>(<span class="ruby-ivar">@host</span>,<span class="ruby-ivar">@port</span>)
19
- 414: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">resp</span>[<span class="ruby-constant">LOCATION</span>]
20
- 415:
21
- 416: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">location</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">host</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
22
- 417: <span class="ruby-comment cmt"># begins with the host so strip that off</span>
23
- 418: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">location</span>[<span class="ruby-identifier">host</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">..</span> <span class="ruby-value">-1</span>]
24
- 419: <span class="ruby-keyword kw">end</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 414</span>
14
+ 414: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
+ 415: <span class="ruby-ivar">@redirect</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
16
+ 416: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_status</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;3&quot;</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
17
+ 417:
18
+ 418: <span class="ruby-identifier">host</span> = <span class="ruby-identifier">encode_host</span>(<span class="ruby-ivar">@host</span>,<span class="ruby-ivar">@port</span>)
19
+ 419: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">resp</span>[<span class="ruby-constant">LOCATION</span>]
25
20
  420:
26
- 421: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
27
- 422: <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">location</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
28
- 423: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
29
- 424: <span class="ruby-keyword kw">end</span>
21
+ 421: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">location</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">host</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
22
+ 422: <span class="ruby-comment cmt"># begins with the host so strip that off</span>
23
+ 423: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">location</span>[<span class="ruby-identifier">host</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">..</span> <span class="ruby-value">-1</span>]
24
+ 424: <span class="ruby-keyword kw">end</span>
30
25
  425:
31
- 426: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
32
- 427: <span class="ruby-keyword kw">end</span></pre>
26
+ 426: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
27
+ 427: <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">location</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
28
+ 428: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
29
+ 429: <span class="ruby-keyword kw">end</span>
30
+ 430:
31
+ 431: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
32
+ 432: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>
@@ -10,9 +10,9 @@
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 431</span>
14
- 431: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
15
- 432: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">clear</span>
16
- 433: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 436</span>
14
+ 436: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
15
+ 437: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">clear</span>
16
+ 438: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,17 +10,17 @@
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 442</span>
14
- 442: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notify</span>(<span class="ruby-identifier">event</span>)
15
- 443: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
16
- 444:
17
- 445: <span class="ruby-keyword kw">begin</span>
18
- 446: <span class="ruby-keyword kw">yield</span>
19
- 447: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
20
- 448: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span>
21
- 449: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:error</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
22
- 450: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">$!</span>
23
- 451: <span class="ruby-keyword kw">end</span>
24
- 452: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 447</span>
14
+ 447: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notify</span>(<span class="ruby-identifier">event</span>)
15
+ 448: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
16
+ 449:
17
+ 450: <span class="ruby-keyword kw">begin</span>
18
+ 451: <span class="ruby-keyword kw">yield</span>
19
+ 452: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
20
+ 453: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span>
21
+ 454: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">event</span>, <span class="ruby-identifier">:error</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
22
+ 455: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">$!</span>
23
+ 456: <span class="ruby-keyword kw">end</span>
24
+ 457: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </html>
@@ -108,6 +108,19 @@ but you can use it as well.
108
108
  <div id="section">
109
109
 
110
110
 
111
+ <div id="constants-list">
112
+ <h3 class="section-bar">Constants</h3>
113
+
114
+ <div class="name-list">
115
+ <table summary="Constants">
116
+ <tr class="top-aligned-row context-row">
117
+ <td class="context-item-name">COOKIE</td>
118
+ <td>=</td>
119
+ <td class="context-item-value">&quot;Cookie&quot;</td>
120
+ </tr>
121
+ </table>
122
+ </div>
123
+ </div>
111
124
 
112
125
 
113
126
 
@@ -10,17 +10,17 @@
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 45</span>
14
- 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_cookies</span>(<span class="ruby-identifier">cookies</span>)
15
- 46: <span class="ruby-identifier">result</span> = <span class="ruby-value str">&quot;&quot;</span>
16
- 47: <span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
- 48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
18
- 49: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-value str">&quot;Cookie&quot;</span>, <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>)) }
19
- 50: <span class="ruby-keyword kw">else</span>
20
- 51: <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-value str">&quot;Cookie&quot;</span>, <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>))
21
- 52: <span class="ruby-keyword kw">end</span>
22
- 53: <span class="ruby-keyword kw">end</span>
23
- 54: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
24
- 55: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 47</span>
14
+ 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_cookies</span>(<span class="ruby-identifier">cookies</span>)
15
+ 48: <span class="ruby-identifier">result</span> = <span class="ruby-value str">&quot;&quot;</span>
16
+ 49: <span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
+ 50: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
18
+ 51: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-constant">COOKIE</span>, <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>)) }
19
+ 52: <span class="ruby-keyword kw">else</span>
20
+ 53: <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-constant">COOKIE</span>, <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>))
21
+ 54: <span class="ruby-keyword kw">end</span>
22
+ 55: <span class="ruby-keyword kw">end</span>
23
+ 56: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
24
+ 57: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </html>
@@ -10,9 +10,9 @@
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 58</span>
14
- 58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
15
- 59: <span class="ruby-node">&quot;#{k}: #{v}\r\n&quot;</span>
16
- 60: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 60</span>
14
+ 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
15
+ 61: <span class="ruby-node">&quot;#{k}: #{v}\r\n&quot;</span>
16
+ 62: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,17 +10,17 @@
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 64</span>
14
- 64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_headers</span>(<span class="ruby-identifier">head</span>)
15
- 65: <span class="ruby-identifier">result</span> = <span class="ruby-value str">&quot;&quot;</span>
16
- 66: <span class="ruby-identifier">head</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
- 67: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
18
- 68: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>) }
19
- 69: <span class="ruby-keyword kw">else</span>
20
- 70: <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
21
- 71: <span class="ruby-keyword kw">end</span>
22
- 72: <span class="ruby-keyword kw">end</span>
23
- 73: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
24
- 74: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 66</span>
14
+ 66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_headers</span>(<span class="ruby-identifier">head</span>)
15
+ 67: <span class="ruby-identifier">result</span> = <span class="ruby-value str">&quot;&quot;</span>
16
+ 68: <span class="ruby-identifier">head</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
17
+ 69: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Array</span>
18
+ 70: <span class="ruby-identifier">v</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">x</span>) }
19
+ 71: <span class="ruby-keyword kw">else</span>
20
+ 72: <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">encode_field</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
21
+ 73: <span class="ruby-keyword kw">end</span>
22
+ 74: <span class="ruby-keyword kw">end</span>
23
+ 75: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
24
+ 76: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </html>
@@ -10,9 +10,9 @@
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 77</span>
14
- 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
15
- 78: <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">k</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">v</span>)
16
- 79: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 79</span>
14
+ 79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_param</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)
15
+ 80: <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">k</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">v</span>)
16
+ 81: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>