You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidrequest(request_trequest, response_tresponse)
{
// If no path given, just serve index.htmlif(http_url_none(request.url))
{
http_serve_static(response, "index.html", "Content-Type: text/html");
}
else
{
// Otherwise, get serve any requested file// Get the contentype of the filechar*contentType=http_content_type_from_file(request.url);
// Try to serve the fileintserve_status=http_serve_static(response, request.url, contentType);
// If it fails, just serve a default 404 pageif(serve_status==HTTP_SERVE_ERR)
{
http_serve_404(response);
}
}
}