|
|
|
@ -93,8 +93,8 @@ namespace Example3
|
|
|
|
if (path == "/")
|
|
|
|
if (path == "/")
|
|
|
|
path += "index.html";
|
|
|
|
path += "index.html";
|
|
|
|
|
|
|
|
|
|
|
|
var content = httpsv.GetFile (path);
|
|
|
|
byte[] contents;
|
|
|
|
if (content == null) {
|
|
|
|
if (!e.TryReadFile (path, out contents)) {
|
|
|
|
res.StatusCode = (int) HttpStatusCode.NotFound;
|
|
|
|
res.StatusCode = (int) HttpStatusCode.NotFound;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -108,7 +108,7 @@ namespace Example3
|
|
|
|
res.ContentEncoding = Encoding.UTF8;
|
|
|
|
res.ContentEncoding = Encoding.UTF8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
res.WriteContent (content);
|
|
|
|
res.WriteContent (contents);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Add the WebSocket services.
|
|
|
|
// Add the WebSocket services.
|
|
|
|
|