adding directory name formatter callback to hio_svc_htts_dofile() - not finished yet

This commit is contained in:
2022-12-21 14:57:52 +00:00
parent 85616b1658
commit 9e285bcc1e
7 changed files with 52 additions and 27 deletions

View File

@ -976,7 +976,7 @@ if (hio_htre_getcontentlen(req) > 0)
else if (hio_comp_bcstr_limited(qpath, "/cgi/", 5, 1) == 0)
x = hio_svc_htts_docgi(htts, csck, req, "", qpath + 4, 0);
else
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0);
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0, HIO_NULL);
if (x <= -1) goto oops;
}
#if 0

View File

@ -211,7 +211,7 @@ if (hio_htre_getcontentlen(req) > 0)
x = hio_svc_htts_dofcgi(htts, csck, req, &fcgis_addr, 0);
}
else
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0);
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0, HIO_NULL);
if (x <= -1) goto oops;
}
#if 0

View File

@ -84,7 +84,7 @@ static int process_http_request (hio_svc_htts_t* htts, hio_dev_sck_t* csck, hio_
else // if (mth == HIO_HTTP_GET || mth == HIO_HTTP_POST)
{
/* TODO: proper mime-type */
if (hio_svc_htts_dofile(htts, csck, req, ext->docroot, qpath, HIO_NULL, 0) <= -1) goto oops;
if (hio_svc_htts_dofile(htts, csck, req, ext->docroot, qpath, HIO_NULL, 0, HIO_NULL) <= -1) goto oops;
}
#if 0
else