Skip to content

Commit

Permalink
Merge pull request #16 from benny856694/master
Browse files Browse the repository at this point in the history
Add invariant culture when call ToString() in case non-English locale…
  • Loading branch information
geoperez committed May 20, 2015
2 parents c07cf97 + be0f5c7 commit 9466d1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Unosquare.Labs.EmbedIO/Modules/StaticFilesModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Unosquare.Labs.EmbedIO.Modules
{
using System;
using System.Globalization;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -217,7 +218,7 @@ private bool HandleGet(HttpListenerContext context, WebServer server, bool sendB
}

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

0 comments on commit 9466d1c

Please sign in to comment.