Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9466d1c

Browse files
committedMay 20, 2015
Merge pull request #16 from benny856694/master
Add invariant culture when call ToString() in case non-English locale…
2 parents c07cf97 + be0f5c7 commit 9466d1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎Unosquare.Labs.EmbedIO/Modules/StaticFilesModule.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Unosquare.Labs.EmbedIO.Modules
22
{
33
using System;
4+
using System.Globalization;
45
using System.Collections.Concurrent;
56
using System.Collections.Generic;
67
using System.IO;
@@ -217,7 +218,7 @@ private bool HandleGet(HttpListenerContext context, WebServer server, bool sendB
217218
}
218219

219220
// check to see if the file was modified or etag is the same
220-
var utcFileDateString = fileDate.ToUniversalTime().ToString(Constants.BrowserTimeFormat);
221+
var utcFileDateString = fileDate.ToUniversalTime().ToString(Constants.BrowserTimeFormat, CultureInfo.InvariantCulture);
221222
if (eTagValid || context.RequestHeader(Constants.HeaderIfModifiedSince).Equals(utcFileDateString))
222223
{
223224
context.Response.AddHeader(Constants.HeaderCacheControl, "private");

0 commit comments

Comments
 (0)
Please sign in to comment.