-
#468 Rewind
HTTP::Request::Body#source
once#each
is complete. (@ixti) -
#436 Raise ConnectionError when writing to socket fails. (@janko-m)
-
#451 Reduce memory usage when reading response body. (@janko-m)
-
#462 Fix HTTP::Request#headline to allow two leading slashes in path. (@scarfacedeb)
-
#454 #464 #384 Fix #readpartial not respecting max length argument. (@janko-m, @marshall-lee)
This version backports some of the fixes and improvements made to development version of the HTTP gem:
This version backports one change we missed to backport in previous release:
- Reduce memory usage when reading response body (@janko-m)
This version backports some of the fixes and improvements made to development version of the HTTP gem:
-
Fix for
#readpartial
to respect max length argument. (@janko-m, @marshall-lee) -
Fix for
HTTP::Request#headline
to allow two leading slashes in path. (@scarfacedeb) -
Fix query string building for string with newlines. (@mikegee)
-
Deallocate temporary strings in
Response::Body#to_s
. (@janko-m) -
Add
Request::Body#source
. (@janko-m)
-
Drop support of Ruby
2.0
and Ruby2.1
. (@ixti) -
#409 Enables request body streaming on any IO object. (@janko-m)
-
#368, #357 Fix timeout issue. (@HoneyryderChuck)
-
#362 connect_ssl uses connect_timeout (Closes #359) ([@TiagoCardoso1983])
-
#335, #360 Set
Content-Length: 0
header fornil
bodies. (@britishtea)
-
#341 Refactor some string manipulations so they are more performant (up to 3-4x faster) and more concise. (@tonyta)
-
#339 Always use byte methods when writing/slicing the write buffer. (@zanker)
-
#333 Fix HTTPS request headline when sent via proxy. (@Connorhd)
-
#331 Add
#informational?
,#success?
,#redirect?
,#client_error?
and#server_error?
helpers toResponse::Status
. (@mwitek) -
#330 Support custom CONNECT headers (request/response) during HTTPS proxy requests. (@smudge)
-
#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: Close connection in case of error during request. (@ixti)
-
#271: High-level exception wrappers for low-level I/O errors. (@ixti)
-
#275: Support for disabling Nagle's algorithm with
HTTP.nodelay
. (@nerdrew) -
#276 Use Encoding::BINARY as the default encoding for HTTP::Response::Body. (@tarcieri)
-
#278 Use an options hash for HTTP::Request initializer API. (@ixti)
-
#279 Send headers and body in one write if possible. This avoids a pathological case in Nagle's algorithm. (@tarcieri)
-
#281 Remove legacy 'Http' constant alias to 'HTTP'. (@tarcieri)
-
BACKPORT #318 Remove redundant string allocations upon header names normalization. (@ixti)
-
BACKPORT #295: Fix redirect following when used with persistent mode. (@ixti)
- #258: Unified strategy for handling exception-based and exceptionless non-blocking I/O. Fixes SSL support on JRuby 9000. (@tarcieri)
- #246: Fixes regression when body streaming was failing on some URIs. (@zanker)
- #243: Fixes require timeout statements. (@ixti)
- #246:
Fixed request URI normalization. (@ixti)
- Avoids query component normalization
- Omits fragment component in headline
- Fixed exceptionless NIO EOF handling. (@zanker)
- Backport request URI normalization fixes from master. (@ixti)
- Backport params special-chars escaping fix from
v0.9.1
. (@ixti)
- Fix
HTTP.timeout
API (was loosing previously defined options). (@ixti)
- #229: SNI support for HTTPS connections. (@tarcieri)
- #227: Use "http.rb" in the User-Agent string. (@tarcieri)
- Fix cookie headers generation. (@ixti)
- Fix
HTTP.timeout
API with options only given. (@ixti)
- #205: Add simple timeouts configuration API. (@ixti)
- Deprecate
Request#request_header
. UseRequest#headline
instead. (@ixti)
- Deprecate
#default_headers
and#default_headers=
. (@ixti) - #207:
Deprecate chainable methods with
with_
prefix. (@ixti) - #186: Add support of HTTPS connections through proxy. (@Connorhd)
- #199: Properly handle WaitWritable for SSL. (@zanker)
- #197: Add support for non-ASCII URis. (@ixti)
- #187, #194, #195: Add configurable connection timeouts. (@zanker)
- #179: Refactor requests redirect following logic. (@ixti)
- Support for persistent HTTP connections (@zanker)
- #77, #177: Add caching support. (@Asmod4n, @pezra)
- #176: Improve servers used in specs boot up. Issue was initially raised up by @olegkovalenko. (@ixti)
- Reflect FormData rename changes (FormData -> HTTP::FormData). (@ixti)
- #173:
HTTP::Headers
now raisesHTTP::InvalidHeaderNameError
in case of (surprise) invalid HTTP header field name (e.g."Foo:Bar"
). (@ixti)
- SECURITY FIX: http.rb failed to call the
#post_connection_check
method on SSL connections. This method implements hostname verification, and without ithttp.rb
was vulnerable to MitM attacks. The problem was corrected by calling#post_connection_check
(CVE-2015-1828) (@zanker)
- Swap from
form_data
tohttp-form_data
(changed gem name).
- Gemspec fixups
- Remove superfluous space in HTTP::Response inspection
- #73, #167: Add support of multipart form data. (@ixti)
- Fix URI path normalization:
https://github.com
->https://github.com/
. (@ixti) - #163, #166, #152: Fix handling of EOF which caused infinite loop. (@mickm, @ixti)
- Drop Ruby 1.8.7 support. (@ixti)
- #150: Fix default Host header value. (@ixti)
- Remove BearerToken authorization header. (@ixti)
#auth
sugar now accepts only string value of Authorization header. Calling#auth(:basic, opts)
is deprecated, use#basic_auth(opts)
instead. (@ixti)- Fix handling of chunked responses without Content-Length header. (@ixti)
- Remove
HTTP::Request#method
and deprecateHTTP::Request#__method__
(@sferik) - Deprecate
HTTP::Response::STATUS_CODES
, useHTTP::Response::Status::REASONS
instead (@ixti) - Deprecate
HTTP::Response::SYMBOL_TO_STATUS_CODE
(@ixti) - Deprecate
HTTP::Response#status_code
(@ixti) HTTP::Response#status
now returnsHTTP::Response::Status
. (@ixti)HTTP::Response#reason
andHTTP::Response#code
are proxies them to corresponding methods ofHTTP::Response#status
(@ixti)- Rename
HTTP.with_follow
toHTTP.follow
and mark former one as being deprecated (@ixti) - Delegate
HTTP::Response#readpartial
toHTTP::Response::Body
(@ixti)
- SECURITY FIX: http.rb failed to call the
#post_connection_check
method on SSL connections. This method implements hostname verification, and without ithttp.rb
was vulnerable to MitM attacks. The problem was corrected by calling#post_connection_check
(CVE-2015-1828) (@zanker, backported by @nicoolas25)
- #150: Fix default Host header value. (@ixti)
- Deprecate BearerToken authorization header. (@ixti)
- Fix handling of chunked responses without Content-Length header. (@ixti)
- Rename
HTTP.with_follow
toHTTP.follow
and mark former one as being deprecated (@ixti)
- 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)
- Rename
HTTP::Request#method
toHTTP::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)
# 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 "https://example.com"
raw_body = HTTP.get("https://example.com").to_s
parsed_body = HTTP.get("https://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.
# Duckface (`=`) does not appends headers anymore
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 "https://example.com"
File.open "/tmp/dummy.bin", "wb" do |io|
while (chunk = res.readpartial)
io << chunk
end
end
- Backports redirector fixes from 0.6.0 (@ixti)
- EOL of 0.5.X branch.
- 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
- Fix bug accessing https URLs
- Fix several instances of broken redirect handling
- Add default user agent
- Many additional minor bugfixes
- 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)
- Request and response objects
- Callback system
- Internal refactoring ensuring true chainability
- Use the certified gem to ensure SSL certificate verification
- Testing against WEBrick
- Curb compatibility (require 'http/compat/curb')
- Initial half-baked release
- Vapoware release to claim the "http" gem name >:D