scout 5.7.1 → 5.7.2.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. data/CHANGELOG.markdown +5 -0
  2. data/lib/scout/command/run.rb +1 -1
  3. data/lib/scout/server.rb +2 -1
  4. data/lib/scout/streamer.rb +3 -2
  5. data/lib/scout/streamer_daemon.rb +4 -4
  6. data/lib/scout/version.rb +1 -1
  7. data/test/scout_test.rb +7 -8
  8. data/vendor/httpclient/README.txt +759 -0
  9. data/vendor/httpclient/bin/httpclient +65 -0
  10. data/vendor/httpclient/lib/hexdump.rb +50 -0
  11. data/vendor/httpclient/lib/http-access2.rb +55 -0
  12. data/vendor/httpclient/lib/http-access2/cookie.rb +1 -0
  13. data/vendor/httpclient/lib/http-access2/http.rb +1 -0
  14. data/vendor/httpclient/lib/httpclient.rb +1156 -0
  15. data/vendor/httpclient/lib/httpclient/auth.rb +899 -0
  16. data/vendor/httpclient/lib/httpclient/cacert.p7s +1912 -0
  17. data/vendor/httpclient/lib/httpclient/connection.rb +88 -0
  18. data/vendor/httpclient/lib/httpclient/cookie.rb +438 -0
  19. data/vendor/httpclient/lib/httpclient/http.rb +1046 -0
  20. data/vendor/httpclient/lib/httpclient/include_client.rb +83 -0
  21. data/vendor/httpclient/lib/httpclient/session.rb +1025 -0
  22. data/vendor/httpclient/lib/httpclient/ssl_config.rb +403 -0
  23. data/vendor/httpclient/lib/httpclient/timeout.rb +140 -0
  24. data/vendor/httpclient/lib/httpclient/util.rb +178 -0
  25. data/vendor/httpclient/lib/httpclient/version.rb +3 -0
  26. data/vendor/httpclient/lib/oauthclient.rb +110 -0
  27. data/vendor/httpclient/sample/async.rb +8 -0
  28. data/vendor/httpclient/sample/auth.rb +11 -0
  29. data/vendor/httpclient/sample/cookie.rb +18 -0
  30. data/vendor/httpclient/sample/dav.rb +103 -0
  31. data/vendor/httpclient/sample/howto.rb +49 -0
  32. data/vendor/httpclient/sample/oauth_buzz.rb +57 -0
  33. data/vendor/httpclient/sample/oauth_friendfeed.rb +59 -0
  34. data/vendor/httpclient/sample/oauth_salesforce_10.rb +63 -0
  35. data/vendor/httpclient/sample/oauth_twitter.rb +61 -0
  36. data/vendor/httpclient/sample/ssl/0cert.pem +22 -0
  37. data/vendor/httpclient/sample/ssl/0key.pem +30 -0
  38. data/vendor/httpclient/sample/ssl/1000cert.pem +19 -0
  39. data/vendor/httpclient/sample/ssl/1000key.pem +18 -0
  40. data/vendor/httpclient/sample/ssl/htdocs/index.html +10 -0
  41. data/vendor/httpclient/sample/ssl/ssl_client.rb +22 -0
  42. data/vendor/httpclient/sample/ssl/webrick_httpsd.rb +29 -0
  43. data/vendor/httpclient/sample/stream.rb +21 -0
  44. data/vendor/httpclient/sample/thread.rb +27 -0
  45. data/vendor/httpclient/sample/wcat.rb +21 -0
  46. data/vendor/httpclient/test/ca-chain.cert +44 -0
  47. data/vendor/httpclient/test/ca.cert +23 -0
  48. data/vendor/httpclient/test/client.cert +19 -0
  49. data/vendor/httpclient/test/client.key +15 -0
  50. data/vendor/httpclient/test/helper.rb +129 -0
  51. data/vendor/httpclient/test/htdigest +1 -0
  52. data/vendor/httpclient/test/htpasswd +2 -0
  53. data/vendor/httpclient/test/runner.rb +2 -0
  54. data/vendor/httpclient/test/server.cert +19 -0
  55. data/vendor/httpclient/test/server.key +15 -0
  56. data/vendor/httpclient/test/sslsvr.rb +65 -0
  57. data/vendor/httpclient/test/subca.cert +21 -0
  58. data/vendor/httpclient/test/test_auth.rb +321 -0
  59. data/vendor/httpclient/test/test_cookie.rb +391 -0
  60. data/vendor/httpclient/test/test_hexdump.rb +14 -0
  61. data/vendor/httpclient/test/test_http-access2.rb +507 -0
  62. data/vendor/httpclient/test/test_httpclient.rb +1783 -0
  63. data/vendor/httpclient/test/test_include_client.rb +52 -0
  64. data/vendor/httpclient/test/test_ssl.rb +235 -0
  65. data/vendor/multi_json/.document +5 -0
  66. data/vendor/multi_json/.rspec +3 -0
  67. data/vendor/multi_json/.travis.yml +11 -0
  68. data/vendor/multi_json/.yardopts +6 -0
  69. data/vendor/multi_json/CHANGELOG.md +169 -0
  70. data/vendor/multi_json/CONTRIBUTING.md +46 -0
  71. data/vendor/multi_json/Gemfile +31 -0
  72. data/vendor/multi_json/LICENSE.md +20 -0
  73. data/vendor/multi_json/README.md +109 -0
  74. data/vendor/multi_json/Rakefile +12 -0
  75. data/vendor/multi_json/lib/multi_json.rb +157 -0
  76. data/vendor/multi_json/lib/multi_json/adapter.rb +48 -0
  77. data/vendor/multi_json/lib/multi_json/adapters/gson.rb +19 -0
  78. data/vendor/multi_json/lib/multi_json/adapters/jr_jackson.rb +19 -0
  79. data/vendor/multi_json/lib/multi_json/adapters/json_common.rb +25 -0
  80. data/vendor/multi_json/lib/multi_json/adapters/json_gem.rb +11 -0
  81. data/vendor/multi_json/lib/multi_json/adapters/json_pure.rb +11 -0
  82. data/vendor/multi_json/lib/multi_json/adapters/nsjsonserialization.rb +34 -0
  83. data/vendor/multi_json/lib/multi_json/adapters/oj.rb +24 -0
  84. data/vendor/multi_json/lib/multi_json/adapters/ok_json.rb +22 -0
  85. data/vendor/multi_json/lib/multi_json/adapters/yajl.rb +19 -0
  86. data/vendor/multi_json/lib/multi_json/convertible_hash_keys.rb +43 -0
  87. data/vendor/multi_json/lib/multi_json/load_error.rb +11 -0
  88. data/vendor/multi_json/lib/multi_json/options.rb +48 -0
  89. data/vendor/multi_json/lib/multi_json/vendor/okjson.rb +606 -0
  90. data/vendor/multi_json/lib/multi_json/version.rb +20 -0
  91. data/vendor/multi_json/multi_json.gemspec +22 -0
  92. data/vendor/multi_json/spec/adapter_shared_example.rb +235 -0
  93. data/vendor/multi_json/spec/has_options.rb +119 -0
  94. data/vendor/multi_json/spec/helper.rb +35 -0
  95. data/vendor/multi_json/spec/json_common_shared_example.rb +30 -0
  96. data/vendor/multi_json/spec/multi_json_spec.rb +226 -0
  97. data/vendor/{signature → pusher}/.document +0 -0
  98. data/vendor/{json_pure/diagrams/.keep → pusher/.gemtest} +0 -0
  99. data/vendor/pusher/.gitignore +23 -0
  100. data/vendor/pusher/.travis.yml +15 -0
  101. data/vendor/pusher/Gemfile +2 -0
  102. data/vendor/{pusher-gem → pusher}/LICENSE +1 -1
  103. data/vendor/pusher/README.md +186 -0
  104. data/vendor/{pusher-gem → pusher}/Rakefile +0 -0
  105. data/vendor/{pusher-gem → pusher}/examples/async_message.rb +0 -0
  106. data/vendor/pusher/lib/pusher.rb +60 -0
  107. data/vendor/{pusher-gem → pusher}/lib/pusher/channel.rb +47 -54
  108. data/vendor/pusher/lib/pusher/client.rb +306 -0
  109. data/vendor/pusher/lib/pusher/request.rb +107 -0
  110. data/vendor/pusher/lib/pusher/resource.rb +36 -0
  111. data/vendor/pusher/lib/pusher/webhook.rb +110 -0
  112. data/vendor/{pusher-gem → pusher}/pusher.gemspec +6 -5
  113. data/vendor/pusher/spec/channel_spec.rb +127 -0
  114. data/vendor/pusher/spec/client_spec.rb +464 -0
  115. data/vendor/{pusher-gem → pusher}/spec/spec_helper.rb +12 -0
  116. data/vendor/pusher/spec/web_hook_spec.rb +117 -0
  117. data/vendor/signature/.travis.yml +15 -0
  118. data/vendor/signature/Gemfile +1 -1
  119. data/vendor/signature/README.md +38 -28
  120. data/vendor/signature/lib/signature.rb +97 -15
  121. data/vendor/signature/lib/signature/query_encoder.rb +47 -0
  122. data/vendor/signature/lib/signature/version.rb +1 -1
  123. data/vendor/signature/signature.gemspec +3 -2
  124. data/vendor/signature/spec/signature_spec.rb +164 -55
  125. data/vendor/signature/spec/spec_helper.rb +2 -3
  126. metadata +120 -145
  127. data/vendor/json_pure/.gitignore +0 -12
  128. data/vendor/json_pure/.travis.yml +0 -20
  129. data/vendor/json_pure/CHANGES +0 -282
  130. data/vendor/json_pure/COPYING +0 -58
  131. data/vendor/json_pure/COPYING-json-jruby +0 -57
  132. data/vendor/json_pure/GPL +0 -340
  133. data/vendor/json_pure/Gemfile +0 -11
  134. data/vendor/json_pure/README-json-jruby.markdown +0 -33
  135. data/vendor/json_pure/README.rdoc +0 -358
  136. data/vendor/json_pure/Rakefile +0 -412
  137. data/vendor/json_pure/TODO +0 -1
  138. data/vendor/json_pure/VERSION +0 -1
  139. data/vendor/json_pure/data/example.json +0 -1
  140. data/vendor/json_pure/data/index.html +0 -38
  141. data/vendor/json_pure/data/prototype.js +0 -4184
  142. data/vendor/json_pure/ext/json/ext/fbuffer/fbuffer.h +0 -181
  143. data/vendor/json_pure/ext/json/ext/generator/depend +0 -1
  144. data/vendor/json_pure/ext/json/ext/generator/extconf.rb +0 -14
  145. data/vendor/json_pure/ext/json/ext/generator/generator.c +0 -1435
  146. data/vendor/json_pure/ext/json/ext/generator/generator.h +0 -148
  147. data/vendor/json_pure/ext/json/ext/parser/depend +0 -1
  148. data/vendor/json_pure/ext/json/ext/parser/extconf.rb +0 -13
  149. data/vendor/json_pure/ext/json/ext/parser/parser.c +0 -2204
  150. data/vendor/json_pure/ext/json/ext/parser/parser.h +0 -77
  151. data/vendor/json_pure/ext/json/ext/parser/parser.rl +0 -927
  152. data/vendor/json_pure/install.rb +0 -23
  153. data/vendor/json_pure/java/src/json/ext/ByteListTranscoder.java +0 -167
  154. data/vendor/json_pure/java/src/json/ext/Generator.java +0 -444
  155. data/vendor/json_pure/java/src/json/ext/GeneratorMethods.java +0 -232
  156. data/vendor/json_pure/java/src/json/ext/GeneratorService.java +0 -43
  157. data/vendor/json_pure/java/src/json/ext/GeneratorState.java +0 -543
  158. data/vendor/json_pure/java/src/json/ext/OptionsReader.java +0 -114
  159. data/vendor/json_pure/java/src/json/ext/Parser.java +0 -2644
  160. data/vendor/json_pure/java/src/json/ext/Parser.rl +0 -968
  161. data/vendor/json_pure/java/src/json/ext/ParserService.java +0 -35
  162. data/vendor/json_pure/java/src/json/ext/RuntimeInfo.java +0 -121
  163. data/vendor/json_pure/java/src/json/ext/StringDecoder.java +0 -167
  164. data/vendor/json_pure/java/src/json/ext/StringEncoder.java +0 -106
  165. data/vendor/json_pure/java/src/json/ext/Utils.java +0 -89
  166. data/vendor/json_pure/json-java.gemspec +0 -23
  167. data/vendor/json_pure/json.gemspec +0 -37
  168. data/vendor/json_pure/json_pure.gemspec +0 -39
  169. data/vendor/json_pure/lib/json.rb +0 -62
  170. data/vendor/json_pure/lib/json/add/bigdecimal.rb +0 -28
  171. data/vendor/json_pure/lib/json/add/complex.rb +0 -22
  172. data/vendor/json_pure/lib/json/add/core.rb +0 -11
  173. data/vendor/json_pure/lib/json/add/date.rb +0 -34
  174. data/vendor/json_pure/lib/json/add/date_time.rb +0 -50
  175. data/vendor/json_pure/lib/json/add/exception.rb +0 -31
  176. data/vendor/json_pure/lib/json/add/ostruct.rb +0 -31
  177. data/vendor/json_pure/lib/json/add/range.rb +0 -29
  178. data/vendor/json_pure/lib/json/add/rational.rb +0 -22
  179. data/vendor/json_pure/lib/json/add/regexp.rb +0 -30
  180. data/vendor/json_pure/lib/json/add/struct.rb +0 -30
  181. data/vendor/json_pure/lib/json/add/symbol.rb +0 -25
  182. data/vendor/json_pure/lib/json/add/time.rb +0 -38
  183. data/vendor/json_pure/lib/json/common.rb +0 -487
  184. data/vendor/json_pure/lib/json/ext.rb +0 -21
  185. data/vendor/json_pure/lib/json/ext/.keep +0 -0
  186. data/vendor/json_pure/lib/json/generic_object.rb +0 -70
  187. data/vendor/json_pure/lib/json/pure.rb +0 -21
  188. data/vendor/json_pure/lib/json/pure/generator.rb +0 -522
  189. data/vendor/json_pure/lib/json/pure/parser.rb +0 -359
  190. data/vendor/json_pure/lib/json/version.rb +0 -8
  191. data/vendor/json_pure/tests/fixtures/fail1.json +0 -1
  192. data/vendor/json_pure/tests/fixtures/fail10.json +0 -1
  193. data/vendor/json_pure/tests/fixtures/fail11.json +0 -1
  194. data/vendor/json_pure/tests/fixtures/fail12.json +0 -1
  195. data/vendor/json_pure/tests/fixtures/fail13.json +0 -1
  196. data/vendor/json_pure/tests/fixtures/fail14.json +0 -1
  197. data/vendor/json_pure/tests/fixtures/fail18.json +0 -1
  198. data/vendor/json_pure/tests/fixtures/fail19.json +0 -1
  199. data/vendor/json_pure/tests/fixtures/fail2.json +0 -1
  200. data/vendor/json_pure/tests/fixtures/fail20.json +0 -1
  201. data/vendor/json_pure/tests/fixtures/fail21.json +0 -1
  202. data/vendor/json_pure/tests/fixtures/fail22.json +0 -1
  203. data/vendor/json_pure/tests/fixtures/fail23.json +0 -1
  204. data/vendor/json_pure/tests/fixtures/fail24.json +0 -1
  205. data/vendor/json_pure/tests/fixtures/fail25.json +0 -1
  206. data/vendor/json_pure/tests/fixtures/fail27.json +0 -2
  207. data/vendor/json_pure/tests/fixtures/fail28.json +0 -2
  208. data/vendor/json_pure/tests/fixtures/fail3.json +0 -1
  209. data/vendor/json_pure/tests/fixtures/fail4.json +0 -1
  210. data/vendor/json_pure/tests/fixtures/fail5.json +0 -1
  211. data/vendor/json_pure/tests/fixtures/fail6.json +0 -1
  212. data/vendor/json_pure/tests/fixtures/fail7.json +0 -1
  213. data/vendor/json_pure/tests/fixtures/fail8.json +0 -1
  214. data/vendor/json_pure/tests/fixtures/fail9.json +0 -1
  215. data/vendor/json_pure/tests/fixtures/pass1.json +0 -56
  216. data/vendor/json_pure/tests/fixtures/pass15.json +0 -1
  217. data/vendor/json_pure/tests/fixtures/pass16.json +0 -1
  218. data/vendor/json_pure/tests/fixtures/pass17.json +0 -1
  219. data/vendor/json_pure/tests/fixtures/pass2.json +0 -1
  220. data/vendor/json_pure/tests/fixtures/pass26.json +0 -1
  221. data/vendor/json_pure/tests/fixtures/pass3.json +0 -6
  222. data/vendor/json_pure/tests/setup_variant.rb +0 -11
  223. data/vendor/json_pure/tests/test_json.rb +0 -545
  224. data/vendor/json_pure/tests/test_json_addition.rb +0 -196
  225. data/vendor/json_pure/tests/test_json_encoding.rb +0 -65
  226. data/vendor/json_pure/tests/test_json_fixtures.rb +0 -35
  227. data/vendor/json_pure/tests/test_json_generate.rb +0 -322
  228. data/vendor/json_pure/tests/test_json_generic_object.rb +0 -75
  229. data/vendor/json_pure/tests/test_json_string_matching.rb +0 -39
  230. data/vendor/json_pure/tests/test_json_unicode.rb +0 -72
  231. data/vendor/json_pure/tools/fuzz.rb +0 -139
  232. data/vendor/json_pure/tools/server.rb +0 -62
  233. data/vendor/pusher-gem/Gemfile +0 -2
  234. data/vendor/pusher-gem/README.md +0 -80
  235. data/vendor/pusher-gem/lib/pusher.rb +0 -107
  236. data/vendor/pusher-gem/lib/pusher/request.rb +0 -107
  237. data/vendor/pusher-gem/spec/channel_spec.rb +0 -274
  238. data/vendor/pusher-gem/spec/pusher_spec.rb +0 -87
  239. data/vendor/ruby-hmac/History.txt +0 -15
  240. data/vendor/ruby-hmac/Manifest.txt +0 -11
  241. data/vendor/ruby-hmac/README.md +0 -41
  242. data/vendor/ruby-hmac/Rakefile +0 -23
  243. data/vendor/ruby-hmac/lib/hmac-md5.rb +0 -11
  244. data/vendor/ruby-hmac/lib/hmac-rmd160.rb +0 -11
  245. data/vendor/ruby-hmac/lib/hmac-sha1.rb +0 -11
  246. data/vendor/ruby-hmac/lib/hmac-sha2.rb +0 -25
  247. data/vendor/ruby-hmac/lib/hmac.rb +0 -118
  248. data/vendor/ruby-hmac/lib/ruby_hmac.rb +0 -2
  249. data/vendor/ruby-hmac/ruby-hmac.gemspec +0 -33
  250. data/vendor/ruby-hmac/test/test_hmac.rb +0 -89
  251. data/vendor/signature/VERSION +0 -1
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ # 5.7.2
2
+
3
+ * updated pusher gem and associated vendored gems
4
+ * added support for realtime when using an http proxy
5
+
1
6
  # 5.7.1
2
7
 
3
8
  * Using $PROGRAM_NAME to determine scout path in install output
@@ -29,7 +29,7 @@ module Scout
29
29
  if @scout.streamer_command.is_a?(String)
30
30
  if @scout.streamer_command.start_with?("start")
31
31
  log.info "streamer command: start"
32
- Scout::StreamerDaemon.start_daemon(history, @scout.streamer_command, @hostname)
32
+ Scout::StreamerDaemon.start_daemon(history, @scout.streamer_command, @hostname, @http_proxy)
33
33
  elsif @scout.streamer_command == "stop"
34
34
  log.info "streamer command: stop"
35
35
  Scout::StreamerDaemon.stop_daemon(history)
data/lib/scout/server.rb CHANGED
@@ -3,8 +3,9 @@ Dir.glob(File.join(File.dirname(__FILE__), *%w[.. .. vendor *])).each do |dir|
3
3
  $LOAD_PATH << File.join(dir,"lib")
4
4
  end
5
5
 
6
- require "json"
6
+ require "multi_json"
7
7
  require "pusher"
8
+ require "httpclient"
8
9
 
9
10
  module Scout
10
11
  class Server < Scout::ServerBase
@@ -9,7 +9,7 @@ module Scout
9
9
 
10
10
  # * history_file is the *path* to the history file
11
11
  # * plugin_ids is an array of integers
12
- def initialize(history_file, streaming_key, p_app_id, p_key, p_secret, plugin_ids, hostname, logger = nil)
12
+ def initialize(history_file, streaming_key, p_app_id, p_key, p_secret, plugin_ids, hostname, http_proxy, logger = nil)
13
13
  @@continue_streaming = true
14
14
  @history_file = history_file
15
15
  @history = Hash.new
@@ -20,6 +20,7 @@ module Scout
20
20
  Pusher.app_id=p_app_id
21
21
  Pusher.key=p_key
22
22
  Pusher.secret=p_secret
23
+ Pusher.http_proxy = http_proxy if http_proxy !=""
23
24
 
24
25
  #[[:app_id,p_app_id],[:key,p_key],[:secret,p_secret]].each { |p| Pusher.send p.first, p.last}
25
26
 
@@ -32,7 +33,7 @@ module Scout
32
33
 
33
34
  # get the array of plugins, AKA the plugin plan
34
35
  @all_plugins = Array(@history["old_plugins"])
35
- info("Starting streamer with key=#{streaming_key} and plugin_ids: #{plugin_ids.inspect}. #{@history_file} includes plugin ids #{@all_plugins.map{|p|p['id']}.inspect}")
36
+ info("Starting streamer with key=#{streaming_key} and plugin_ids: #{plugin_ids.inspect}. #{@history_file} includes plugin ids #{@all_plugins.map{|p|p['id']}.inspect}. http_proxy = #{http_proxy}")
36
37
 
37
38
  # selected_plugins is subset of the @all_plugins -- those selected in plugin_ids
38
39
  selected_plugins = compile_plugins(@all_plugins, plugin_ids)
@@ -2,7 +2,7 @@ module Scout
2
2
  class StreamerDaemon < DaemonSpawn::Base
3
3
 
4
4
  # this is the public-facing method for starting the streaming daemon
5
- def self.start_daemon(history_file, streamer_command, hostname)
5
+ def self.start_daemon(history_file, streamer_command, hostname, http_proxy)
6
6
  streamer_log_file=File.join(File.dirname(history_file),"scout_streamer.log")
7
7
  streamer_pid_file=File.join(File.dirname(history_file),"scout_streamer.pid")
8
8
 
@@ -21,7 +21,7 @@ module Scout
21
21
  plugin_ids = tokens.map(&:to_i)
22
22
 
23
23
  # we use STDOUT for the logger because daemon_spawn directs STDOUT to a log file
24
- streamer_args = [history_file,streaming_key,p_app_id,p_key,p_secret,plugin_ids,hostname,Logger.new(STDOUT)]
24
+ streamer_args = [history_file,streaming_key,p_app_id,p_key,p_secret,plugin_ids,hostname,http_proxy,Logger.new(STDOUT)]
25
25
  if File.exists?(streamer_pid_file)
26
26
  Scout::StreamerDaemon.restart(daemon_spawn_options, streamer_args)
27
27
  else
@@ -45,8 +45,8 @@ module Scout
45
45
 
46
46
  # this method is called by DaemonSpawn's class start method.
47
47
  def start(streamer_args)
48
- history,streaming_key,p_app_id,p_key,p_secret,plugin_ids,hostname,log = streamer_args
49
- @scout = Scout::Streamer.new(history, streaming_key, p_app_id, p_key, p_secret, plugin_ids, hostname, log)
48
+ history,streaming_key,p_app_id,p_key,p_secret,plugin_ids,hostname,http_proxy,log = streamer_args
49
+ @scout = Scout::Streamer.new(history, streaming_key, p_app_id, p_key, p_secret, plugin_ids, hostname, http_proxy, log)
50
50
  end
51
51
 
52
52
  # this method is called by DaemonSpawn's class stop method.
data/lib/scout/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scout
2
- VERSION = "5.7.1"
2
+ VERSION = "5.7.2.pre"
3
3
  end
data/test/scout_test.rb CHANGED
@@ -425,7 +425,7 @@ myurl=http://foo.com?foo=bar
425
425
  scout(@client.key) # to write the initial history file. Sinatra MUST be running
426
426
  $continue_streaming = true # so the streamer will run once
427
427
  # for debugging, make last arg Logger.new(STDOUT)
428
- Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[@client.plugins.first.id]+plugins.map(&:id),"blade",nil)
428
+ Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[@client.plugins.first.id]+plugins.map(&:id),"blade","",nil)
429
429
  end
430
430
 
431
431
  streams = Pusher::Channel.streamer_data # set by the mock_pusher call
@@ -455,7 +455,7 @@ myurl=http://foo.com?foo=bar
455
455
  mock_pusher do
456
456
  $continue_streaming = true # so the streamer will run once
457
457
  # for debugging, make last arg Logger.new(STDOUT)
458
- Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[@client.plugins.first.id],"blade",nil)
458
+ Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[@client.plugins.first.id],"blade","",nil)
459
459
  end
460
460
  streams = Pusher::Channel.streamer_data # set by the mock_pusher call
461
461
  assert streams.is_a?(Array)
@@ -523,7 +523,7 @@ myurl=http://foo.com?foo=bar
523
523
  exec_scout(@client.key)
524
524
  #puts YAML.load(File.read(PATH_TO_DATA_FILE))['memory'].to_yaml
525
525
  # for debugging, make last arg Logger.new(STDOUT)
526
- Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[plugin.id],"blade",nil)
526
+ Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[plugin.id],"blade","",nil)
527
527
  end
528
528
 
529
529
  streams = Pusher::Channel.streamer_data # set by the mock_pusher call
@@ -538,7 +538,7 @@ myurl=http://foo.com?foo=bar
538
538
  plugin = create_plugin(@client, "caching plugin", PLUGIN_FIXTURES[:caching][:code], PLUGIN_FIXTURES[:caching][:sig])
539
539
  exec_scout(@client.key)
540
540
  # for debugging, make last arg Logger.new(STDOUT)
541
- Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[plugin.id],"blade",nil)
541
+ Scout::Streamer.new(PATH_TO_DATA_FILE,"bogus_streaming_key","a","b","c",[plugin.id],"blade","",nil)
542
542
  end
543
543
 
544
544
  streams = Pusher::Channel.streamer_data # set by the mock_pusher call
@@ -804,13 +804,12 @@ myurl=http://foo.com?foo=bar
804
804
  alias orig_trigger! trigger!
805
805
  def self.streamer_data;@@streamer_data;end # for getting the data back out
806
806
  def trigger!(event_name, data, socket=nil)
807
- @num_run_for_tests = @num_run_for_tests ? @num_run_for_tests+1 : 1
808
- # puts "in mock pusher trigger! This is run #{@num_run_for_tests} of #{$num_runs_for_mock_pusher}"
807
+ $num_run_for_tests = $num_run_for_tests ? $num_run_for_tests+1 : 1
809
808
  @@streamer_data_temp ||= Array.new
810
809
  @@streamer_data_temp << data
811
- if @num_run_for_tests >= $num_runs_for_mock_pusher
810
+ if $num_run_for_tests >= $num_runs_for_mock_pusher
812
811
  Scout::Streamer.continue_streaming=false
813
- @num_run_for_tests=nil
812
+ $num_run_for_tests=nil
814
813
  @@streamer_data = @@streamer_data_temp.clone
815
814
  @@streamer_data_temp = nil
816
815
  end
@@ -0,0 +1,759 @@
1
+ httpclient - HTTP accessing library.
2
+ Copyright (C) 2000-2012 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
+
4
+ 'httpclient' gives something like the functionality of libwww-perl (LWP) in
5
+ Ruby. 'httpclient' formerly known as 'http-access2'.
6
+
7
+ See HTTPClient for documentation.
8
+
9
+
10
+ == Features
11
+
12
+ * methods like GET/HEAD/POST/* via HTTP/1.1.
13
+ * HTTPS(SSL), Cookies, proxy, authentication(Digest, NTLM, Basic), etc.
14
+ * asynchronous HTTP request, streaming HTTP request.
15
+ * debug mode CLI.
16
+
17
+ * by contrast with net/http in standard distribution;
18
+ * Cookies support
19
+ * MT-safe
20
+ * streaming POST (POST with File/IO)
21
+ * Digest auth
22
+ * Negotiate/NTLM auth for WWW-Authenticate (requires net/ntlm module; rubyntlm gem)
23
+ * NTLM auth for Proxy-Authenticate (requires 'win32/sspi' module; rubysspi gem)
24
+ * extensible with filter interface
25
+ * you don't have to care HTTP/1.1 persistent connection
26
+ (httpclient cares instead of you)
27
+
28
+ * Not supported now
29
+ * Cache
30
+ * Rather advanced HTTP/1.1 usage such as Range, deflate, etc.
31
+ (of course you can set it in header by yourself)
32
+
33
+ == httpclient command
34
+
35
+ Usage: 1) % httpclient get https://www.google.co.jp/ q=ruby
36
+ Usage: 2) % httpclient
37
+
38
+ For 1) it issues a GET request to the given URI and shows the wiredump and
39
+ the parsed result. For 2) it invokes irb shell with the binding that has a
40
+ HTTPClient as 'self'. You can call HTTPClient instance methods like;
41
+
42
+ > get "https://www.google.co.jp/", :q => :ruby
43
+
44
+ == Author
45
+
46
+ Name:: Hiroshi Nakamura
47
+ E-mail:: nahi@ruby-lang.org
48
+ Project web site:: http://github.com/nahi/httpclient
49
+
50
+
51
+ == License
52
+
53
+ This program is copyrighted free software by NAKAMURA, Hiroshi. You can
54
+ redistribute it and/or modify it under the same terms of Ruby's license;
55
+ either the dual license version in 2003, or any later version.
56
+
57
+ httpclient/session.rb is based on http-access.rb in http-access/0.0.4. Some
58
+ part of it is copyrighted by Maebashi-san who made and published
59
+ http-access/0.0.4. http-access/0.0.4 did not include license notice but when
60
+ I asked Maebashi-san he agreed that I can redistribute it under the same terms
61
+ of Ruby. Many thanks to Maebashi-san.
62
+
63
+
64
+ == Install
65
+
66
+ === Gem
67
+
68
+ You can install httpclient with rubygems.
69
+
70
+ % gem install httpclient
71
+
72
+ === Package
73
+
74
+ You can install httpclient with the bundled installer script.
75
+
76
+ $ ruby install.rb
77
+
78
+ It will install lib/* to your site_ruby directory such as
79
+ /usr/local/lib/ruby/site_ruby/1.8/.
80
+
81
+ For uninstall, delete installed files from your site_ruby directory.
82
+
83
+
84
+ == Usage
85
+
86
+ See HTTPClient for documentation.
87
+ You can also check sample/howto.rb how to use APIs.
88
+
89
+
90
+ == Download
91
+
92
+ * Gem repository
93
+ * https://rubygems.org/gems/httpclient
94
+
95
+ * git: git://github.com/nahi/httpclient.git
96
+
97
+ == Bug report or Feature request
98
+
99
+ Please file a ticket at the project web site.
100
+
101
+ 1. find a similar ticket from https://github.com/nahi/httpclient/issues
102
+ 2. create a new ticket by clicking 'Create Issue' button.
103
+ 3. you can use github features such as pull-request if you like.
104
+
105
+ Thanks in advance.
106
+
107
+
108
+ == Changes
109
+
110
+ = Changes in 2.3.3 =
111
+
112
+ February 24, 2013 - version 2.3.3
113
+
114
+ * Changes
115
+
116
+ * #144 Add User-Agent field by default. You can remove the header by
117
+ setting nil to HTTPClient#agent_name.
118
+
119
+ = Changes in 2.3.2 =
120
+
121
+ January 5, 2013 - version 2.3.2
122
+
123
+ * Changes
124
+
125
+ * #138 Revert Timeout change unintentionally included in v2.3.1. It's
126
+ reported that the change causes background processes not terminated
127
+ properly.
128
+
129
+ = Changes in 2.3.1 =
130
+
131
+ January 1, 2013 - version 2.3.1
132
+
133
+ * Changes
134
+
135
+ * #137 Signing key is expiring for cacert_sha1.p7s.
136
+ Deleted p7s signature check for default cacerts. Sorry for many troubles
137
+ in the past. This feature is not useful without having online/real-time
138
+ CA certs update but I don't think I can implement it in near future.
139
+ Users depend on this signature check (who puts cacert.p7s in R/W
140
+ filesystem and ssl_config.rb in R/O filesystem) should take care the
141
+ tampering by themself.
142
+
143
+ * Bug fixes
144
+
145
+ * #122 Support IPv6 address in URI
146
+
147
+
148
+ = Changes in 2.3.0 =
149
+
150
+ October 10, 2012 - version 2.3.0
151
+
152
+ * Features
153
+
154
+ * Added debug mode CLI. bin/httpclient is installed as CLI.
155
+ Usage: 1) % httpclient get https://www.google.co.jp/ q=ruby
156
+ Usage: 2) %httpclient
157
+ For 1) it issues a GET request to the given URI and shows the wiredump
158
+ and the parsed result. For 2) it invokes irb shell with the binding
159
+ that has a HTTPClient as 'self'. You can call HTTPClient instance
160
+ methods like;
161
+ > get "https://www.google.co.jp/", :q => :ruby
162
+
163
+ * #119 Addressable gem support (only if it exists); should handle IRI
164
+ properly.
165
+
166
+ * Bug fixes
167
+
168
+ * #115 Cookies couldn't work properly if the path in an URI is ommited.
169
+ * #112, #117 Proper handling of sized IO (the IO object that responds to
170
+ :size) for chunked POST. HTTPClient did read till EOF even if the
171
+ given IO has :size method.
172
+ * Handle '303 See Other' properly. RFC2616 says it should be redirected
173
+ with GET.
174
+ * #116 Fix "100-continue" support. It was just ignored.
175
+ * #118 Support for boolean values when making POST/PUT requests with
176
+ multiipart/form Content-Type.
177
+ * #110 Allows leading dots in no_proxy hostname suffixes.
178
+
179
+ = Changes in 2.2.7 =
180
+
181
+ August 14, 2012 - version 2.2.7
182
+
183
+ * Bug fixes
184
+
185
+ * Fix arity incompatibility introduced in 2.2.6. It broke Webmock.
186
+ Thanks Andrew France for the report!
187
+
188
+ = Changes in 2.2.6 =
189
+
190
+ August 14, 2012 - version 2.2.6
191
+
192
+ * Bug fixes
193
+
194
+ * Make get_content doesn't raise a BadResponseError for perfectly good
195
+ responses like 304 Not Modified. Thanks to Florian Hars.
196
+
197
+ * Add 'Content-Type: application/x-www-form-urlencoded' for the PUT
198
+ request that has urlencoded entity-body.
199
+
200
+ * Features
201
+
202
+ * Add HTTPClient::IncludeClient by Jonathan Rochkind, a mix-in for easily
203
+ adding a thread-safe lazily initialized class-level HTTPClient object
204
+ to your class.
205
+
206
+ * Proxy DigestAuth support. Thanks to Alexander Kotov and Florian Hars.
207
+
208
+ * Accept an array of strings (and IO-likes) as a query value
209
+ e.g. `{ x: 'a', y: [1,2,3] }` is encoded into `"x=a&y=1&y=2&y=3"`.
210
+ Thanks to Akinori MUSHA.
211
+
212
+ * Allow body for DELETE method.
213
+
214
+ * Allow :follow_redirect => true for HEAD request.
215
+
216
+ * Fill request parameters request_method, request_uri and request_query
217
+ as part of response Message::Header.
218
+
219
+ = Changes in 2.2.5 =
220
+
221
+ May 06, 2012 - version 2.2.5
222
+
223
+ * Bug fixes
224
+
225
+ * Added Magic encoding comment to hexdump.rb to avoid encoding error.
226
+ * Add workaround for JRuby issue on Windows (JRUBY-6136)
227
+ On Windows, calling File#size fails with an Unknown error (20047).
228
+ This workaround uses File#lstat instead.
229
+ * Require open-uri only on ruby 1.9, since it is not needed on 1.8.
230
+
231
+ * Features
232
+
233
+ * Allow symbol Header name for HTTP request.
234
+ * Dump more SSL certificate information under $DEBUG.
235
+ * Add HTTPClient::SSLConfig#ssl_version property.
236
+ * Add 'Accept: */*' header to request by default. Rails requies it.
237
+ It doesn't override given Accept header from API.
238
+ * Add HTTPClient::SSLConfig#set_default_paths. This method makes
239
+ HTTPClient instance to use OpenSSL's default trusted CA certificates.
240
+ * Allow to set Date header manually.
241
+ ex. clent.get(uri, :header => {'Date' => Time.now.httpdate})
242
+
243
+ = Changes in 2.2.4 =
244
+
245
+ Dec 08, 2011 - version 2.2.4
246
+
247
+ * Bug fixes
248
+
249
+ * Do not recycle buffer String object for yielding. When the response is
250
+ not chunked and the size of the response > 16KB, API with block style
251
+ yields recycled String object for each yields.
252
+
253
+ * Set VERSION string in User-Agent header. $Id$ didn't work long time...
254
+
255
+ Bugs are reported by Seamus Abshere. Thanks!
256
+
257
+ = Changes in 2.2.3 =
258
+
259
+ Oct 28, 2011 - version 2.2.3
260
+
261
+ * Bug fixes
262
+
263
+ * Ruby 1.8.6 support. It's broken from 2.2.0.
264
+
265
+ = Changes in 2.2.2 =
266
+
267
+ Oct 17, 2011 - version 2.2.2
268
+
269
+ * Bug fixes
270
+
271
+ * Do not sort query params on request: Wrongly sorted query params for
272
+ easier debugging but the order of request parameter should be
273
+ preserved. #65
274
+
275
+ * Changes
276
+
277
+ * Set responce String encoding if possible. Parse content-type response
278
+ header with some helps from OpenURI::Meta and set response String
279
+ encoding. #26
280
+
281
+ * Improve connection cache strategy. Reuse cached session in MRU order,
282
+ not in LRU. MRU is more server friendly than LRU because it reduces
283
+ number of cached sessions when a number of requests drops after an
284
+ usaage spike.
285
+
286
+ With reusing sessions in LRU order, all sessions are equally checked if
287
+ it's closed or not, as far as there's a request to the same site. With
288
+ reusing sessions in MRU order, old cold sessions are kept in cache long
289
+ time even if there's a request to the same site. To avoid this leakage,
290
+ this version adds keep_alive_timeout property and let SessionManager
291
+ scrub all sessions with checking the timeout for each session. When the
292
+ session expires against the last used time, it's closed and collected.
293
+
294
+ keep_alive_timeout is 15[sec] by default. The value is from the default
295
+ value for KeepAliveTimeout of Apache httpd 2. #68 #69
296
+
297
+ = Changes in 2.2.1 =
298
+
299
+ Jun 2, 2011 - version 2.2.1
300
+
301
+ * Bug fixes
302
+
303
+ * For Lighttpd + PUT/POST support, do not send a request using chunked
304
+ encoding when IO respond to :size, File for example.
305
+
306
+ - There is no need to send query with Transfer-Encoding: chuncked when
307
+ IO respond to :size.
308
+ - Lighttpd does not support PUT, POST with Transfer-Encoding: chuncked.
309
+ You will see that the lighty respond with 200 OK, but there is a file
310
+ whose size is zero.
311
+
312
+ LIMITATION:
313
+ timeout occurs certainly when you send very large file and
314
+ @send_timeout is default since HTTPClient::Session#query() assumes
315
+ that *all* write are finished in @send_timeout sec not each write.
316
+
317
+ WORKAROUND:
318
+ increment @send_timeout and @receive_timeout or set @send_timeout and
319
+ @receive_timeout to 0 not to be timeout.
320
+
321
+ This fix is by TANABE Ken-ichi <nabeken@tknetworks.org>. Thanks!
322
+
323
+ * Allow empty http_proxy ENV variable. Just treat it the same as if it's
324
+ nil/unset. This fix is by Ash Berlin <ash_github@firemirror.com>.
325
+ Thanks!
326
+
327
+ * Check EOF while reading chunked response and close the session. It
328
+ raised NoMethodError.
329
+
330
+ * Changes
331
+
332
+ * Updated trusted CA certificates file (cacert.p7s and cacert_sha1.p7s).
333
+ CA certs are imported from
334
+ 'Java(TM) SE Runtime Environment (build 1.6.0_25-b06)'.
335
+
336
+ * Changed default chunk size from 4K to 16K. It's used for reading size
337
+ at a time.
338
+
339
+ = Changes in 2.2.0 =
340
+
341
+ Apr 8, 2011 - version 2.2.0
342
+
343
+ * Features
344
+ * Add HTTPClient#cookies as an alias of #cookie_manager.cookies.
345
+
346
+ * Add res.cookies method. It returns parsed cookie in response header.
347
+ It's different from client.cookie_manager.cookies. Manager keeps
348
+ persistent cookies in it.
349
+
350
+ * Add res.headers method which returns a Hash of headers.
351
+ Hash key and value are both String. Each key has a single value so you
352
+ can't extract exact value when a message has multiple headers like
353
+ 'Set-Cookie'. Use header['Set-Cookie'] for that purpose.
354
+ (It returns an Array always)
355
+
356
+ * Allow keyword style argument for HTTPClient#get, post, etc.
357
+ Introduced keywords are: :body, :query, and :header.
358
+ You can write
359
+ HTTPClient.get(uri, :header => {'X-custom' => '1'})
360
+ instead of;
361
+ HTTPClient.get(uri, nil, {'X-custom' => '1'})
362
+
363
+ * Add new keyword argument :follow_redirect to get/post. Now you can
364
+ follow redirection response with passing :follow_redirect => true.
365
+
366
+ * [INCOMPAT] Rename HTTPClient::HTTP::Message#body to #http_body, then
367
+ add #body as an alias of #content. It's incompatible change though
368
+ users rarely depends on this method. (I've never seen such a case)
369
+ Users who are using req.body and/or res.body should follow this
370
+ change. (req.http_body and res.http_body)
371
+
372
+ * Bug fixes
373
+
374
+ * Reenable keep-alive for chunked response.
375
+ This feature was disabled by c206b687952e1ad3e20c20e69bdbd1a9cb38609e at
376
+ 2008-12-09. I should have written a test for keep-alive. Now I added it.
377
+ Thanks Takahiro Nishimura(@dr_taka_n) for finding this bug.
378
+
379
+ = Changes in 2.1.7 =
380
+
381
+ Mar 22, 2011 - version 2.1.7
382
+
383
+ * Features
384
+ * Add MD5-sess auth support. Thanks to wimm-dking. (#47)
385
+ * Add SNI support. (Server Name Indication of HTTPS connection) (#49)
386
+ * Add GSSAPI auth support using gssapi gem. Thanks to zenchild. (#50)
387
+ * NTLM logon to exchange Web Services. [experimental] Thanks to curzonj and mccraigmccraig (#52)
388
+ * Add HTTPOnly cookie support. Thanks to nbrosnahan. (#55)
389
+ * Add HTTPClient#socket_local for specifying local binding hostname and port of TCP socket. Thanks to icblenke.
390
+
391
+ = Changes in 2.1.6 =
392
+
393
+ Dec 20, 2010 - version 2.1.6
394
+
395
+ * IMPORTANT update for HTTPS(SSL) connection
396
+ * Trusted CA bundle file cacert_sha1.p7s for older environment (where
397
+ you cannot use SHA512 algorithm such as an old Mac OS X) included in
398
+ httpclient 2.1.5 expires in Dec 31, 2010. Please update to 2.1.6 if
399
+ you're on such an environment.
400
+ * Updated trusted CA certificates file (cacert.p7s and cacert_sha1.p7s).
401
+ CA certs are imported from
402
+ 'Java(TM) SE Runtime Environment (build 1.6.0_22-b04)'.
403
+
404
+ * IMPORTANT bug fix for persistent connection
405
+ * #29 Resource Leak: If httpclient establishes two connections to the
406
+ same server in parallel, one of these connections will be leaked, patch
407
+ by xb.
408
+ * #30 When retrying a failed persistent connection, httpclient should use
409
+ a fresh connection, reported by xb.
410
+ These 2 fixes should fix 'Too many open files' error as well if you're
411
+ getting this. Please check 2.1.6 and let me know how it goes!
412
+
413
+ * Features
414
+ * #4 Added OAuthClient. See sample clients in sample/ dir.
415
+ * #42 Added transparent_gzip_decompression property, patch by Teshootub7.
416
+ All you need to use it is done by;
417
+ client.transparent_gzip_decompression = true
418
+ Then you can retrieve a document as usural in decompressed format.
419
+ * #38 Debug dump binary data (checking it includes \0 or not) in hex
420
+ encoded format, patch by chetan.
421
+
422
+ * Bug fixes
423
+ * #8 Opened certificate and key files for SSL not closed properly.
424
+ * #10 "get" method gets blocked in "readpartial" when receiving a 304
425
+ with no Content-Length.
426
+ * #11 Possible data corruption problem in asynchronous methods, patch by
427
+ a user. (http://dev.ctor.org/http-access2/ticket/228)
428
+ * #13 illegal Cookie PATH handling. When no PATH part given in Set-Cookie
429
+ header, URL's path part should be used for path variable.
430
+ * #16 httpclient doesn't support multiline server headers.
431
+ * #19 set_request_header clobbers 'Host' header setting if given, patch
432
+ by meuserj.
433
+ * #20 Relative Location on https redirect fails, patch by zenchild.
434
+ * #22 IIS/6 + MicrosoftSharePointTeamServices uses "NTLM" instead of
435
+ "Negotiate".
436
+ * #27 DigestAuth header: 'qop' parameter must not be enclosed between
437
+ double quotation, patch by ibc.
438
+ * #36 Wrong HTTP version in headers with Qt4 applications, reported by
439
+ gauleng.
440
+ * #38 DigestAuth + posting IO fails, patch by chetan.
441
+ * #41 https-over-proxy fails with IIS, patch by tai.
442
+
443
+ = Changes in 2.1.5 =
444
+
445
+ Jun 25, 2009 - version 2.1.5.2
446
+
447
+ * Added another cacert distribution certificate which uses
448
+ sha1WithRSAEncryption. OpenSSL/0.9.7 cannot handle non-SHA1 digest
449
+ algorithm for certificate. The new certificate is
450
+ RSA 2048 bit + SHA1 + notAfter:2010/12/31. Corresponding CA bundle file
451
+ is cacert_sha1.p7s. It is loaded only when cacert.p7s cannot be loaded
452
+ with the original distribution certificate.
453
+
454
+ Jun 11, 2009 - version 2.1.5.1
455
+
456
+ * README update.
457
+
458
+ Jun 8, 2009 - version 2.1.5
459
+
460
+ * IMPORTANT update for HTTPS(SSL) connection
461
+ * Trusted CA bundle file included in httpclient <= 2.1.4 expires in
462
+ Nov 2009. Please update to 2.1.5 by Oct 2009 if your application
463
+ depends on trusted CA bundle file.
464
+ * Updated trusted CA certificates file (cacert.p7s). CA certs are
465
+ imported from 'Java(TM) SE Runtime Environment (build 1.6.0_13-b03)'.
466
+ * Updated a cacert distribution certificate.
467
+ RSA 2048 bit + SHA512 + notAfter:2037/12/31. (#215)
468
+
469
+ * Feature
470
+ * WWW authentication with Negotiate based on win32/sspi as same as Proxy
471
+ authentication. Applied a patch from Paul Casto. Thanks! (#212)
472
+
473
+ * Bug fixes
474
+ * Infinite loop caused by EOF error while reading response message body
475
+ without Content-Length. IO#readpartial does not clear the second
476
+ argument (buffer) when an exception raised. Fixed by a patch from an
477
+ user. Thanks! (#216)
478
+ * NoMethodError caused by the cookie string that includes a double
479
+ semicolons ";;". Fixed by a patch from an user. Thanks! (#211)
480
+ * CNONCE attribute in Digest Authentication was not properly generated by
481
+ itself (used same nonce sent from the connecting server). Fixed by a
482
+ patch from bterlson
483
+ [http://github.com/bterlson/httpclient/commit/6d0df734840985a7be88a2d54443bbf892d50b9a]
484
+ Thanks! (#209)
485
+ * Cookie header was not set in authentication negotiation. Fixed. This
486
+ bug was found and pointed out by bterlson at
487
+ [http://github.com/bterlson/httpclient/commits/master]. Thanks! (#210)
488
+ * Do not send 'Content-Length: 0' when a request doesn't have message
489
+ body. Some server application (!EasySoap++/0.6 for example) corrupts
490
+ with the request with Content-Length: 0. This bug was found by clay
491
+ [http://daemons.net/~clay/2009/05/03/ruby-why-do-you-torment-me/].
492
+ Thanks! (#217)
493
+ * Ensure to reset connection after invoking HTTPClient singleton methods
494
+ for accessing such as HTTPClient.get_content. Thanks to @xgavin! (#214)
495
+
496
+ Feb 13, 2009 - version 2.1.4
497
+
498
+ * Bug fixes
499
+ * When we hit some site through http-proxy we get a response without
500
+ Content-Length header. httpclient/2.1.3 drops response body for such
501
+ case. fixed. (#199)
502
+ * Avoid duplicated 'Date' header in request. Fixed. (#194)
503
+ * Avoid to add port number to 'Host' header. Some servers like GFE/1.3
504
+ dislike it. Thanks to anonymous user for investigating the behavior.
505
+ (#195)
506
+ * httpclient/2.1.3 does not work when you fork a process after requiring
507
+ httpclient module (Passenger). Thanks to Akira Yamada for tracing down
508
+ this bug. (#197)
509
+ * httpclient/2.1.3 cannot handle Cookie header with 'expires=' and
510
+ 'expires=""'. Empty String for Time.parse returns Time.now unlike
511
+ ParseDate.parsedate. Thanks to Mark for the patch. (#200)
512
+
513
+ Jan 8, 2009 - version 2.1.3.1
514
+
515
+ * Security fix introduced at 2.1.3.
516
+ * get_content/post_content of httpclient/2.1.3 may send secure cookies
517
+ for a https site to non-secure (non-https) site when the https site
518
+ redirects the request to a non-https site. httpclient/2.1.3 caches
519
+ request object and reuses it for redirection. It should not be cached
520
+ and recreated for each time as httpclient <= 2.1.2 and http-access2.
521
+ * I realized this bug when I was reading open-uri story on
522
+ [ruby-core:21205]. Ruby users should use open-uri rather than using
523
+ net/http directly wherever possible.
524
+
525
+ Dec 29, 2008 - version 2.1.3
526
+
527
+ * Features
528
+ * Proxy Authentication for SSL.
529
+ * Performance improvements.
530
+ * Full RDoc. Please tell me any English problem. Thanks in advance.
531
+ * Do multipart file upload when a given body includes a File. You don't
532
+ need to set 'Content-Type' and boundary String any more.
533
+ * Added propfind and proppatch methods.
534
+
535
+ * Changes
536
+ * Avoid unnecessary memory consuming for get_content/post_content with
537
+ block. get_content returns nil when you call it with a block.
538
+ * post_content with IO did not work when redirect/auth cycle is required.
539
+ (CAUTION: post_content now correctly follows redirection and posts the
540
+ given content)
541
+ * Exception handling cleanups.
542
+ * Raises HTTPClient::ConfigurationError? for environment problem.
543
+ (trying to do SSL without openssl installed for example)
544
+ * Raises HTTPClient::BadResponse? for HTTP response problem. You can
545
+ get the response HTTPMessage returned via $!.res.
546
+ * Raises SocketError? for connection problem (as same as before).
547
+
548
+ * Bug fixes
549
+ * Avoid unnecessary negotiation cycle for Negotiate(NTLM) authentication.
550
+ Thanks Rishav for great support for debugging Negotiate authentication.
551
+ * get_content/post_content with block yielded unexpected message body
552
+ during redirect/auth cycle.
553
+ * Relative URI redirection should be allowed from 2.1.2 but it did not
554
+ work... fixed.
555
+ * Avoid unnecessary timeout waiting when no message body returned such as
556
+ '204 No Content' for DAV.
557
+ * Avoid blocking on socket closing when the socket is already closed by
558
+ foreign host and the client runs under MT-condition.
559
+
560
+ Sep 22, 2007 - version 2.1.2
561
+
562
+ * HTTP
563
+ * implemented Negotiate authentication with a support from exterior
564
+ modules. 'rubyntlm' module is required for Negotiate auth with IIS.
565
+ 'win32/sspi' module is required for Negotiate auth with ISA.
566
+ * a workaround for Ubuntu + SonicWALL timeout problem. try to send HTTP
567
+ request in one chunk.
568
+
569
+ * SSL
570
+ * create new self-signing dist-cert which has serial number 0x01 and
571
+ embed it in httpclient.rb.
572
+ * update cacert.p7s. certificates are imported from cacerts in JRE 6
573
+ Update 2. 1 expired CA certificate
574
+ 'C=US, O=GTE Corporation, CN=GTE CyberTrust Root' is removed.
575
+
576
+ * Bug fix
577
+ * [BUG] SSL + debug_dev didn't work under version 2.1.1.
578
+ * [BUG] Reason-Phrase of HTTP response status line can be empty according
579
+ * to RFC2616.
580
+
581
+ Aug 28, 2007 - version 2.1.1
582
+
583
+ * bug fix
584
+ * domain_match should be case insensitive. thanks to Brian for the patch.
585
+ * before calling SSLSocket#post_connection_check, check if
586
+ RUBY_VERSION > "1.8.4" for CN based wildcard certificate. when
587
+ RUBY_VERSION <= "1.8.4", it fallbacks to the post_connection_check
588
+ method in HTTPClient so httpclient should run on 1.8.4 fine as before.
589
+
590
+ * misc
591
+ * added HTTPClient#test_loopback_http_response which accepts test
592
+ loopback response which contains HTTP header.
593
+
594
+ Jul 14, 2007 - version 2.1.0
595
+
596
+ * program/project renamed from 'http-access2' to 'httpclient'.
597
+ there's compatibility layer included so existing programs for
598
+ http-access2 which uses HTTPAccess2::Client should work with
599
+ httpclient/2.1.0 correctly.
600
+
601
+ * misc
602
+ * install.rb did not install cacerts.p7s. Thanks to knu.
603
+ * now HTTPClient loads http_proxy/HTTP_PROXY and no_proxy/NO_PROXY
604
+ environment variable at initialization time. bear in mind that it
605
+ doesn't load http_proxy/HTTP_PROXY when a library is considered to be
606
+ running under CGI environment (checked by ENVREQUEST_METHOD existence.
607
+ cgi_http_proxy/CGI_HTTP_PROXY is loaded instead.
608
+
609
+ Jul 4, 2007 - version 2.0.9
610
+
611
+ * bug fix
612
+ * fix the BasicAuth regression problem in 2.0.8. A server may return
613
+ "BASIC" as an authenticate scheme label instead of "Basic". It must be
614
+ treated as a case-insensitive token according to RFC2617 section 1.2.
615
+ Thanks to mwedeme for contributing the patch. (#159)
616
+
617
+ Jun 30, 2007 - version 2.0.8
618
+
619
+ * HTTP
620
+ * added request/response filter interface and implemented DigestAuth
621
+ based on the filter interface. DigestAuth calc engine is based on
622
+ http://tools.assembla.com/breakout/wiki/DigestForSoap
623
+ Thanks to sromano. (#155)
624
+ * re-implemented BasicAuth based on the filter interface. send BasicAuth
625
+ header only if it's needed. (#31)
626
+ * handle a response which has 2XX status code as a successfull response
627
+ while retry check. applied the patch from Micah Wedemeyer.
628
+ Thanks! (#158)
629
+
630
+ * Connection
631
+ * show more friendly error message for unconnectable URL. (#156)
632
+
633
+ * bug fixes
634
+ * to avoid MIME format incompatibility, add empty epilogue chunk
635
+ explicitly. Thanks to the anonymous user who reported #154 (#154)
636
+ * rescue EPIPE for keep-alive reconnecting. Thanks to anonymous user
637
+ who posted a patch at #124. (#124)
638
+
639
+ May 13, 2007 - version 2.0.7
640
+
641
+ * HTTP
642
+ * added proxyauth support. (#6)
643
+ * let developer allow to rescue a redirect with relative URI. (#28)
644
+ * changed last-chunk condition statement to allow "0000\r\n" marker from
645
+ WebLogic Server 7.0 SP5 instead of "0\r\n". (#30)
646
+ * fixed multipart form submit. (#29, #116)
647
+ * use http_date format as a date in a request header. (#35)
648
+ * avoid duplicated Date header when running under mod_ruby. (#127)
649
+ * reason phrase in Message#reason contains \r. (#122)
650
+ * trim "\n"s in base64 encoded BasicAuth value for interoperability.
651
+ (#149)
652
+ * let retry_connect return a Message not a content. (#119)
653
+ * rescue SocketError and dump a message when a wrong address given. (#152)
654
+
655
+ * HTTP-Cookies
656
+ * changed "domain" parameter matching condition statement to allow
657
+ followings; (#24, #32, #118, #147)
658
+ * [host, domain] = [rubyforge.com, .rubyforge.com]
659
+ * [host, domain] = [reddit.com, reddit.com]
660
+
661
+ * SSL
662
+ * bundles CA certificates as trust anchors.
663
+ * allow user to get peer_cert. (#117, #123)
664
+ * added wildcard certificate support. (#151)
665
+ * SSL + HTTP keep-alive + long wait causes uncaught exception. fixed.
666
+ (#120)
667
+
668
+ * Connection
669
+ * fixed a loop condition bug that caused intermittent empty response.
670
+ (#150, #26, #125)
671
+
672
+ September 16, 2005 - version 2.0.6
673
+
674
+ * HTTP
675
+ * allows redirects from a "POST" request. imported a patch from sveit.
676
+ Thanks! (#7)
677
+ * add 'content-type: application/application/x-www-form-urlencoded' when
678
+ a request contains message-body. (#11)
679
+ * HTTP/0.9 support. (#15)
680
+ * allows submitting multipart forms. imported a patch from sveit.
681
+ Thanks! (#7)
682
+
683
+ * HTTP-Cookies
684
+ * avoid NameError when a cookie value is nil. (#10)
685
+ * added netscape_rule property to CookieManager (false by default). You
686
+ can turn on the domain attribute test of Netscape rule with the
687
+ property. cf. http://wp.netscape.com/newsref/std/cookie_spec.html
688
+ * added HTTPClient#cookie_manager property for accessing its properties.
689
+ (#13)
690
+ * added save_all_cookies method to save unused and discarded cookies as
691
+ well. The patch is from Christian Lademann. Thanks! (#21)
692
+ * allow to set cookie_manager. raise an error when set_cookie_store
693
+ called and cookie_store has already been set. (#20)
694
+
695
+ * SSL
696
+ * allows SSL connection debugging when debug_dev != nil. (#14)
697
+ * skip post_connection_check when
698
+ verify_mode == OpenSSL::SSL::VERIFY_NONE. Thanks to kdraper. (#12)
699
+ * post_connection_check: support a certificate with a wildcard in the
700
+ hostname. (#18)
701
+ * avoid NameError when no peer_cert and VERIFY_FAIL_IF_NO_PEER_CERT
702
+ given. Thanks to Christian Lademann.
703
+
704
+ * Connection
705
+ * insert a connecting host and port to an exception message when
706
+ connecting failed. (#5)
707
+ * added socket_sync property to HTTPClient(HTTPAccess2::Client) that
708
+ controls socket's sync property. the default value is true. CAUTION:
709
+ if your ruby is older than 2005-09-06 and you want to use SSL
710
+ connection, do not set socket_sync = false to avoid a blocking bug of
711
+ openssl/buffering.rb.
712
+
713
+ December 24, 2004 - version 2.0.5
714
+ This is a minor bug fix release.
715
+ - Connect/Send/Receive timeout cannot be configured. fixed.
716
+ - IPSocket#addr caused SocketError? on Mac OS X 10.3.6 + ruby-1.8.1 GA.
717
+ fixed.
718
+ - There is a server which does not like 'foo.bar.com:80' style Host header.
719
+ The server for http://rubyforge.org/export/rss_sfnews.php seems to
720
+ dislike HTTP/1.1 Host header "Host: rubyforge.net:80". It returns
721
+ HTTP 302: Found and redirects to the page again, causes
722
+ HTTPAccess2::Client to raise "retry count exceeded". Keat found that the
723
+ server likes "Host: rubyforge.net" (not with port number).
724
+
725
+ February 11, 2004 - version 2.0.4
726
+ - add Client#redirect_uri_callback interface.
727
+ - refactorings and bug fixes found during negative test.
728
+ - add SSL test.
729
+
730
+ December 16, 2003 - version 2.0.3
731
+ - no_proxy was broken in 2.0.2.
732
+ - do not dump 'Host' header under protocol_version == 'HTTP/1.0'
733
+
734
+ December ?, 2003 - version 2.0.2
735
+ - do not trust HTTP_PROXY environment variable. set proxy server manually.
736
+ http://ftp.ics.uci.edu/pub/websoft/libwww-perl/archive/2001h1/0072.html
737
+ http://ftp.ics.uci.edu/pub/websoft/libwww-perl/archive/2001h1/0241.html
738
+ http://curl.haxx.se/mail/archive-2001-12/0034.html
739
+ - follow ossl2 change.
740
+
741
+ October 4, 2003 - version 2.0.1
742
+ Query was not escaped when query was given as an Array or a Hash. Fixed.
743
+ Do not use http_proxy defined by ENV['http_proxy'] or ENV['HTTP_PROXY'] if
744
+ the destination host is 'localhost'.
745
+ Hosts which matches ENV['no_proxy'] or ENV['NO_PROXY'] won't be proxyed.
746
+ [,:] separated. ("ruby-lang.org:rubyist.net")
747
+ No regexp. (give "ruby-lang.org", not "*.ruby-lang.org")
748
+ If you want specify hot by IP address, give full address.
749
+ ("192.168.1.1, 192.168.1.2")
750
+
751
+ September 10, 2003 - version 2.0
752
+ CamelCase to non_camel_case.
753
+ SSL support (requires Ruby/OpenSSL).
754
+ Cookies support. lib/http-access2/cookie.rb is redistributed file which is
755
+ originally included in Webagent by TAKAHASHI `Maki' Masayoshi. You can
756
+ download the entire package from http://www.rubycolor.org/arc/.
757
+
758
+ January 11, 2003 - version J
759
+ ruby/1.8 support.