Skip to content

Upgrading httparty 0.24 to 0.25

Breaking0.24.4 → 0.25.1Breaking2Security3New1Changed2Fixed7Other5

BreakingUpgrade verdict

2 breaking changes and 3 security fixes.

  • If you ask for an empty path, the library no longer adds a slash at the end of the URL, so some servers that rejected the extra slash now work.
  • When a server redirects to a relative address, the client now follows it relative to the page it came from, like browsers do, instead of jumping to the site root.
  • Your login credentials are no longer sent to a different website if a server redirects your request there.
  • Cookies are no longer passed to a different site when a redirect sends you there, so a session cookie cannot leak to another host.
5 items need code or config changes
Breaking2
Empty, query-only and fragment-only request paths now request the base_uri as-is instead of adding a trailing slash.
base_uriget
Relative redirect Location headers now resolve against the URL that redirected instead of the site root.
LocationHTTParty::RedirectionTooDeep
Security3
Stops Authorization headers, basic_auth and digest_auth from following redirects to another scheme, host or port.
Authorizationbasic_authdigest_auth
Stops cookies from headers, the cookies option, class-level cookies and Set-Cookie from following redirects to another origin.
cookiesSet-CookieDomain
Escapes control characters, quotes and backslashes in the request path in ApacheFormatter to prevent log forging.
ApacheFormatter