-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Using double quotes around etag in If-None-Match
changes content-type
in response
#5345
Comments
This seems relevant: localstack/localstack/services/s3/s3_listener.py Lines 650 to 664 in e471cda
The fix of the |
An additional observation - apparently, it's invalid to specify
|
Hi @p-himik and thanks for the report! Could you confirm you're not encountering the issue anymore with our |
Sorry, it'd be quite an effort to try it out as I've switched from Localstack to MinIO in my projects some time ago. |
I understand, thanks for the quick response! I'll quickly give it a try and if the reported issue seems resolved, I'll close the issue. Thanks again for the response! |
To come back to this issue, it seems now we don't return a ContentType at all anymore, surely due to the exception parsing with the 304. $ curl -v http://localhost:4566/etag-test/7n9ule.jpg --output /dev/null
* Connected to localhost (127.0.0.1) port 4566 (#0)
> GET /etag-test/7n9ule.jpg HTTP/1.1
> Host: localhost:4566
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200
< Content-Type: image/jpeg
< accept-ranges: bytes
< Last-Modified: Mon, 03 Jul 2023 08:18:15 GMT
< Content-Length: 62442
< ETag: "06a5d934b998d8923102c804caf5bf17"
< x-amz-request-id: c5698e57-52cb-4e63-b783-efa268f40930
< x-amz-id-2: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=
< Connection: close
< date: Mon, 03 Jul 2023 08:18:53 GMT
< server: hypercorn-h11
<
$ curl -H 'If-None-Match: "06a5d934b998d8923102c804caf5bf17"' -v http://localhost:4566/etag-test/7n9ule.jpg --output /dev/null
* Connected to localhost (127.0.0.1) port 4566 (#0)
> GET /etag-test/7n9ule.jpg HTTP/1.1
> Host: localhost:4566
> User-Agent: curl/7.88.1
> Accept: */*
> If-None-Match: "06a5d934b998d8923102c804caf5bf17"
>
< HTTP/1.1 304
< x-amz-request-id: fbc14dac-8ecc-4b44-9d10-b06dd9849ace
< x-amz-id-2: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=
< Connection: close
< date: Mon, 03 Jul 2023 08:20:53 GMT
< server: hypercorn-h11
< Also, we still accept no double quotes around the ETag. We will need to create an AWS validated test to see what headers are returned, and how we can improve parity here. |
Is there an existing issue for this?
Current Behavior
Using double quotes around etag in
If-None-Match
changescontent-type
in responseExpected Behavior
Double quotes around etag should not affect anything. In fact, they should be the only thing that works since double quotes around etag in
If-None-Match
are required.How are you starting LocalStack?
With a
docker run
commandSteps To Reproduce
How are you starting localstack (e.g.,
bin/localstack
command, arguments, ordocker-compose.yml
)Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Here's a diff of headers from [2] and [3] above:
Notice how some other headers have also changed or even disappeared.
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: