mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 13:33:13 +00:00
updates
This commit is contained in:
@ -265,7 +265,7 @@ namespace Esyur.Net.HTTP
|
||||
try
|
||||
{
|
||||
var ims = DateTime.Parse(Request.Headers["if-modified-since"]);
|
||||
if (Math.Abs((fileEditTime - ims).TotalSeconds) < 0)
|
||||
if ((fileEditTime - ims).TotalSeconds < 2)
|
||||
{
|
||||
Response.Number = HTTPResponsePacket.ResponseCode.NotModified;
|
||||
//Response.Text = "Not Modified";
|
||||
@ -274,7 +274,7 @@ namespace Esyur.Net.HTTP
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,18 +100,7 @@ namespace Esyur.Net.HTTP
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
public enum ResponseCodes : int
|
||||
{
|
||||
HTTP_OK = 200,
|
||||
HTTP_NOTFOUND = 404,
|
||||
HTTP_SERVERERROR = 500,
|
||||
HTTP_MOVED = 301,
|
||||
HTTP_NOTMODIFIED = 304,
|
||||
HTTP_REDIRECT = 307
|
||||
}
|
||||
|
||||
|
||||
|
||||
public HTTPSession CreateSession(string id, int timeout)
|
||||
{
|
||||
@ -322,9 +311,7 @@ namespace Esyur.Net.HTTP
|
||||
// else
|
||||
listener = new TCPSocket(new IPEndPoint(ipAdd, Port));
|
||||
|
||||
Start(listener,
|
||||
Timeout,
|
||||
Clock);
|
||||
Start(listener);
|
||||
}
|
||||
else if (trigger == ResourceTrigger.Terminate)
|
||||
{
|
||||
|
Reference in New Issue
Block a user