-
Notifications
You must be signed in to change notification settings - Fork 864
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
S3 Expires Header throws AmazonUnmarshallingException #253
Comments
This could be an S3 bug as 12/31/2057 is a Monday. |
Do you know how the Expires header was set on the object in the first place? S3 will accept any header value, which it will then return, so I believe the issue is with the code that initially set this header to the invalid value in the first place. |
This is a duplicate of an earlier issue - #202 |
I found the code which is making this mess. It is some internal s3 code which was written prior to adopting this sdk. Would it make sense to return the partially parsed response object with the exception so it can be used to fix the issue? Feel free to close this if not. |
We are considering a solution where we would return a partial response in case we are not able to parse certain headers. I'll update this issue when we implement this fix. |
There is a fix available for this in the latest version of the S3 SDK (3.1.3.3). The SDK will lazily parse the Expires header only when GetObjectMetadataResponse.Expires or GetObjectResponse.Expires property is accessed. The property will throw an AmazonDateTimeUnmarshallingException if the response contains an Expires header with an invalid value. |
I still face this issue even in the latest versions of dll If i put an object today (5th oct 2017) in the bucket and set the lifecycle policy of bucket as Now when i try to get the object or get the header of object then i get AmazonUnmarshallingException - The string was not recognized as a valid DateTime error. Here is the code i am using to set LifecycleRule PutLifecycleConfigurationRequest lifecycleConfigurationRequest = new PutLifecycleConfigurationRequest() |
We are facing the same issue. |
Can confirm this issue still exists |
Re-opening this issue so we don't lose track of it. We're investigating a fix internally, it requires coordination with the other SDKs and S3. |
Since S3 will accept any header value, which it will then return and might cause the parsing exception, we've added a new property |
Comments on closed issues are hard for our team to see. |
I am getting back the following header during a HEAD request to S3:
This causes:
This appears to be the issue:
https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectMetadataResponseUnmarshaller.cs#L83
I can reproduce with the following test case:
The text was updated successfully, but these errors were encountered: