nginxinc / nginx-s3-gateway

NGINX S3 Caching Gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duplicate query parameters

katrinaaquino1 opened this issue · comments

Describe the bug
An extra set of query parameters is added to the URL

To Reproduce
Steps to reproduce the behavior:

  1. Start container with APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=true, ALLOW_DIRECTORY_LIST=false, PROVIDE_INDEX_PAGE=true, and an index.html file at /test/index.html
  2. Run container and navigate to /test?a=asd
  3. index.html loads but URL is updated to /test/?a=asd?a=asd

Expected behavior
The index.html page loads and the URL remains /test?a=asd or updates to /test/?a=asd

Your environment
Using the most recent version of the master branch - 0cdacac
Running the container using the included Dockerfile.oss file on localhost
Using AWS S3 as a backend

Additional context
I noticed the duplication only happens when navigating to /test?a=asd, but not /test/?a=asd or /test/index.html?a=asd

Thank you for your report @katrinaaquino1 I will investigate this one this week

Hi @katrinaaquino1 I discovered the source of the bug and have a PR up to fix it here #209

Would you be able to give it a test with your use case before I merge it? There are not any images pushed at the moment but if you have the ability to build and test it against your use case it would be appreciated.

@4141done This fix works for my use case. Thanks!

@katrinaaquino1 Thank you again for reporting this bug. The fix has been merged and new versions of the docker image with the fix are available on github packages and docker hub. Sorry for any inconvenience it may have caused 🙏

GH Packages: https://github.com/nginxinc/nginx-s3-gateway/pkgs/container/nginx-s3-gateway%2Fnginx-oss-s3-gateway/176123712?tag=latest-20240207

Dockerhub: https://hub.docker.com/layers/nginxinc/nginx-s3-gateway/latest-20240207/images/sha256-1cefcddd07a1154dfbc2e0ea3b603c1a824a0f197f4d060aa99c6224e680ac3f?context=explore

Please feel free to reopen this issue of the problem persists.