some minor touch-up only

This commit is contained in:
hyung-hwan 2023-01-07 04:06:31 +00:00
parent 5fb0e5c923
commit d2efac3ce2
3 changed files with 11 additions and 12 deletions

View File

@ -27,8 +27,6 @@
#include "hio-prv.h"
typedef struct hio_svc_fcgic_conn_t hio_svc_fcgic_conn_t;
struct hio_svc_fcgic_t
@ -292,7 +290,7 @@ static hio_svc_fcgic_sess_t* new_session (hio_svc_fcgic_t* fcgic, const hio_skad
hio_svc_fcgic_sess_t* newptr;
newcapa = conn->sess.capa + CONN_SESS_INC;
newptr = hio_reallocmem (hio, conn->sess.ptr, HIO_SIZEOF(*sess) * newcapa);
newptr = hio_reallocmem(hio, conn->sess.ptr, HIO_SIZEOF(*sess) * newcapa);
if (HIO_UNLIKELY(!newptr)) return HIO_NULL;
for (i = conn->sess.capa ; i < newcapa; i++)
@ -377,3 +375,9 @@ int hio_svc_fcgic_write (hio_svc_fcgic_sess_t* sess, const void* data, hio_iolen
{
return 0;
}
int hio_svc_fcgic_beginreq (hio_svc_fcgic_sess_t* sess)
{
}

View File

@ -67,8 +67,8 @@ typedef struct hio_htrd_recbs_t hio_htrd_recbs_t;
struct hio_htrd_recbs_t
{
int (*peek) (hio_htrd_t* htrd, hio_htre_t* re);
int (*poke) (hio_htrd_t* htrd, hio_htre_t* re);
int (*peek) (hio_htrd_t* htrd, hio_htre_t* re); /* called when the end of a request header is seen. */
int (*poke) (hio_htrd_t* htrd, hio_htre_t* re); /* called when a complete request is read including content */
int (*push_content) (hio_htrd_t* htrd, hio_htre_t* re, const hio_bch_t* data, hio_oow_t len);
};

View File

@ -286,11 +286,10 @@ static int fcgi_send_final_status_to_client (fcgi_t* fcgi, int status_code, int
(force_close && fcgi_write_to_client(fcgi, HIO_NULL, 0) <= -1))? -1: 0;
}
static int fcgi_client_htrd_poke (hio_htrd_t* htrd, hio_htre_t* req)
{
/* client request got completed */
hio_svc_htts_cli_htrd_xtn_t* htrdxtn = (hio_svc_htts_cli_htrd_xtn_t*)hio_htrd_getxtn(htrd);
hio_dev_sck_t* sck = htrdxtn->sck;
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
@ -314,6 +313,7 @@ static int fcgi_client_htrd_push_content (hio_htrd_t* htrd, hio_htre_t* req, con
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
fcgi_t* fcgi = (fcgi_t*)cli->rsrc;
/* TODO: THIS must be written to the peer as FCGI_DATA */
HIO_ASSERT (sck->hio, cli->sck == sck);
return fcgi_write_to_peer(fcgi, data, dlen);
}
@ -325,7 +325,6 @@ static hio_htrd_recbs_t fcgi_client_htrd_recbs =
fcgi_client_htrd_push_content
};
static void fcgi_client_on_disconnect (hio_dev_sck_t* sck)
{
hio_svc_htts_cli_t* cli = hio_dev_sck_getxtn(sck);
@ -442,10 +441,6 @@ oops:
return 0;
}
static void fcgi_on_kill (fcgi_t* fcgi)
{
hio_t* hio = fcgi->htts->hio;