You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like changes to encodeUrl in 1.15.4 are causing URL double-encoding when redirected.
For example, the following exchange:
>>> GET /apostrophe-'
<<< 302 Moved
Location: /apostrophe-%27
In 1.15.3, this works, and the new path is followed correctly. In 1.15.4, the redirect URL ends up being double-encoded to /apostrophe-%2527 instead. Which then leads to errors like 404s.
While tracking this down, I also noticed that the redirect handling code in HttpConnection$Response#execute(HttpConnection.Request, Response) also makes a call to encodeUrl:
It looks like changes to
encodeUrl
in 1.15.4 are causing URL double-encoding when redirected.For example, the following exchange:
In 1.15.3, this works, and the new path is followed correctly. In 1.15.4, the redirect URL ends up being double-encoded to
/apostrophe-%2527
instead. Which then leads to errors like 404s.It seems to be this change:
jsoup-1.15.3...jsoup-1.15.4#diff-50cf357d24b529d8ec8ffd200e666d29cb8286c71733da1a27c9b32d1204d676
While tracking this down, I also noticed that the redirect handling code in
HttpConnection$Response#execute(HttpConnection.Request, Response)
also makes a call toencodeUrl
:This implies that any redirect which sends an already-encoded URL will get double-encoded.
The text was updated successfully, but these errors were encountered: