Giter Club home page Giter Club logo

Comments (12)

aristidb avatar aristidb commented on July 18, 2024

Can you use Wireshark or another connection logger? If so, please switch to the debug service configuration of S3 (using debugConfiguration instead of defaultConfiguration, if you're using aws 0.6.)

Log the request and response, and please attach them (or the relevant bits.) Of course after censoring your credentials.

Alternatively, if you use the git version of aws, then I've just now added code to show the "invalid" value of Last-Modified.

from aws.

aristidb avatar aristidb commented on July 18, 2024

Note that S3 get requests work just fine for me, at least on the objects I've tested.

from aws.

pheaver avatar pheaver commented on July 18, 2024

Ah, didn't realize it would be that simple to get some debugging output.

from aws.

pheaver avatar pheaver commented on July 18, 2024

I used the latest version of 'aws' from git, and the error message was:

Invalid Last-Modified: Sat, 04 Aug 2012 00:41:20 GMT

But I parsed this timestamp manually in ghci and it worked fine:

> parseTime defaultTimeLocale "%a, %_d %b %Y %H:%M:%S GMT" "Sat, 04 Aug 2012 00:41:20 GMT" :: Maybe UTCTime

Just 2012-08-04 00:41:20 UTC

So, I'm quite confused!

from aws.

pheaver avatar pheaver commented on July 18, 2024

Aha! Our application is built using ghc 7.0.4, which includes time-1.2.0.3.

When I ran the test from ghci, I was doing it on a different machine that had a newer ghc and time-1.4. So, the bug shows up with time-1.2.0.3 but not time-1.4.

from aws.

pheaver avatar pheaver commented on July 18, 2024

Upgrading the time library isn't entirely feasible for us, and it would be nice if things worked for other people without upgrading the time library. I'll try to dig deeper to find the real cause of the parse failure and see if maybe there is a tweak to the format string that will allow time-1.2 to work.

from aws.

pheaver avatar pheaver commented on July 18, 2024

Ok, it works with time-1.2.0.3 if I use this format string:

%a, %d %b %Y %H:%M:%S GMT

(I took out the underscore in front of the d)

from aws.

aristidb avatar aristidb commented on July 18, 2024

Does 8db3a57 fix things?

from aws.

pheaver avatar pheaver commented on July 18, 2024

9828b45 is broken for me, because <> is not in scope.

from aws.

pheaver avatar pheaver commented on July 18, 2024

I cherry-picked 8db3a57 and yes it fixes the problem for me. Thanks!

from aws.

aristidb avatar aristidb commented on July 18, 2024

Oh, I didn't remember that (<>) was not yet in GHC 7.0. It's just an alias for mappend, I'll just use mappend (which sadly makes the code less beautiful! Oh cruel world.)

from aws.

pheaver avatar pheaver commented on July 18, 2024

The current version of master (505184c) builds on ghc 7.0.4 and correctly parses my object timestamps. Thanks.

from aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.