-
Notifications
You must be signed in to change notification settings - Fork 15
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
CloudwatchException triggered by default content-type header #55
Comments
This looks interesting. Thanks for reporting. Do you know what the expected content-type this request has or what is expected? |
So it didn't seem that there was a content-type defined in the original request so I just changed the default to
Which seems to be the default when using a bytestream entity and it started working. Not sure if that is a general enough solution though. |
Thanks for the investigation. I remembered that there were some different behaviors between the aws standard http client and how Akka-http works with headers, especially with request signing in the mix. I will investigate more, if using |
@AdrianMF I looked a bit more at this issue. Until now, I was not able to reproduce it on my side. Does the error happen for every request or was it more like a one off request? If yes, do you know what was maybe "special" for this failing request? Also, I found out that the request use |
So I think its a specific request to Cloudwatch, we are doing some Kinesis streams with the AWS API and when it tries to make a request to cloudwatch, the original request doesn't include a content-type so the fallback is application/x-www-form-urlencoded and that is what causes the error because the request include URL query params. I guess AWS is validating the content-type against the URL params. Unfortunately I'm not sure I can easily hook into the original request to add a content-type |
@AdrianMF I just released v0.0.10 of the library with the fallback |
Looks like when Cloudwatch is trying to POST some metrics it fails because the default content-type is set to
application/x-www-form-urlencoded
.This is a
POST
tohttps://monitoring.us-west-2.amazonaws.com?Action=PutMetricData&Version=2010-08-...
Seems to fall through this code with the final
None
condition:The text was updated successfully, but these errors were encountered: