-
Notifications
You must be signed in to change notification settings - Fork 202
Description
We are using elasticmq (thanks!) for testing and development and are currently in the process to migrate from the java sdk 1.0 to the clojure lib aws-api.
I noticed a new error in development. When trying to delete messages I get a Invalid request: UnacceptedResponseContentTypeRejection(Set(ContentType(none/none))). I wasn't hardly able to find any info about this exception, but as far I can see, it's not an issue with our new client or our usage with it, since the type mentions a ResponseContentType and we don't see this in production against AWS SQS. Other operations like ReceiveMessage are working fine.
I used mitmproxy to analyze the requests. Here the "good" request/response when using the java SDK 1.0 (had to change the port of the queue url to 8080 to send it to mitmproxy):
POST /000000000000/temp-local-dev-notifications.fifo HTTP/1.1
Host: localhost:9324
amz-sdk-invocation-id: 499e9e38-c287-b5f2-e46a-8477052ea3ce
amz-sdk-request: ttl=20240724T095525Z;attempt=1;max=4
amz-sdk-retry: 0/0/500
Authorization: <redacted>
Content-Type: application/x-amz-json-1.0
User-Agent: aws-sdk-java/1.12.722 Linux/6.5.0-44-generic OpenJDK_64-Bit_Server_VM/21.0.2+13-58 java/21.0.2 clojure/1.11.2 kotlin/1.9.10 vendor/Oracle_Corporation cfg/retry-mode/legacy cfg/auth-source#unknown
X-Amz-Date: 20240724T095435Z
X-Amz-Security-Token: <redacted>
X-Amz-Target: AmazonSQS.DeleteMessage
Content-Length: 175
Connection: Keep-Alive
{"QueueUrl":"http://localhost:8080/000000000000/temp-local-dev-notifications.fifo","ReceiptHandle":"ba65d750-fad8-4dd7-accd-b12fe5096067#0db46b72-7758-46e9-9328-16fb43084d7b"}
HTTP/1.1 200 OK
Server: pekko-http/1.0.1
Date: Wed, 24 Jul 2024 09:54:34 GMT
Content-Length: 0
Here the "bad" one from aws-api:
POST / HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/<redacted>
x-amz-date: 20240724T080725Z
x-amz-target: AmazonSQS.DeleteMessage
Content-Type: application/x-amz-json-1.0
Accept: application/json
Host: localhost:9324
x-amz-security-token: <redacted>
Authorization: <redacted>
Content-Length: 179
{"QueueUrl":"http:\/\/localhost:9324\/000000000000\/temp-local-dev-notifications.fifo","ReceiptHandle":"db79207f-af2f-4185-868c-177fdfbcea8a#f8f32507-1764-49d5-b209-5566bc9921cc"}
HTTP/1.1 400 Bad Request
Server: pekko-http/1.0.1
Date: Wed, 24 Jul 2024 08:07:25 GMT
Content-Type: application/json
Content-Length: 141
{"Message":"Invalid request: UnacceptedResponseContentTypeRejection(Set(ContentType(none/none)))","__type":"com.amazonaws.sqs#InvalidAction"}