jchristn / s3server Goto Github PK
View Code? Open in Web Editor NEWEmulated Amazon Web Services (AWS) Simple Storage Service (S3) server-side interface.
License: MIT License
Emulated Amazon Web Services (AWS) Simple Storage Service (S3) server-side interface.
License: MIT License
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.
I want to create web app in .NET 8 and listen for requests on port 443.
According to examples instance of S3Server is using different port (8000).
Is it possibe to use the same port?
Is it possible to not use Watson server and pass requests from web app to S3Server library?
Thanks for help!
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.