Git Product home page Git Product logo

s3server's Introduction

Joel Christner

Thank you for visiting my Github profile. I'm an open source developer and member of the .NET Foundation focused on distributed systems, data storage, information search and retrieval, data management, and messaging. Outside of coding, I'm a husband, father to two wonderful children, a Brazilian Jiu Jitsu black belt, and a musician.

If you've found value in the software I've published and wish to support me, please consider sponsoring me on Github or buying me a coffee.

s3server's People

Contributors

jchristn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

s3server's Issues

Invalid DateTime format string

The src/S3Server/Constants.cs contains line 9
internal static string AmazonTimestampFormatVerbose = "ddd, dd MMM yyy HH:mm:ss GMT";
which should be
internal static string AmazonTimestampFormatVerbose = "ddd, dd MMM yyy HH:mm:ss 'GMT'";
in order avoid an unneeded substitution of M in GMT as a month number.

Format exception when using AmazonTimestampFormatVerbose

I have some integrationtests that is using S3Server as mock.

The setup is that I have a service that wraps calls to the AWSSDK.S3 api. I then write tests, where the AWSSDK.S3 api connects to the S3Server mock.

I get a System.FormatException when running the tests locally as my windows regional settings is set to Danish.

System.FormatException
The string 'man, 29 jan. 2024 13:48:27 GMT' was not recognized as a valid DateTime. There is an unknown word starting at index '0'.
   at System.DateTimeParse.Parse(ReadOnlySpan`1 s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.Convert.ToDateTime(String value, IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Amazon.S3.Model.Internal.MarshallTransformations.S3Transforms.ToDateTime(String value)
   at Amazon.S3.Model.Internal.MarshallTransformations.GetObjectResponseUnmarshaller.UnmarshallResult(XmlUnmarshallerContext context, GetObjectResponse response)
   at Amazon.S3.Model.Internal.MarshallTransformations.GetObjectResponseUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
   at Amazon.Runtime.Internal.Transform.XmlResponseUnmarshaller.Unmarshall(UnmarshallerContext input)
   at Amazon.S3.Model.Internal.MarshallTransformations.S3ReponseUnmarshaller.Unmarshall(UnmarshallerContext input)
   at Amazon.Runtime.Internal.Transform.ResponseUnmarshaller.UnmarshallResponse(UnmarshallerContext context)
   at Amazon.Runtime.Internal.Unmarshaller.UnmarshallResponse(UnmarshallerContext context, IRequestContext requestContext)
   at Amazon.Runtime.Internal.Unmarshaller.UnmarshallAsync(IExecutionContext executionContext)
   at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3ResponseHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.S3Express.S3ExpressPreSigner.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
   at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
   at LetDialog.Infrastructure.Common.S3StorageClient.GetFileAsync(Guid id, CancellationToken cancellationToken) in C:\Users\mema\source\letdialog\source\Infrastructure\Common\S3StorageClient.cs:line 32
   at LetDialog.Tests.IntegrationTests.Infrastructure.S3StorageClientTests.Storageclient_can_retrieve_saved_file_using_s3() in C:\Users\mema\source\letdialog\source\Tests.IntegrationTests\Infrastructure\S3StorageClientTests.cs:line 20
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_0.<<InvokeTestMethodAsync>b__1>d.MoveNext() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:line 285
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:line 48
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in /_/src/xunit.core/Sdk/ExceptionAggregator.cs:line 90

It works fine, when the regional settings is set to english.
I believe this might be fixed by adding an IFormatProvider, where ToString is called.

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.