moved more htts task fields to the header side

This commit is contained in:
2023-03-05 00:55:15 +09:00
parent ba037f1c71
commit 0ed8b13259
13 changed files with 287 additions and 200 deletions

View File

@@ -197,21 +197,21 @@ if (hio_htre_getcontentlen(req) > 0)
const hio_bch_t* qpath = hio_htre_getqpath(req);
int x;
if (hio_comp_bcstr_limited(qpath, "/thr/", 5, 1) == 0)
x = hio_svc_htts_dothr(htts, csck, req, on_htts_thr_request, HIO_NULL, HIO_SVC_HTTS_THR_NO_100_CONTINUE);
x = hio_svc_htts_dothr(htts, csck, req, on_htts_thr_request, HIO_NULL, HIO_SVC_HTTS_THR_NO_100_CONTINUE, HIO_NULL);
else if (hio_comp_bcstr_limited(qpath, "/thr2/", 6, 1) == 0)
x = hio_svc_htts_dothr(htts, csck, req, on_htts_thr2_request, HIO_NULL, HIO_SVC_HTTS_THR_NO_100_CONTINUE);
x = hio_svc_htts_dothr(htts, csck, req, on_htts_thr2_request, HIO_NULL, HIO_SVC_HTTS_THR_NO_100_CONTINUE, HIO_NULL);
else if (hio_comp_bcstr_limited(qpath, "/txt/", 5, 1) == 0)
x = hio_svc_htts_dotxt(htts, csck, req, HIO_HTTP_STATUS_OK, "text/plain", qpath, 0);
x = hio_svc_htts_dotxt(htts, csck, req, HIO_HTTP_STATUS_OK, "text/plain", qpath, 0, HIO_NULL);
else if (hio_comp_bcstr_limited(qpath, "/cgi/", 5, 1) == 0)
x = hio_svc_htts_docgi(htts, csck, req, "", qpath + 4, 0);
x = hio_svc_htts_docgi(htts, csck, req, "", qpath + 4, 0, HIO_NULL);
else if (hio_comp_bcstr_limited(qpath, "/fcgi/", 5, 1) == 0)
{
hio_skad_t fcgis_addr;
hio_bcstrtoskad(hio, "127.0.0.1:9000", &fcgis_addr);
x = hio_svc_htts_dofcgi(htts, csck, req, &fcgis_addr, "", qpath + 5, 0);
x = hio_svc_htts_dofcgi(htts, csck, req, &fcgis_addr, "", qpath + 5, 0, HIO_NULL);
}
else
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0, HIO_NULL);
x = hio_svc_htts_dofile(htts, csck, req, "", qpath, "text/plain", 0, HIO_NULL, HIO_NULL);
if (x <= -1) goto oops;
}
#if 0