MIME types
This commit is contained in:
parent
2e444a4978
commit
8b6bf01f5c
|
@ -80,24 +80,28 @@ int httpd::req_handler(void * cls,
|
||||||
|
|
||||||
rsp = MHD_create_response_from_buffer(sHtmlCssSize, (void*)sHtmlCssFile, MHD_RESPMEM_PERSISTENT);
|
rsp = MHD_create_response_from_buffer(sHtmlCssSize, (void*)sHtmlCssFile, MHD_RESPMEM_PERSISTENT);
|
||||||
MHD_add_response_header(rsp, "ETag", sHtmlCssEtag);
|
MHD_add_response_header(rsp, "ETag", sHtmlCssEtag);
|
||||||
|
MHD_add_response_header(rsp, "Content-Type", "text/css; charset=utf-8");
|
||||||
}
|
}
|
||||||
else if(strcasecmp(url, "/h") == 0 || strcasecmp(url, "/hashrate") == 0)
|
else if(strcasecmp(url, "/h") == 0 || strcasecmp(url, "/hashrate") == 0)
|
||||||
{
|
{
|
||||||
executor::inst()->get_http_report(EV_HTML_HASHRATE, str);
|
executor::inst()->get_http_report(EV_HTML_HASHRATE, str);
|
||||||
|
|
||||||
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
||||||
|
MHD_add_response_header(rsp, "Content-Type", "text/html; charset=utf-8");
|
||||||
}
|
}
|
||||||
else if(strcasecmp(url, "/c") == 0 || strcasecmp(url, "/connection") == 0)
|
else if(strcasecmp(url, "/c") == 0 || strcasecmp(url, "/connection") == 0)
|
||||||
{
|
{
|
||||||
executor::inst()->get_http_report(EV_HTML_CONNSTAT, str);
|
executor::inst()->get_http_report(EV_HTML_CONNSTAT, str);
|
||||||
|
|
||||||
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
||||||
|
MHD_add_response_header(rsp, "Content-Type", "text/html; charset=utf-8");
|
||||||
}
|
}
|
||||||
else if(strcasecmp(url, "/r") == 0 || strcasecmp(url, "/results") == 0)
|
else if(strcasecmp(url, "/r") == 0 || strcasecmp(url, "/results") == 0)
|
||||||
{
|
{
|
||||||
executor::inst()->get_http_report(EV_HTML_RESULTS, str);
|
executor::inst()->get_http_report(EV_HTML_RESULTS, str);
|
||||||
|
|
||||||
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
rsp = MHD_create_response_from_buffer(str.size(), (void*)str.c_str(), MHD_RESPMEM_MUST_COPY);
|
||||||
|
MHD_add_response_header(rsp, "Content-Type", "text/html; charset=utf-8");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue