CHANGES.md 14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
## 1.0.2 (2016-01-15)

* [#295](https://github.com/httprb/http/pull/295):
  Fix redirect following when used with persistent mode.
  ([@ixti])


## 1.0.1 (2015-12-27)

* [#283](https://github.com/httprb/http/pull/283):
  Use io/wait on supported platforms.
  ([@tarcieri])


## 1.0.0 (2015-12-25)

* [#265](https://github.com/httprb/http/pull/265/):
  Remove deprecations ([@tarcieri]):
  - HTTP::Chainable#with_follow (use #follow)
  - HTTP::Chainable#with, #with_headers (use #headers)
  - HTTP::Chainable#auth(:basic, ...) (use #basic_auth)
  - HTTP::Chainable#default_headers (use #default_options[:headers])
  - HTTP::Headers#append (use #add)
  - HTTP::Options#[] hash-like API deprecated in favor of explicit methods
  - HTTP::Request#request_header (use #headline)
  - HTTP::Response::STATUS_CODES (use HTTP::Status::REASONS)
  - HTTP::Response::SYMBOL_TO_STATUS_CODE (no replacement)
  - HTTP::Response#status_code (use #status or #code)
  - HTTP::Response::Status#symbolize (use #to_sym)

* [#269](https://github.com/httprb/http/pull/269/):
  Close connection in case of error during request.
  ([@ixti])

* [#271](https://github.com/httprb/http/pull/271/):
  High-level exception wrappers for low-level I/O errors.
  ([@ixti])

* [#273](https://github.com/httprb/http/pull/273/):
  Add encoding option.
  ([@connorhd])

* [#275](https://github.com/httprb/http/pull/275/):
  Support for disabling Nagle's algorithm with `HTTP.nodelay`.
  ([@nerdrew])

* [#276](https://github.com/httprb/http/pull/276)
  Use Encoding::BINARY as the default encoding for HTTP::Response::Body.
  ([@tarcieri])

* [#278](https://github.com/httprb/http/pull/278)
  Use an options hash for HTTP::Request initializer API.
  ([@ixti])

* [#279](https://github.com/httprb/http/pull/279)
  Send headers and body in one write if possible.
  This avoids a pathological case in Nagle's algorithm.
  ([@tarcieri])

* [#281](https://github.com/httprb/http/pull/281)
  Remove legacy 'Http' constant alias to 'HTTP'.
  ([@tarcieri])


65 66
## 0.9.8 (2015-09-29)

67
* [#260](https://github.com/httprb/http/pull/260):
68
  Fixed global timeout persisting time left across requests when reusing connections.
69 70
  ([@zanker])

71 72 73 74 75

## 0.9.7 (2015-09-19)

* [#258](https://github.com/httprb/http/pull/258):
  Unified strategy for handling exception-based and exceptionless non-blocking
76
  I/O. Fixes SSL support on JRuby 9000. ([@tarcieri])
77 78 79 80 81 82


## 0.9.6 (2015-09-06)

* [#254](https://github.com/httprb/http/pull/254):
  Removed use of an ActiveSupport specific method #present?
83
  ([@tarcieri])
84 85 86 87 88 89


## 0.9.5 (2015-09-06)

* [#252](https://github.com/httprb/http/pull/252):
  Fixed infinite hang/timeout when a request contained more than ~16,363 bytes.
90
  ([@zanker])
91 92 93 94 95 96


## 0.9.4 (2015-08-26)

* [#246](https://github.com/httprb/http/issues/246):
  Fixes regression when body streaming was failing on some URIs.
97
  ([@zanker])
98
* [#243](https://github.com/httprb/http/issues/243):
99
  Fixes require timeout statements. ([@ixti])
100 101 102 103 104


## 0.9.3 (2015-08-19)

* [#246](https://github.com/httprb/http/issues/246):
105
  Fixed request URI normalization. ([@ixti])
106 107 108 109 110 111
  - Avoids query component normalization
  - Omits fragment component in headline


## 0.9.2 (2015-08-18)

112
* Fixed exceptionless NIO EOF handling. ([@zanker])
113 114


115 116
## 0.9.1 (2015-08-14)

117
* [#246](https://github.com/httprb/http/issues/246):
118
  Fix params special-chars escaping. ([@ixti])
119 120 121 122


## 0.9.0 (2015-07-23)

123
* [#240](https://github.com/httprb/http/pull/240):
124
  Support for caching removed. ([@tarcieri])
125 126 127
* JRuby 9000 compatibility


128 129
## 0.8.14 (2015-08-19)

130
* Backport request URI normalization fixes from master. ([@ixti])
131 132 133 134


## 0.8.13 (2015-08-14)

135
* Backport params special-chars escaping fix from `v0.9.1`. ([@ixti])
136 137


138 139
## 0.8.12 (2015-05-26)

140
* Fix `HTTP.timeout` API (was loosing previously defined options). ([@ixti])
141 142 143 144


## 0.8.11 (2015-05-22)

145
* [#229](https://github.com/httprb/http/pull/229):
146
  SNI support for HTTPS connections. ([@tarcieri])
147
* [#227](https://github.com/httprb/http/pull/227):
148
  Use "http.rb" in the User-Agent string. ([@tarcieri])
149 150 151 152


## 0.8.10 (2015-05-14)

153
* Fix cookie headers generation. ([@ixti])
154 155 156 157


## 0.8.9 (2015-05-11)

158
* Add cookies support. ([@ixti])
159
* [#219](https://github.com/httprb/http/pull/219):
160
  Enforce stringified body encoding. ([@Connorhd])
161 162 163 164


## 0.8.8 (2015-05-09)

165
* [#217](https://github.com/httprb/http/issues/217):
166
  Fix CONNECT header for proxies. ([@Connorhd])
167 168 169 170


## 0.8.7 (2015-05-08)

171
* Fix `HTTP.timeout` API with options only given. ([@ixti])
172 173 174 175


## 0.8.6 (2015-05-08)

176
* [#215](https://github.com/httprb/http/pull/215):
177
  Reset global timeouts after the request finishes. ([@zanker])
178 179 180 181


## 0.8.5 (2015-05-06)

182
* [#205](https://github.com/httprb/http/issues/205):
183 184
  Add simple timeouts configuration API. ([@ixti])
* Deprecate `Request#request_header`. Use `Request#headline` instead. ([@ixti])
185 186 187 188


## 0.8.4 (2015-04-23)

189
* Deprecate `#default_headers` and `#default_headers=`. ([@ixti])
190
* [#207](https://github.com/httprb/http/issues/207):
191
  Deprecate chainable methods with `with_` prefix. ([@ixti])
192
* [#186](https://github.com/httprb/http/pull/186):
193
  Add support of HTTPS connections through proxy. ([@Connorhd])
194 195 196 197


## 0.8.3 (2015-04-07)

198
* [#206](https://github.com/httprb/http/issues/206):
199 200
  Fix request headline. ([@ixti])
* Remove deprecated `Request#__method__`. ([@ixti])
201 202 203 204


## 0.8.2 (2015-04-06)

205
* [#203](https://github.com/httprb/http/issues/203):
206 207
  Fix Celluloid::IO compatibility. ([@ixti])
* Cleanup obsolete code. ([@zanker])
208 209 210 211


## 0.8.1 (2015-04-02)

212
* [#202](https://github.com/httprb/http/issues/202):
213
  Add missing `require "resolv"`. ([@ixti])
214 215
* [#200](https://github.com/httprb/http/issues/200),
  [#201](https://github.com/httprb/http/pull/201):
216
  Add block-form `#persistent` calls. ([@ixti])
217 218 219 220


## 0.8.0 (2015-04-01)

221
* [#199](https://github.com/httprb/http/pull/199):
222
  Properly handle WaitWritable for SSL. ([@zanker])
223
* [#197](https://github.com/httprb/http/pull/197):
224
  Add support for non-ASCII URis. ([@ixti])
225 226 227
* [#187](https://github.com/httprb/http/pull/187),
  [#194](https://github.com/httprb/http/pull/194),
  [#195](https://github.com/httprb/http/pull/195):
228
  Add configurable connection timeouts. ([@zanker])
229
* [#179](https://github.com/httprb/http/pull/179):
230 231
  Refactor requests redirect following logic. ([@ixti])
* Support for persistent HTTP connections ([@zanker])
232 233
* [#77](https://github.com/httprb/http/issues/77),
  [#177](https://github.com/httprb/http/pull/177):
234
  Add caching support. ([@Asmod4n], [@pezra])
235 236
* [#176](https://github.com/httprb/http/pull/176):
  Improve servers used in specs boot up. Issue was initially raised up
237 238
  by [@olegkovalenko]. ([@ixti])
* Reflect FormData rename changes (FormData -> HTTP::FormData). ([@ixti])
239 240
* [#173](https://github.com/httprb/http/pull/173):
  `HTTP::Headers` now raises `HTTP::InvalidHeaderNameError` in case of
241
  (surprise) invalid HTTP header field name (e.g.`"Foo:Bar"`). ([@ixti])
242 243 244 245 246 247 248


## 0.7.3 (2015-03-24)

* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
  SSL connections. This method implements hostname verification, and without it
  `http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
249
  `#post_connection_check` (CVE-2015-1828) ([@zanker])
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264


## 0.7.2 (2015-03-02)

* Swap from `form_data` to `http-form_data` (changed gem name).


## 0.7.1 (2015-01-03)

* Gemspec fixups
* Remove superfluous space in HTTP::Response inspection


## 0.7.0 (2015-01-02)

265 266
* [#73](https://github.com/httprb/http/issues/73),
  [#167](https://github.com/httprb/http/pull/167):
267
  Add support of multipart form data. ([@ixti])
268
* Fix URI path normalization: `https://github.com` -> `https://github.com/`.
269
  ([@ixti])
270 271 272
* [#163](https://github.com/httprb/http/pull/163),
  [#166](https://github.com/httprb/http/pull/166),
  [#152](https://github.com/httprb/http/issues/152):
273 274
  Fix handling of EOF which caused infinite loop. ([@mickm], [@ixti])
* Drop Ruby 1.8.7 support. ([@ixti])
275
* [#150](https://github.com/httprb/http/issues/150):
276 277
  Fix default Host header value. ([@ixti])
* Remove BearerToken authorization header. ([@ixti])
278 279
* `#auth` sugar now accepts only string value of Authorization header.
  Calling `#auth(:basic, opts)` is deprecated, use `#basic_auth(opts)` instead.
280 281
  ([@ixti])
* Fix handling of chunked responses without Content-Length header. ([@ixti])
282
* Remove `HTTP::Request#method` and deprecate `HTTP::Request#__method__`
283
  ([@sferik])
284
* Deprecate `HTTP::Response::STATUS_CODES`,
285 286 287 288
  use `HTTP::Response::Status::REASONS` instead ([@ixti])
* Deprecate `HTTP::Response::SYMBOL_TO_STATUS_CODE` ([@ixti])
* Deprecate `HTTP::Response#status_code` ([@ixti])
* `HTTP::Response#status` now returns `HTTP::Response::Status`. ([@ixti])
289
* `HTTP::Response#reason` and `HTTP::Response#code` are proxies them
290
  to corresponding methods of `HTTP::Response#status` ([@ixti])
291
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
292 293
  deprecated ([@ixti])
* Delegate `HTTP::Response#readpartial` to `HTTP::Response::Body` ([@ixti])
294 295 296 297 298 299 300


## 0.6.4 (2015-03-25)

* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
  SSL connections. This method implements hostname verification, and without it
  `http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
301
  `#post_connection_check` (CVE-2015-1828) ([@zanker], backported by [@nicoolas25])
302 303 304 305


## 0.6.3 (2014-11-14)

306
* [#166](https://github.com/httprb/http/pull/166):
307
  Backported EOF fix from master branch. ([@ixti])
308 309 310


## 0.6.2 (2014-08-06)
311

312
* [#150](https://github.com/httprb/http/issues/150):
313 314 315
  Fix default Host header value. ([@ixti])
* Deprecate BearerToken authorization header. ([@ixti])
* Fix handling of chunked responses without Content-Length header. ([@ixti])
316
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
317
  deprecated ([@ixti])
318

319 320

## 0.6.1 (2014-05-07)
321

322 323 324 325 326 327
* Fix request `Content-Length` calculation for Unicode ([@challengee])
* Add `Response#flush` ([@ixti])
* Fix `Response::Body#readpartial` default size ([@hannesg], [@ixti])
* Add missing `CRLF` for chunked bodies ([@hannesg])
* Fix forgotten CGI require ([@ixti])
* Improve README ([@tarcieri])
328

329 330

## 0.6.0 (2014-04-04)
331

332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
* Rename `HTTP::Request#method` to `HTTP::Request#verb` ([@krainboltgreene])
* Add `HTTP::ResponseBody` class ([@tarcieri])
* Change API of response on `HTTP::Client.request` and "friends" (`#get`, `#post`, etc) ([@tarcieri])
* Add `HTTP::Response#readpartial` ([@tarcieri])
* Add `HTTP::Headers` class ([@ixti])
* Fix and improve following redirects ([@ixti])
* Add `HTTP::Request#redirect` ([@ixti])
* Add `HTTP::Response#content_type` ([@ixti])
* Add `HTTP::Response#mime_type` ([@ixti])
* Add `HTTP::Response#charset` ([@ixti])
* Improve error message upon invalid URI scheme ([@ixti])
* Consolidate errors under common `HTTP::Error` namespace ([@ixti])
* Add easy way of adding Authorization header ([@ixti])
* Fix proxy support ([@hundredwatt])
* Fix and improve query params handing ([@jwinter])
* Change API of custom MIME type parsers ([@ixti])
* Remove `HTTP::Chainable#with_response` ([@ixti])
* Remove `HTTP::Response::BodyDelegator` ([@ixti])
* Remove `HTTP::Response#parsed_body` ([@ixti])
* Bump up input buffer from 4K to 16K ([@tarcieri])
352 353 354 355 356 357 358 359 360 361 362 363 364

``` ruby
# Main API change you will mention is that `request` method and it's
# syntax sugar helpers like `get`, `post`, etc. now returns Response
# object instead of BodyDelegator:

response = HTTP.get "http://example.com"
raw_body = HTTP.get("http://example.com").to_s
parsed_body = HTTP.get("http://example.com/users.json").parse

# Second major change in API is work with request/response headers
# It is now delegated to `HTTP::Headers` class, so you can check it's
# documentation for details, here we will only outline main difference.
365
# Duckface (`=`) does not appends headers anymore
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391

request[:content_type] = "text/plain"
request[:content_type] = "text/html"
request[:content_type] # => "text/html"

# In order to add multiple header values, you should pass array:

request[:cookie] = ["foo=bar", "woo=hoo"]
request[:cookie] # => ["foo=bar", "woo=hoo"]

# or call `#add` on headers:

request.headers.add :accept, "text/plain"
request.headers.add :accept, "text/html"
request[:accept] # => ["text/plain", "text/html"]

# Also, you can now read body in chunks (stream):

res = HTTP.get "http://example.com"
File.open "/tmp/dummy.bin", "wb" do |io|
  while (chunk = res.readpartial)
    io << chunk
  end
end
```

392
[Changes discussion](https://github.com/httprb/http.rb/issues/116)
393

394 395

## 0.5.1 (2014-05-27)
396

397
* Backports redirector fixes from 0.6.0 ([@ixti])
398 399
* EOL of 0.5.X branch.

400 401 402

## 0.5.0 (2013-09-14)

403 404 405 406 407 408 409
* Add query string support
* New response delegator allows HTTP.get(uri).response
* HTTP::Chainable#stream provides a shorter alias for
  with_response(:object)
* Better string inspect for HTTP::Response
* Curb compatibility layer removed

410 411 412

## 0.4.0 (2012-10-12)

413 414 415 416 417
* Fix bug accessing https URLs
* Fix several instances of broken redirect handling
* Add default user agent
* Many additional minor bugfixes

418 419 420

## 0.3.0 (2012-09-01)

421 422 423 424 425
* New implementation based on tmm1's http_parser.rb instead of Net::HTTP
* Support for following redirects
* Support for request body through {:body => ...} option
* HTTP#with_response (through Chainable)

426 427 428

## 0.2.0 (2012-03-05)

429 430 431 432 433
* Request and response objects
* Callback system
* Internal refactoring ensuring true chainability
* Use the certified gem to ensure SSL certificate verification

434 435 436

## 0.1.0 (2012-01-26)

437 438 439
* Testing against WEBrick
* Curb compatibility (require 'http/compat/curb')

440 441 442

## 0.0.1 (2011-10-11)

443 444
* Initial half-baked release

445 446 447

## 0.0.0 (2011-10-06)

448
* Vapoware release to claim the "http" gem name >:D
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465


[@tarcieri]: https://github.com/tarcieri
[@zanker]: https://github.com/zanker
[@ixti]: https://github.com/ixti
[@Connorhd]: https://github.com/Connorhd
[@Asmod4n]: https://github.com/Asmod4n
[@pezra]: https://github.com/pezra
[@olegkovalenko]: https://github.com/olegkovalenko
[@mickm]: https://github.com/mickm
[@sferik]: https://github.com/sferik
[@nicoolas25]: https://github.com/nicoolas25
[@challengee]: https://github.com/challengee
[@hannesg]: https://github.com/hannesg
[@krainboltgreene]: https://github.com/krainboltgreene
[@hundredwatt]: https://github.com/hundredwatt
[@jwinter]: https://github.com/jwinter
466
[@nerdrew]: https://github.com/nerdrew