I'm developing an application with an internal web server that displays html static pages in Chromium cefsharp. The pages have some tags within them, and then a buffer processing is made before passing it to the browser.
the code that passes the browser to the html page buffer is as follows:
if (Path.GetExtension(filename).ToLower() == ".htm" || Path.GetExtension(filename).ToLower() == ".html")
{
string responseBuf = template.doTemplating(Encoding.UTF8.GetString(buffer));
buffer = Encoding.UTF8.GetBytes(responseBuf);
}
context.Response.OutputStream.Write(buffer, 0, buffer.Length);
The question is: why a blank page is displayed. Note that the buffer actually contains the entire html page processed.