-
#695 Revert DNS resolving feature. (@PhilCoggins)
-
#684 Don't set Content-Length for GET, HEAD, DELETE, or CONNECT requests without a BODY. (@jyn514)
-
#678 Restore
HTTP::Response:urioption for backwards compatibility. (@schwern) -
#676 Update addressable because of CVE-2021-32740. (@matheussilvasantos)
-
#638 DNS failover handling. (@midnight-wonderer)
-
#670 Revert
Response#parsebehavior introduced in [#540]. (@DannyBen) -
#669 Prevent bodies from being resubmitted when following unsafe redirects. (@odinhb)
-
#656 Handle connection timeouts in
Features(@semenyukdmitry) -
#632 Respect the SSL context's
verify_hostnamevalue (@colemannugent) -
#625 Fix inflator with empty responses (@LukaszMaslej)
-
#599 Allow passing
HTTP::FormData::{Multipart,UrlEncoded}object directly. (@ixti) -
#587 #585 Fix redirections when server responds with multiple Location headers. (@ixti)
-
#577 Fix
Chainable#timeoutwith frozen Hash. (@antonvolkoff) -
#576 #524 BREAKING CHANGE Preserve header names casing. (@joshuaflanagan)
-
#540 #538 BREAKING CHANGE Require explicit MIME type for Response#parse (@ixti)
-
#506 #521 Skip auto-deflate when there is no body. (@Bonias)
-
#546 BREAKING CHANGE Provide initiating
HTTP::Requestobject onHTTP::Response. (@joshuaflanagan) -
3ed0c31 Drop Ruby 2.4.x support.
-
Backport #587 Fix redirections when server responds with multiple Location headers. (@ixti)
-
Backport #599 Allow passing HTTP::FormData::{Multipart,UrlEncoded} object directly. (@ixti)
- Add
HTTP::Headers::ACCEPT_ENCODINGconstant. (@ixti)
- #533 Add URI normalizer feature that allows to swap default URI normalizer. (@mamoonraja)
-
Fix missing URL in response wrapped by auto inflate. (@ixti)
-
Provide
HTTP::Request#inspectmethod for debugging purposes. (@ixti)
- #515
Fix
#build_requestand#requestto respect default options. (@RickCSong)
-
#482 #499 Introduce new features injection API with 2 new feaures: instrumentation (compatible with ActiveSupport::Notification) and logging. (@paul)
-
#468 Rewind
HTTP::Request::Body#sourceonce#eachis 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
#readpartialto respect max length argument. (@janko-m, @marshall-lee) -
Fix for
HTTP::Request#headlineto 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.0and 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: 0header fornilbodies. (@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.timeoutAPI (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.timeoutAPI with options only given. (@ixti)
- #205: Add simple timeouts configuration API. (@ixti)
- Deprecate
Request#request_header. UseRequest#headlineinstead. (@ixti)
- Deprecate
#default_headersand#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::Headersnow raisesHTTP::InvalidHeaderNameErrorin case of (surprise) invalid HTTP header field name (e.g."Foo:Bar"). (@ixti)
- SECURITY FIX: http.rb failed to call the
#post_connection_checkmethod on SSL connections. This method implements hostname verification, and without ithttp.rbwas vulnerable to MitM attacks. The problem was corrected by calling#post_connection_check(CVE-2015-1828) (@zanker)
- Swap from
form_datatohttp-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)
#authsugar 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#methodand deprecateHTTP::Request#__method__(@sferik) - Deprecate
HTTP::Response::STATUS_CODES, useHTTP::Response::Status::REASONSinstead (@ixti) - Deprecate
HTTP::Response::SYMBOL_TO_STATUS_CODE(@ixti) - Deprecate
HTTP::Response#status_code(@ixti) HTTP::Response#statusnow returnsHTTP::Response::Status. (@ixti)HTTP::Response#reasonandHTTP::Response#codeare proxies them to corresponding methods ofHTTP::Response#status(@ixti)- Rename
HTTP.with_followtoHTTP.followand mark former one as being deprecated (@ixti) - Delegate
HTTP::Response#readpartialtoHTTP::Response::Body(@ixti)
- SECURITY FIX: http.rb failed to call the
#post_connection_checkmethod on SSL connections. This method implements hostname verification, and without ithttp.rbwas 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_followtoHTTP.followand mark former one as being deprecated (@ixti)
- Fix request
Content-Lengthcalculation for Unicode (@challengee) - Add
Response#flush(@ixti) - Fix
Response::Body#readpartialdefault size (@hannesg, @ixti) - Add missing
CRLFfor chunked bodies (@hannesg) - Fix forgotten CGI require (@ixti)
- Improve README (@tarcieri)
- Rename
HTTP::Request#methodtoHTTP::Request#verb(@krainboltgreene) - Add
HTTP::ResponseBodyclass (@tarcieri) - Change API of response on
HTTP::Client.requestand "friends" (#get,#post, etc) (@tarcieri) - Add
HTTP::Response#readpartial(@tarcieri) - Add
HTTP::Headersclass (@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::Errornamespace (@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 "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.
# 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 "http://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