Skip to content

Commit 2cd06a4

Browse files
committed
Add history note for cookies in redirection.
1 parent 00e3358 commit 2cd06a4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

history.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,20 @@ This release is largely API compatible, but makes several breaking changes.
4848
Set-Cookie, which is special) by joining the values with a comma space,
4949
compliant with RFC 7230
5050
- Rewrite cookie support to be much smarter and to use cookie jars consistently
51+
for requests, responses, and redirection (resolving long-standing complaints
52+
about the previously broken behavior):
5153
- The `:cookies` option may now be a Hash of Strings, an Array of
5254
HTTP::Cookie objects, or a full HTTP::CookieJar.
5355
- Add `RestClient::Request#cookie_jar` and reimplement `Request#cookies` to
5456
be a wrapper around the cookie jar.
5557
- Still support passing the `:cookies` option in the headers hash, but now
5658
raise ArgumentError if that option is also passed to `Request#initialize`.
5759
- Warn if both `:cookies` and a `Cookie` header are supplied.
60+
- Use the `Request#cookie_jar` as the basis for `Response#cookie_jar`,
61+
creating a copy of the jar and adding any newly received cookies.
62+
- When following redirection, also use this same strategy so that cookies
63+
from the original request are carried through in a standards-compliant way
64+
by the cookie jar.
5865
- Don't set basic auth header if explicit `Authorization` header is specified
5966
- Add `:proxy` option to requests, which can be used for thread-safe
6067
per-request proxy configuration, overriding `RestClient.proxy`

0 commit comments

Comments
 (0)