httpclient 2.3.0.1 → 2.8.3

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