nginx-s3-gateway icon indicating copy to clipboard operation
nginx-s3-gateway copied to clipboard

400 Bad Request Response when File contains spaces.

Open NicoGartmann opened this issue 1 year ago • 2 comments

Describe the bug We have an HTML file with spaces in an S3 bucket. When we try to access it, NGINX reports a 400 - Bad Request. In the logs of the nginx-s3-gateway pod, we could see that the request is sent to NGINX encoded. However, it looks like the encoding is removed again at proxy_pass

To Reproduce Steps to reproduce the behavior:

  1. Put a HTML File in a AWS S3 Bucket containing spaces.
  2. Try to access it through nginx-s3-gateway

Expected behavior We expect the file to be delivered.

Your environment

  • Version of the container used (if downloaded from Docker Hub or Github) - nginxinc/nginx-s3-gateway:latest-20221216
  • S3 backend implementation you are using (AWS, Ceph, NetApp StorageGrid, etc) - AWS
  • How you are deploying Docker/Stand-alone, etc - K8S Deployment

Additional context

2024/02/27 10:43:45 [info] 76#76: *168 client sent invalid request while reading client request line, client: 10.0.0.0, server: , request: "GET /scorm/5f1b1eb1/Lernmodul 5 - Fußleisten anbringen.html HTTP/1.0"
10.0.0.0 - - [27/Feb/2024:10:43:45 +0000] "GET /scorm/5f1b1eb1/Lernmodul 5 - Fu\xC3\x9Fleisten anbringen.html HTTP/1.0" 400 150 "-" "-" 0 0.000 - - - -

NicoGartmann avatar Feb 27 '24 14:02 NicoGartmann