Skip to content

Commit

Permalink
SharedHttpCacheStorage doesn't resolve redirect correctly if the uri
Browse files Browse the repository at this point in the history
that is given isn't normalized #2666

make sure taht the incoming uri param is normalized when used further
up. This way it is not an extra redirect (so there are 2 redirects to
the final source)
  • Loading branch information
jcompagner committed Jul 28, 2023
1 parent 713fe84 commit 07776d0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ protected boolean removeEldestEntry(final Map.Entry<File, CacheLine> eldest) {
* if the URI is know to be not found
*/
@Override
public CacheEntry getCacheEntry(URI uri, Logger logger) throws FileNotFoundException {
public CacheEntry getCacheEntry(URI uriParam, Logger logger) throws FileNotFoundException {
URI uri = uriParam.normalize();
CacheLine cacheLine = getCacheLine(uri);
if (!cacheConfig.isUpdate()) { // if not updates are forced ...
int code = cacheLine.getResponseCode();
Expand Down

0 comments on commit 07776d0

Please sign in to comment.