Redirect handling and GenericUrl not woriking well together (resulting in 404) when redirected to any URL with a path containing the '+' character #296
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
When handling redirects for GET requests, the next request is made with an GenericUrl instance constructed from the value of the Location header like this: new GenericUrl(url.toURL(redirectLocation)). If redirectLocation contains a '+' character in the path it effectively gets converted to a space and encoded as %20 which breaks the URL. This is a rather big issue trying to work Google+. In my opinion the root of the problem is the toPathParts method in GenericUrl which uses CharEscapers.decodeUri on each part despite of its documentation which states it should not be used on path because it replaces '+' with ' '.
The text was updated successfully, but these errors were encountered: