This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make cleanUrl non-static so that APIs can overwrite it (#614)
cleanUrl replaces missing values in key-value-pairs with an empty string so that ?param&... becomes ?param=&... . This may lead to problems in some cases (e.g. at SLUBApi when resolving libero references in getDetailById). Even it we'd replace the "" by null in the else branch of the current implementation, a trailing = will still be be added by URLEncodedUtils.format, as Android uses httpclient-android version 4.3.5.1 which has a bug to add a trailing = sign to key-only parameters by replacing missing parameters with empty strings the same way clearUrl does (versions 4.5 and newer work correctly but can't be used by Android, see also https://hc.apache.org/httpcomponents-client-4.5.x/android.html. To avoid this we make cleanUrl non-static so that APIs can overwrite it with their own version as needed.
- Loading branch information