glebtv-httpclient 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +8 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +6 -0
  7. data/CHANGELOG.rdoc +653 -0
  8. data/Gemfile +12 -0
  9. data/Gemfile.lock +284 -0
  10. data/README.md +7 -2
  11. data/Rakefile +22 -0
  12. data/bin/httpclient +1 -1
  13. data/dist_key/cacerts.pem +1808 -0
  14. data/dist_key/cert.pem +24 -0
  15. data/dist_key/gen_dist_cert.rb +29 -0
  16. data/httpclient.gemspec +33 -0
  17. data/lib/httpclient.rb +59 -15
  18. data/lib/httpclient/lru_cache.rb +171 -0
  19. data/lib/httpclient/lru_threadsafe.rb +29 -0
  20. data/lib/httpclient/session.rb +52 -13
  21. data/lib/httpclient/ssl_config.rb +4 -3
  22. data/lib/httpclient/version.rb +1 -1
  23. data/sample/ssl/trust_certs/.keep_me +0 -0
  24. data/spec/http_message_spec.rb +124 -0
  25. data/spec/httpclient_spec.rb +322 -0
  26. data/spec/keepalive_spec.rb +129 -0
  27. data/spec/spec_helper.rb +40 -0
  28. data/spec/support/1024x768.gif +0 -0
  29. data/spec/support/1x1.png +0 -0
  30. data/spec/support/base_server.rb +36 -0
  31. data/spec/support/file.txt +1 -0
  32. data/spec/support/ht_helpers.rb +10 -0
  33. data/spec/support/main_server.rb +155 -0
  34. data/spec/support/proxy_server.rb +14 -0
  35. data/spec/support/test_servlet.rb +73 -0
  36. data/stress-test/Gemfile +4 -0
  37. data/stress-test/Gemfile.lock +16 -0
  38. data/stress-test/client.rb +72 -0
  39. data/stress-test/config.ru +4 -0
  40. data/stress-test/unicorn.conf +2 -0
  41. data/test.rb +19 -0
  42. data/test/helper.rb +4 -3
  43. data/test/test_httpclient.rb +19 -677
  44. metadata +226 -38
  45. data/lib/httpclient/timeout.rb +0 -140
  46. data/test/runner.rb +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c26103f010f4d536d65964f901f3620b5fd6bc4
4
- data.tar.gz: 7205b9e644496a2088dcdb23a8103af5bb899183
3
+ metadata.gz: 9f1fdf05ea5ea3a8e6ae1d34a30ea0c9f2d96d64
4
+ data.tar.gz: 63dc5a23fd66a60cc43dcb36822bf584ac0ad46b
5
5
  SHA512:
6
- metadata.gz: e4e930d1f9ceecfd2e114326e9ae4f26a4bda830448b1a3c89de0202b6bfe65ab3d7069450395d144dac4c820eece57a1b787d34210e17caa01e7fefc09d2b5a
7
- data.tar.gz: dce89e34f10e7c9d43d76fbaea483a7033ded7082345b259cc0b03cb21151eb8469aac54171eda1b49889040a323958430945618009eaa3cdcd6d319b83f87cb
6
+ metadata.gz: 72a594a622305d413831c95ee52af3303894c0a7f945ae9ca82b8015f675aee44df2da25163100e33575ab02d270f498849c2c2b5ac358280db98f7fcb708417
7
+ data.tar.gz: 29a42481ba18e44194d22a48b05aa808eb779e524a4fe06b2ed23829c2ab68cb3db0107783c043c7d4709a12ef3bd539460826f28514ed6ac2b37efd74717a3e
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *~
2
+ tags
3
+ pkg
4
+ coverage
5
+ doc
6
+ reports
7
+ .rbx
8
+ .bundle
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ httpclient
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.0.0-p353
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+ - 2.1.0
5
+ - jruby-19mode
6
+ - rbx-2.2.1
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,653 @@
1
+
2
+ == Changes
3
+
4
+ = Changes in 2.3.3 =
5
+
6
+ February 24, 2013 - version 2.3.3
7
+
8
+ * Changes
9
+
10
+ * #144 Add User-Agent field by default. You can remove the header by
11
+ setting nil to HTTPClient#agent_name.
12
+
13
+ = Changes in 2.3.2 =
14
+
15
+ January 5, 2013 - version 2.3.2
16
+
17
+ * Changes
18
+
19
+ * #138 Revert Timeout change unintentionally included in v2.3.1. It's
20
+ reported that the change causes background processes not terminated
21
+ properly.
22
+
23
+ = Changes in 2.3.1 =
24
+
25
+ January 1, 2013 - version 2.3.1
26
+
27
+ * Changes
28
+
29
+ * #137 Signing key is expiring for cacert_sha1.p7s.
30
+ Deleted p7s signature check for default cacerts. Sorry for many troubles
31
+ in the past. This feature is not useful without having online/real-time
32
+ CA certs update but I don't think I can implement it in near future.
33
+ Users depend on this signature check (who puts cacert.p7s in R/W
34
+ filesystem and ssl_config.rb in R/O filesystem) should take care the
35
+ tampering by themself.
36
+
37
+ * Bug fixes
38
+
39
+ * #122 Support IPv6 address in URI
40
+
41
+
42
+ = Changes in 2.3.0 =
43
+
44
+ October 10, 2012 - version 2.3.0
45
+
46
+ * Features
47
+
48
+ * Added debug mode CLI. bin/httpclient is installed as CLI.
49
+ Usage: 1) % httpclient get https://www.google.co.jp/ q=ruby
50
+ Usage: 2) %httpclient
51
+ For 1) it issues a GET request to the given URI and shows the wiredump
52
+ and the parsed result. For 2) it invokes irb shell with the binding
53
+ that has a HTTPClient as 'self'. You can call HTTPClient instance
54
+ methods like;
55
+ > get "https://www.google.co.jp/", :q => :ruby
56
+
57
+ * #119 Addressable gem support (only if it exists); should handle IRI
58
+ properly.
59
+
60
+ * Bug fixes
61
+
62
+ * #115 Cookies couldn't work properly if the path in an URI is ommited.
63
+ * #112, #117 Proper handling of sized IO (the IO object that responds to
64
+ :size) for chunked POST. HTTPClient did read till EOF even if the
65
+ given IO has :size method.
66
+ * Handle '303 See Other' properly. RFC2616 says it should be redirected
67
+ with GET.
68
+ * #116 Fix "100-continue" support. It was just ignored.
69
+ * #118 Support for boolean values when making POST/PUT requests with
70
+ multiipart/form Content-Type.
71
+ * #110 Allows leading dots in no_proxy hostname suffixes.
72
+
73
+ = Changes in 2.2.7 =
74
+
75
+ August 14, 2012 - version 2.2.7
76
+
77
+ * Bug fixes
78
+
79
+ * Fix arity incompatibility introduced in 2.2.6. It broke Webmock.
80
+ Thanks Andrew France for the report!
81
+
82
+ = Changes in 2.2.6 =
83
+
84
+ August 14, 2012 - version 2.2.6
85
+
86
+ * Bug fixes
87
+
88
+ * Make get_content doesn't raise a BadResponseError for perfectly good
89
+ responses like 304 Not Modified. Thanks to Florian Hars.
90
+
91
+ * Add 'Content-Type: application/x-www-form-urlencoded' for the PUT
92
+ request that has urlencoded entity-body.
93
+
94
+ * Features
95
+
96
+ * Add HTTPClient::IncludeClient by Jonathan Rochkind, a mix-in for easily
97
+ adding a thread-safe lazily initialized class-level HTTPClient object
98
+ to your class.
99
+
100
+ * Proxy DigestAuth support. Thanks to Alexander Kotov and Florian Hars.
101
+
102
+ * Accept an array of strings (and IO-likes) as a query value
103
+ e.g. `{ x: 'a', y: [1,2,3] }` is encoded into `"x=a&y=1&y=2&y=3"`.
104
+ Thanks to Akinori MUSHA.
105
+
106
+ * Allow body for DELETE method.
107
+
108
+ * Allow :follow_redirect => true for HEAD request.
109
+
110
+ * Fill request parameters request_method, request_uri and request_query
111
+ as part of response Message::Header.
112
+
113
+ = Changes in 2.2.5 =
114
+
115
+ May 06, 2012 - version 2.2.5
116
+
117
+ * Bug fixes
118
+
119
+ * Added Magic encoding comment to hexdump.rb to avoid encoding error.
120
+ * Add workaround for JRuby issue on Windows (JRUBY-6136)
121
+ On Windows, calling File#size fails with an Unknown error (20047).
122
+ This workaround uses File#lstat instead.
123
+ * Require open-uri only on ruby 1.9, since it is not needed on 1.8.
124
+
125
+ * Features
126
+
127
+ * Allow symbol Header name for HTTP request.
128
+ * Dump more SSL certificate information under $DEBUG.
129
+ * Add HTTPClient::SSLConfig#ssl_version property.
130
+ * Add 'Accept: */*' header to request by default. Rails requies it.
131
+ It doesn't override given Accept header from API.
132
+ * Add HTTPClient::SSLConfig#set_default_paths. This method makes
133
+ HTTPClient instance to use OpenSSL's default trusted CA certificates.
134
+ * Allow to set Date header manually.
135
+ ex. clent.get(uri, :header => {'Date' => Time.now.httpdate})
136
+
137
+ = Changes in 2.2.4 =
138
+
139
+ Dec 08, 2011 - version 2.2.4
140
+
141
+ * Bug fixes
142
+
143
+ * Do not recycle buffer String object for yielding. When the response is
144
+ not chunked and the size of the response > 16KB, API with block style
145
+ yields recycled String object for each yields.
146
+
147
+ * Set VERSION string in User-Agent header. $Id$ didn't work long time...
148
+
149
+ Bugs are reported by Seamus Abshere. Thanks!
150
+
151
+ = Changes in 2.2.3 =
152
+
153
+ Oct 28, 2011 - version 2.2.3
154
+
155
+ * Bug fixes
156
+
157
+ * Ruby 1.8.6 support. It's broken from 2.2.0.
158
+
159
+ = Changes in 2.2.2 =
160
+
161
+ Oct 17, 2011 - version 2.2.2
162
+
163
+ * Bug fixes
164
+
165
+ * Do not sort query params on request: Wrongly sorted query params for
166
+ easier debugging but the order of request parameter should be
167
+ preserved. #65
168
+
169
+ * Changes
170
+
171
+ * Set responce String encoding if possible. Parse content-type response
172
+ header with some helps from OpenURI::Meta and set response String
173
+ encoding. #26
174
+
175
+ * Improve connection cache strategy. Reuse cached session in MRU order,
176
+ not in LRU. MRU is more server friendly than LRU because it reduces
177
+ number of cached sessions when a number of requests drops after an
178
+ usaage spike.
179
+
180
+ With reusing sessions in LRU order, all sessions are equally checked if
181
+ it's closed or not, as far as there's a request to the same site. With
182
+ reusing sessions in MRU order, old cold sessions are kept in cache long
183
+ time even if there's a request to the same site. To avoid this leakage,
184
+ this version adds keep_alive_timeout property and let SessionManager
185
+ scrub all sessions with checking the timeout for each session. When the
186
+ session expires against the last used time, it's closed and collected.
187
+
188
+ keep_alive_timeout is 15[sec] by default. The value is from the default
189
+ value for KeepAliveTimeout of Apache httpd 2. #68 #69
190
+
191
+ = Changes in 2.2.1 =
192
+
193
+ Jun 2, 2011 - version 2.2.1
194
+
195
+ * Bug fixes
196
+
197
+ * For Lighttpd + PUT/POST support, do not send a request using chunked
198
+ encoding when IO respond to :size, File for example.
199
+
200
+ - There is no need to send query with Transfer-Encoding: chuncked when
201
+ IO respond to :size.
202
+ - Lighttpd does not support PUT, POST with Transfer-Encoding: chuncked.
203
+ You will see that the lighty respond with 200 OK, but there is a file
204
+ whose size is zero.
205
+
206
+ LIMITATION:
207
+ timeout occurs certainly when you send very large file and
208
+ @send_timeout is default since HTTPClient::Session#query() assumes
209
+ that *all* write are finished in @send_timeout sec not each write.
210
+
211
+ WORKAROUND:
212
+ increment @send_timeout and @receive_timeout or set @send_timeout and
213
+ @receive_timeout to 0 not to be timeout.
214
+
215
+ This fix is by TANABE Ken-ichi <nabeken@tknetworks.org>. Thanks!
216
+
217
+ * Allow empty http_proxy ENV variable. Just treat it the same as if it's
218
+ nil/unset. This fix is by Ash Berlin <ash_github@firemirror.com>.
219
+ Thanks!
220
+
221
+ * Check EOF while reading chunked response and close the session. It
222
+ raised NoMethodError.
223
+
224
+ * Changes
225
+
226
+ * Updated trusted CA certificates file (cacert.p7s and cacert_sha1.p7s).
227
+ CA certs are imported from
228
+ 'Java(TM) SE Runtime Environment (build 1.6.0_25-b06)'.
229
+
230
+ * Changed default chunk size from 4K to 16K. It's used for reading size
231
+ at a time.
232
+
233
+ = Changes in 2.2.0 =
234
+
235
+ Apr 8, 2011 - version 2.2.0
236
+
237
+ * Features
238
+ * Add HTTPClient#cookies as an alias of #cookie_manager.cookies.
239
+
240
+ * Add res.cookies method. It returns parsed cookie in response header.
241
+ It's different from client.cookie_manager.cookies. Manager keeps
242
+ persistent cookies in it.
243
+
244
+ * Add res.headers method which returns a Hash of headers.
245
+ Hash key and value are both String. Each key has a single value so you
246
+ can't extract exact value when a message has multiple headers like
247
+ 'Set-Cookie'. Use header['Set-Cookie'] for that purpose.
248
+ (It returns an Array always)
249
+
250
+ * Allow keyword style argument for HTTPClient#get, post, etc.
251
+ Introduced keywords are: :body, :query, and :header.
252
+ You can write
253
+ HTTPClient.get(uri, :header => {'X-custom' => '1'})
254
+ instead of;
255
+ HTTPClient.get(uri, nil, {'X-custom' => '1'})
256
+
257
+ * Add new keyword argument :follow_redirect to get/post. Now you can
258
+ follow redirection response with passing :follow_redirect => true.
259
+
260
+ * [INCOMPAT] Rename HTTPClient::HTTP::Message#body to #http_body, then
261
+ add #body as an alias of #content. It's incompatible change though
262
+ users rarely depends on this method. (I've never seen such a case)
263
+ Users who are using req.body and/or res.body should follow this
264
+ change. (req.http_body and res.http_body)
265
+
266
+ * Bug fixes
267
+
268
+ * Reenable keep-alive for chunked response.
269
+ This feature was disabled by c206b687952e1ad3e20c20e69bdbd1a9cb38609e at
270
+ 2008-12-09. I should have written a test for keep-alive. Now I added it.
271
+ Thanks Takahiro Nishimura(@dr_taka_n) for finding this bug.
272
+
273
+ = Changes in 2.1.7 =
274
+
275
+ Mar 22, 2011 - version 2.1.7
276
+
277
+ * Features
278
+ * Add MD5-sess auth support. Thanks to wimm-dking. (#47)
279
+ * Add SNI support. (Server Name Indication of HTTPS connection) (#49)
280
+ * Add GSSAPI auth support using gssapi gem. Thanks to zenchild. (#50)
281
+ * NTLM logon to exchange Web Services. [experimental] Thanks to curzonj and mccraigmccraig (#52)
282
+ * Add HTTPOnly cookie support. Thanks to nbrosnahan. (#55)
283
+ * Add HTTPClient#socket_local for specifying local binding hostname and port of TCP socket. Thanks to icblenke.
284
+
285
+ = Changes in 2.1.6 =
286
+
287
+ Dec 20, 2010 - version 2.1.6
288
+
289
+ * IMPORTANT update for HTTPS(SSL) connection
290
+ * Trusted CA bundle file cacert_sha1.p7s for older environment (where
291
+ you cannot use SHA512 algorithm such as an old Mac OS X) included in
292
+ httpclient 2.1.5 expires in Dec 31, 2010. Please update to 2.1.6 if
293
+ you're on such an environment.
294
+ * Updated trusted CA certificates file (cacert.p7s and cacert_sha1.p7s).
295
+ CA certs are imported from
296
+ 'Java(TM) SE Runtime Environment (build 1.6.0_22-b04)'.
297
+
298
+ * IMPORTANT bug fix for persistent connection
299
+ * #29 Resource Leak: If httpclient establishes two connections to the
300
+ same server in parallel, one of these connections will be leaked, patch
301
+ by xb.
302
+ * #30 When retrying a failed persistent connection, httpclient should use
303
+ a fresh connection, reported by xb.
304
+ These 2 fixes should fix 'Too many open files' error as well if you're
305
+ getting this. Please check 2.1.6 and let me know how it goes!
306
+
307
+ * Features
308
+ * #4 Added OAuthClient. See sample clients in sample/ dir.
309
+ * #42 Added transparent_gzip_decompression property, patch by Teshootub7.
310
+ All you need to use it is done by;
311
+ client.transparent_gzip_decompression = true
312
+ Then you can retrieve a document as usural in decompressed format.
313
+ * #38 Debug dump binary data (checking it includes \0 or not) in hex
314
+ encoded format, patch by chetan.
315
+
316
+ * Bug fixes
317
+ * #8 Opened certificate and key files for SSL not closed properly.
318
+ * #10 "get" method gets blocked in "readpartial" when receiving a 304
319
+ with no Content-Length.
320
+ * #11 Possible data corruption problem in asynchronous methods, patch by
321
+ a user. (http://dev.ctor.org/http-access2/ticket/228)
322
+ * #13 illegal Cookie PATH handling. When no PATH part given in Set-Cookie
323
+ header, URL's path part should be used for path variable.
324
+ * #16 httpclient doesn't support multiline server headers.
325
+ * #19 set_request_header clobbers 'Host' header setting if given, patch
326
+ by meuserj.
327
+ * #20 Relative Location on https redirect fails, patch by zenchild.
328
+ * #22 IIS/6 + MicrosoftSharePointTeamServices uses "NTLM" instead of
329
+ "Negotiate".
330
+ * #27 DigestAuth header: 'qop' parameter must not be enclosed between
331
+ double quotation, patch by ibc.
332
+ * #36 Wrong HTTP version in headers with Qt4 applications, reported by
333
+ gauleng.
334
+ * #38 DigestAuth + posting IO fails, patch by chetan.
335
+ * #41 https-over-proxy fails with IIS, patch by tai.
336
+
337
+ = Changes in 2.1.5 =
338
+
339
+ Jun 25, 2009 - version 2.1.5.2
340
+
341
+ * Added another cacert distribution certificate which uses
342
+ sha1WithRSAEncryption. OpenSSL/0.9.7 cannot handle non-SHA1 digest
343
+ algorithm for certificate. The new certificate is
344
+ RSA 2048 bit + SHA1 + notAfter:2010/12/31. Corresponding CA bundle file
345
+ is cacert_sha1.p7s. It is loaded only when cacert.p7s cannot be loaded
346
+ with the original distribution certificate.
347
+
348
+ Jun 11, 2009 - version 2.1.5.1
349
+
350
+ * README update.
351
+
352
+ Jun 8, 2009 - version 2.1.5
353
+
354
+ * IMPORTANT update for HTTPS(SSL) connection
355
+ * Trusted CA bundle file included in httpclient <= 2.1.4 expires in
356
+ Nov 2009. Please update to 2.1.5 by Oct 2009 if your application
357
+ depends on trusted CA bundle file.
358
+ * Updated trusted CA certificates file (cacert.p7s). CA certs are
359
+ imported from 'Java(TM) SE Runtime Environment (build 1.6.0_13-b03)'.
360
+ * Updated a cacert distribution certificate.
361
+ RSA 2048 bit + SHA512 + notAfter:2037/12/31. (#215)
362
+
363
+ * Feature
364
+ * WWW authentication with Negotiate based on win32/sspi as same as Proxy
365
+ authentication. Applied a patch from Paul Casto. Thanks! (#212)
366
+
367
+ * Bug fixes
368
+ * Infinite loop caused by EOF error while reading response message body
369
+ without Content-Length. IO#readpartial does not clear the second
370
+ argument (buffer) when an exception raised. Fixed by a patch from an
371
+ user. Thanks! (#216)
372
+ * NoMethodError caused by the cookie string that includes a double
373
+ semicolons ";;". Fixed by a patch from an user. Thanks! (#211)
374
+ * CNONCE attribute in Digest Authentication was not properly generated by
375
+ itself (used same nonce sent from the connecting server). Fixed by a
376
+ patch from bterlson
377
+ [http://github.com/bterlson/httpclient/commit/6d0df734840985a7be88a2d54443bbf892d50b9a]
378
+ Thanks! (#209)
379
+ * Cookie header was not set in authentication negotiation. Fixed. This
380
+ bug was found and pointed out by bterlson at
381
+ [http://github.com/bterlson/httpclient/commits/master]. Thanks! (#210)
382
+ * Do not send 'Content-Length: 0' when a request doesn't have message
383
+ body. Some server application (!EasySoap++/0.6 for example) corrupts
384
+ with the request with Content-Length: 0. This bug was found by clay
385
+ [http://daemons.net/~clay/2009/05/03/ruby-why-do-you-torment-me/].
386
+ Thanks! (#217)
387
+ * Ensure to reset connection after invoking HTTPClient singleton methods
388
+ for accessing such as HTTPClient.get_content. Thanks to @xgavin! (#214)
389
+
390
+ Feb 13, 2009 - version 2.1.4
391
+
392
+ * Bug fixes
393
+ * When we hit some site through http-proxy we get a response without
394
+ Content-Length header. httpclient/2.1.3 drops response body for such
395
+ case. fixed. (#199)
396
+ * Avoid duplicated 'Date' header in request. Fixed. (#194)
397
+ * Avoid to add port number to 'Host' header. Some servers like GFE/1.3
398
+ dislike it. Thanks to anonymous user for investigating the behavior.
399
+ (#195)
400
+ * httpclient/2.1.3 does not work when you fork a process after requiring
401
+ httpclient module (Passenger). Thanks to Akira Yamada for tracing down
402
+ this bug. (#197)
403
+ * httpclient/2.1.3 cannot handle Cookie header with 'expires=' and
404
+ 'expires=""'. Empty String for Time.parse returns Time.now unlike
405
+ ParseDate.parsedate. Thanks to Mark for the patch. (#200)
406
+
407
+ Jan 8, 2009 - version 2.1.3.1
408
+
409
+ * Security fix introduced at 2.1.3.
410
+ * get_content/post_content of httpclient/2.1.3 may send secure cookies
411
+ for a https site to non-secure (non-https) site when the https site
412
+ redirects the request to a non-https site. httpclient/2.1.3 caches
413
+ request object and reuses it for redirection. It should not be cached
414
+ and recreated for each time as httpclient <= 2.1.2 and http-access2.
415
+ * I realized this bug when I was reading open-uri story on
416
+ [ruby-core:21205]. Ruby users should use open-uri rather than using
417
+ net/http directly wherever possible.
418
+
419
+ Dec 29, 2008 - version 2.1.3
420
+
421
+ * Features
422
+ * Proxy Authentication for SSL.
423
+ * Performance improvements.
424
+ * Full RDoc. Please tell me any English problem. Thanks in advance.
425
+ * Do multipart file upload when a given body includes a File. You don't
426
+ need to set 'Content-Type' and boundary String any more.
427
+ * Added propfind and proppatch methods.
428
+
429
+ * Changes
430
+ * Avoid unnecessary memory consuming for get_content/post_content with
431
+ block. get_content returns nil when you call it with a block.
432
+ * post_content with IO did not work when redirect/auth cycle is required.
433
+ (CAUTION: post_content now correctly follows redirection and posts the
434
+ given content)
435
+ * Exception handling cleanups.
436
+ * Raises HTTPClient::ConfigurationError? for environment problem.
437
+ (trying to do SSL without openssl installed for example)
438
+ * Raises HTTPClient::BadResponse? for HTTP response problem. You can
439
+ get the response HTTPMessage returned via $!.res.
440
+ * Raises SocketError? for connection problem (as same as before).
441
+
442
+ * Bug fixes
443
+ * Avoid unnecessary negotiation cycle for Negotiate(NTLM) authentication.
444
+ Thanks Rishav for great support for debugging Negotiate authentication.
445
+ * get_content/post_content with block yielded unexpected message body
446
+ during redirect/auth cycle.
447
+ * Relative URI redirection should be allowed from 2.1.2 but it did not
448
+ work... fixed.
449
+ * Avoid unnecessary timeout waiting when no message body returned such as
450
+ '204 No Content' for DAV.
451
+ * Avoid blocking on socket closing when the socket is already closed by
452
+ foreign host and the client runs under MT-condition.
453
+
454
+ Sep 22, 2007 - version 2.1.2
455
+
456
+ * HTTP
457
+ * implemented Negotiate authentication with a support from exterior
458
+ modules. 'rubyntlm' module is required for Negotiate auth with IIS.
459
+ 'win32/sspi' module is required for Negotiate auth with ISA.
460
+ * a workaround for Ubuntu + SonicWALL timeout problem. try to send HTTP
461
+ request in one chunk.
462
+
463
+ * SSL
464
+ * create new self-signing dist-cert which has serial number 0x01 and
465
+ embed it in httpclient.rb.
466
+ * update cacert.p7s. certificates are imported from cacerts in JRE 6
467
+ Update 2. 1 expired CA certificate
468
+ 'C=US, O=GTE Corporation, CN=GTE CyberTrust Root' is removed.
469
+
470
+ * Bug fix
471
+ * [BUG] SSL + debug_dev didn't work under version 2.1.1.
472
+ * [BUG] Reason-Phrase of HTTP response status line can be empty according
473
+ * to RFC2616.
474
+
475
+ Aug 28, 2007 - version 2.1.1
476
+
477
+ * bug fix
478
+ * domain_match should be case insensitive. thanks to Brian for the patch.
479
+ * before calling SSLSocket#post_connection_check, check if
480
+ RUBY_VERSION > "1.8.4" for CN based wildcard certificate. when
481
+ RUBY_VERSION <= "1.8.4", it fallbacks to the post_connection_check
482
+ method in HTTPClient so httpclient should run on 1.8.4 fine as before.
483
+
484
+ * misc
485
+ * added HTTPClient#test_loopback_http_response which accepts test
486
+ loopback response which contains HTTP header.
487
+
488
+ Jul 14, 2007 - version 2.1.0
489
+
490
+ * program/project renamed from 'http-access2' to 'httpclient'.
491
+ there's compatibility layer included so existing programs for
492
+ http-access2 which uses HTTPAccess2::Client should work with
493
+ httpclient/2.1.0 correctly.
494
+
495
+ * misc
496
+ * install.rb did not install cacerts.p7s. Thanks to knu.
497
+ * now HTTPClient loads http_proxy/HTTP_PROXY and no_proxy/NO_PROXY
498
+ environment variable at initialization time. bear in mind that it
499
+ doesn't load http_proxy/HTTP_PROXY when a library is considered to be
500
+ running under CGI environment (checked by ENVREQUEST_METHOD existence.
501
+ cgi_http_proxy/CGI_HTTP_PROXY is loaded instead.
502
+
503
+ Jul 4, 2007 - version 2.0.9
504
+
505
+ * bug fix
506
+ * fix the BasicAuth regression problem in 2.0.8. A server may return
507
+ "BASIC" as an authenticate scheme label instead of "Basic". It must be
508
+ treated as a case-insensitive token according to RFC2617 section 1.2.
509
+ Thanks to mwedeme for contributing the patch. (#159)
510
+
511
+ Jun 30, 2007 - version 2.0.8
512
+
513
+ * HTTP
514
+ * added request/response filter interface and implemented DigestAuth
515
+ based on the filter interface. DigestAuth calc engine is based on
516
+ http://tools.assembla.com/breakout/wiki/DigestForSoap
517
+ Thanks to sromano. (#155)
518
+ * re-implemented BasicAuth based on the filter interface. send BasicAuth
519
+ header only if it's needed. (#31)
520
+ * handle a response which has 2XX status code as a successfull response
521
+ while retry check. applied the patch from Micah Wedemeyer.
522
+ Thanks! (#158)
523
+
524
+ * Connection
525
+ * show more friendly error message for unconnectable URL. (#156)
526
+
527
+ * bug fixes
528
+ * to avoid MIME format incompatibility, add empty epilogue chunk
529
+ explicitly. Thanks to the anonymous user who reported #154 (#154)
530
+ * rescue EPIPE for keep-alive reconnecting. Thanks to anonymous user
531
+ who posted a patch at #124. (#124)
532
+
533
+ May 13, 2007 - version 2.0.7
534
+
535
+ * HTTP
536
+ * added proxyauth support. (#6)
537
+ * let developer allow to rescue a redirect with relative URI. (#28)
538
+ * changed last-chunk condition statement to allow "0000\r\n" marker from
539
+ WebLogic Server 7.0 SP5 instead of "0\r\n". (#30)
540
+ * fixed multipart form submit. (#29, #116)
541
+ * use http_date format as a date in a request header. (#35)
542
+ * avoid duplicated Date header when running under mod_ruby. (#127)
543
+ * reason phrase in Message#reason contains \r. (#122)
544
+ * trim "\n"s in base64 encoded BasicAuth value for interoperability.
545
+ (#149)
546
+ * let retry_connect return a Message not a content. (#119)
547
+ * rescue SocketError and dump a message when a wrong address given. (#152)
548
+
549
+ * HTTP-Cookies
550
+ * changed "domain" parameter matching condition statement to allow
551
+ followings; (#24, #32, #118, #147)
552
+ * [host, domain] = [rubyforge.com, .rubyforge.com]
553
+ * [host, domain] = [reddit.com, reddit.com]
554
+
555
+ * SSL
556
+ * bundles CA certificates as trust anchors.
557
+ * allow user to get peer_cert. (#117, #123)
558
+ * added wildcard certificate support. (#151)
559
+ * SSL + HTTP keep-alive + long wait causes uncaught exception. fixed.
560
+ (#120)
561
+
562
+ * Connection
563
+ * fixed a loop condition bug that caused intermittent empty response.
564
+ (#150, #26, #125)
565
+
566
+ September 16, 2005 - version 2.0.6
567
+
568
+ * HTTP
569
+ * allows redirects from a "POST" request. imported a patch from sveit.
570
+ Thanks! (#7)
571
+ * add 'content-type: application/application/x-www-form-urlencoded' when
572
+ a request contains message-body. (#11)
573
+ * HTTP/0.9 support. (#15)
574
+ * allows submitting multipart forms. imported a patch from sveit.
575
+ Thanks! (#7)
576
+
577
+ * HTTP-Cookies
578
+ * avoid NameError when a cookie value is nil. (#10)
579
+ * added netscape_rule property to CookieManager (false by default). You
580
+ can turn on the domain attribute test of Netscape rule with the
581
+ property. cf. http://wp.netscape.com/newsref/std/cookie_spec.html
582
+ * added HTTPClient#cookie_manager property for accessing its properties.
583
+ (#13)
584
+ * added save_all_cookies method to save unused and discarded cookies as
585
+ well. The patch is from Christian Lademann. Thanks! (#21)
586
+ * allow to set cookie_manager. raise an error when set_cookie_store
587
+ called and cookie_store has already been set. (#20)
588
+
589
+ * SSL
590
+ * allows SSL connection debugging when debug_dev != nil. (#14)
591
+ * skip post_connection_check when
592
+ verify_mode == OpenSSL::SSL::VERIFY_NONE. Thanks to kdraper. (#12)
593
+ * post_connection_check: support a certificate with a wildcard in the
594
+ hostname. (#18)
595
+ * avoid NameError when no peer_cert and VERIFY_FAIL_IF_NO_PEER_CERT
596
+ given. Thanks to Christian Lademann.
597
+
598
+ * Connection
599
+ * insert a connecting host and port to an exception message when
600
+ connecting failed. (#5)
601
+ * added socket_sync property to HTTPClient(HTTPAccess2::Client) that
602
+ controls socket's sync property. the default value is true. CAUTION:
603
+ if your ruby is older than 2005-09-06 and you want to use SSL
604
+ connection, do not set socket_sync = false to avoid a blocking bug of
605
+ openssl/buffering.rb.
606
+
607
+ December 24, 2004 - version 2.0.5
608
+ This is a minor bug fix release.
609
+ - Connect/Send/Receive timeout cannot be configured. fixed.
610
+ - IPSocket#addr caused SocketError? on Mac OS X 10.3.6 + ruby-1.8.1 GA.
611
+ fixed.
612
+ - There is a server which does not like 'foo.bar.com:80' style Host header.
613
+ The server for http://rubyforge.org/export/rss_sfnews.php seems to
614
+ dislike HTTP/1.1 Host header "Host: rubyforge.net:80". It returns
615
+ HTTP 302: Found and redirects to the page again, causes
616
+ HTTPAccess2::Client to raise "retry count exceeded". Keat found that the
617
+ server likes "Host: rubyforge.net" (not with port number).
618
+
619
+ February 11, 2004 - version 2.0.4
620
+ - add Client#redirect_uri_callback interface.
621
+ - refactorings and bug fixes found during negative test.
622
+ - add SSL test.
623
+
624
+ December 16, 2003 - version 2.0.3
625
+ - no_proxy was broken in 2.0.2.
626
+ - do not dump 'Host' header under protocol_version == 'HTTP/1.0'
627
+
628
+ December ?, 2003 - version 2.0.2
629
+ - do not trust HTTP_PROXY environment variable. set proxy server manually.
630
+ http://ftp.ics.uci.edu/pub/websoft/libwww-perl/archive/2001h1/0072.html
631
+ http://ftp.ics.uci.edu/pub/websoft/libwww-perl/archive/2001h1/0241.html
632
+ http://curl.haxx.se/mail/archive-2001-12/0034.html
633
+ - follow ossl2 change.
634
+
635
+ October 4, 2003 - version 2.0.1
636
+ Query was not escaped when query was given as an Array or a Hash. Fixed.
637
+ Do not use http_proxy defined by ENV['http_proxy'] or ENV['HTTP_PROXY'] if
638
+ the destination host is 'localhost'.
639
+ Hosts which matches ENV['no_proxy'] or ENV['NO_PROXY'] won't be proxyed.
640
+ [,:] separated. ("ruby-lang.org:rubyist.net")
641
+ No regexp. (give "ruby-lang.org", not "*.ruby-lang.org")
642
+ If you want specify hot by IP address, give full address.
643
+ ("192.168.1.1, 192.168.1.2")
644
+
645
+ September 10, 2003 - version 2.0
646
+ CamelCase to non_camel_case.
647
+ SSL support (requires Ruby/OpenSSL).
648
+ Cookies support. lib/http-access2/cookie.rb is redistributed file which is
649
+ originally included in Webagent by TAKAHASHI `Maki' Masayoshi. You can
650
+ download the entire package from http://www.rubycolor.org/arc/.
651
+
652
+ January 11, 2003 - version J
653
+ ruby/1.8 support.