more htts file code

This commit is contained in:
2020-07-09 09:54:13 +00:00
parent ffcea4095a
commit 953dbd730b
5 changed files with 104 additions and 22 deletions

View File

@ -964,8 +964,10 @@ if (mio_htre_getcontentlen(req) > 0)
x = mio_svc_htts_dothr(htts, csck, req, on_htts_thr_request, MIO_NULL);
else if (mio_comp_bcstr_limited(qpath, "/txt/", 5, 1) == 0)
x = mio_svc_htts_dotxt(htts, csck, req, 200, "text/plain", qpath);
else
else if (mio_comp_bcstr_limited(qpath, "/cgi/", 5, 1) == 0)
x = mio_svc_htts_docgi(htts, csck, req, "", mio_htre_getqpath(req));
else
x = mio_svc_htts_dofile(htts, csck, req, "", mio_htre_getqpath(req));
if (x <= -1) goto oops;
return 0;