Comments (6)
I worked around this locally with the following changes in lib/fakes3/file_store.rb:
86c86
< real_obj.modified_date = metadata.fetch(:modified_date) { File.mtime(File.join(obj_root,"content")).iso8601() }
---
> real_obj.modified_date = metadata.fetch(:modified_date) { File.mtime(File.join(obj_root,"content")).utc.iso8601() }
166c166
< metadata_struct[:modified_date] = File.mtime(content).iso8601()
---
> metadata_struct[:modified_date] = File.mtime(content).utc.iso8601()
from fake-s3.
Great job!
from fake-s3.
I have the problem that I always get a ISO8601 formatted date, but sometimes the AWS Java SDK required a RFC822 formatted date:
https://github.com/aws/aws-sdk-java/blob/4a67bca8f1c6d5cf80a112f82d5d3a3967ebcdaf/src/main/java/com/amazonaws/services/s3/internal/AbstractS3ResponseHandler.java#L115
But usually ISO8601 is needed:
https://github.com/aws/aws-sdk-java/blob/4a67bca8f1c6d5cf80a112f82d5d3a3967ebcdaf/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java#L596
Can anyone explain to me what might be wrong here?
from fake-s3.
Dates which are HTTP header values need to follow RFC 822 as modified by RFC 1123 (spec). Dates which are XML DateTimes need to follow the XML format, which is "inspired by ISO 8601" (spec).
from fake-s3.
So, is fakes3 following that rule?
from fake-s3.
I believe that as of commit 3e2f69e fake-s3 is formatting the Last-Modified HTTP header correctly. Note that as of this writing, the latest release is v0.1.5.2 which does not contain the fix, so to get properly formatted Last-Modified header you have to check out from master.
I haven't verified the XML formatting done by fake-s3.
from fake-s3.
Related Issues (20)
- [Feature] Add support of payer option, to allow usage with ansible s3_bucket library
- fakes3 error
- [Bug] Error message "undefined method `gsub' for nil:NilClass" when attempting to store something.
- [Bug] Multipart Upload Fails for Large Files
- Incorrect behavior when using Prefix HOT 1
- [Other] LoadError: load error: jopenssl/load -- java.lang.IncompatibleClassChangeError: Implementing class
- [Bug] X-Amz-Content-Sha256 is not allowed for upload
- [Feature] Multipart upload more descriptive error message for uploading one part HOT 2
- License timebomb should be a major version HOT 3
- [Question] Next release? HOT 1
- [Feature] Support GET Bucket requestPayment
- [QUESTION] Where I can find the CI service? HOT 1
- [Bug] Deleting "fake" directories
- [Bug] Licensing does not work for certain valid email addresses HOT 5
- [Bug] Cannot upload files with size > 2GB
- [Question]: Are files actually created when uploading or is file creation simulated?
- [Bug] Prevent directory traversal
- "rake test_sever" not working in windows. is there any way to resolve this ? HOT 1
- Ruby 3.1 compatibility HOT 1
- [Feature] Support for AWS v3 SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-s3.