httpclient-jgraichen 2.3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/README.txt +759 -0
  3. data/bin/httpclient +65 -0
  4. data/lib/hexdump.rb +50 -0
  5. data/lib/http-access2.rb +55 -0
  6. data/lib/http-access2/cookie.rb +1 -0
  7. data/lib/http-access2/http.rb +1 -0
  8. data/lib/httpclient.rb +1156 -0
  9. data/lib/httpclient/auth.rb +899 -0
  10. data/lib/httpclient/cacert.p7s +1912 -0
  11. data/lib/httpclient/connection.rb +88 -0
  12. data/lib/httpclient/cookie.rb +438 -0
  13. data/lib/httpclient/http.rb +1046 -0
  14. data/lib/httpclient/include_client.rb +83 -0
  15. data/lib/httpclient/session.rb +1028 -0
  16. data/lib/httpclient/ssl_config.rb +405 -0
  17. data/lib/httpclient/timeout.rb +140 -0
  18. data/lib/httpclient/util.rb +178 -0
  19. data/lib/httpclient/version.rb +3 -0
  20. data/lib/oauthclient.rb +110 -0
  21. data/sample/async.rb +8 -0
  22. data/sample/auth.rb +11 -0
  23. data/sample/cookie.rb +18 -0
  24. data/sample/dav.rb +103 -0
  25. data/sample/howto.rb +49 -0
  26. data/sample/oauth_buzz.rb +57 -0
  27. data/sample/oauth_friendfeed.rb +59 -0
  28. data/sample/oauth_twitter.rb +61 -0
  29. data/sample/ssl/0cert.pem +22 -0
  30. data/sample/ssl/0key.pem +30 -0
  31. data/sample/ssl/1000cert.pem +19 -0
  32. data/sample/ssl/1000key.pem +18 -0
  33. data/sample/ssl/htdocs/index.html +10 -0
  34. data/sample/ssl/ssl_client.rb +22 -0
  35. data/sample/ssl/webrick_httpsd.rb +29 -0
  36. data/sample/stream.rb +21 -0
  37. data/sample/thread.rb +27 -0
  38. data/sample/wcat.rb +21 -0
  39. data/test/ca-chain.cert +44 -0
  40. data/test/ca.cert +23 -0
  41. data/test/client.cert +19 -0
  42. data/test/client.key +15 -0
  43. data/test/helper.rb +129 -0
  44. data/test/htdigest +1 -0
  45. data/test/htpasswd +2 -0
  46. data/test/runner.rb +2 -0
  47. data/test/server.cert +19 -0
  48. data/test/server.key +15 -0
  49. data/test/sslsvr.rb +65 -0
  50. data/test/subca.cert +21 -0
  51. data/test/test_auth.rb +348 -0
  52. data/test/test_cookie.rb +412 -0
  53. data/test/test_hexdump.rb +14 -0
  54. data/test/test_http-access2.rb +507 -0
  55. data/test/test_httpclient.rb +1783 -0
  56. data/test/test_include_client.rb +52 -0
  57. data/test/test_ssl.rb +235 -0
  58. metadata +100 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9b658d199ce9abe62306defed6de4ee73007eff6
4
+ data.tar.gz: f2d4417fef684d4973dc756488f12a9668da6b21
5
+ SHA512:
6
+ metadata.gz: b13bcd38c0aa5692b23ff3921d0ce119fbcd750862bc7afd71f443c55f30dbcdfda5e8a90ff3926bcfd5efc17a48f0cabeb3350568b9e40f95432929578880d3
7
+ data.tar.gz: 2abb2f22c6db0e936aecd56030573e7f65b025d69864e990d6dc2e9295eb423325cfcf7ec23acd9c35cde9559de742a6f80c7e9b4c4ca76bcc5cd46a68e76397
@@ -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.