added qse_fs_setopt() & qse_fs_getopt().

added QSE_FS_CBS and changed qse_fs_del() to call cbs.del() if available
This commit is contained in:
2014-11-26 15:14:24 +00:00
parent cbb7991ca8
commit 5f61505860
21 changed files with 570 additions and 237 deletions

View File

@ -505,12 +505,12 @@ qse_htrd_errnum_t qse_htrd_geterrnum (qse_htrd_t* htrd)
return htrd->errnum;
}
int qse_htrd_getoption (qse_htrd_t* htrd)
int qse_htrd_getopt (qse_htrd_t* htrd)
{
return htrd->option;
}
void qse_htrd_setoption (qse_htrd_t* htrd, int opts)
void qse_htrd_setopt (qse_htrd_t* htrd, int opts)
{
htrd->option = opts;
}

View File

@ -1469,7 +1469,7 @@ static int task_main_cgi (
xtn->task = task;
xtn->client = client;
qse_htrd_setrecbs (cgi->script_htrd, &cgi_script_htrd_cbs);
qse_htrd_setoption (
qse_htrd_setopt (
cgi->script_htrd,
QSE_HTRD_SKIPINITIALLINE |
QSE_HTRD_PEEKONLY |

View File

@ -1039,7 +1039,7 @@ static int task_init_proxy (
/* the caller must make sure that the actual content is discarded or completed
* and the following data is treated as contents */
QSE_ASSERT (arg->req->state & (QSE_HTRE_DISCARDED | QSE_HTRE_COMPLETED));
/*QSE_ASSERT (qse_htrd_getoption(client->htrd) & QSE_HTRD_DUMMY);*/
/*QSE_ASSERT (qse_htrd_getopt(client->htrd) & QSE_HTRD_DUMMY);*/
proxy->req = arg->req;
qse_htre_setconcb (proxy->req, proxy_snatch_client_input_raw, task);
@ -2363,7 +2363,7 @@ static int task_main_proxy (
xtn->client = client;
xtn->task = task;
qse_htrd_setrecbs (proxy->peer_htrd, &proxy_peer_htrd_cbs);
qse_htrd_setoption (proxy->peer_htrd, QSE_HTRD_RESPONSE | QSE_HTRD_TRAILERS);
qse_htrd_setopt (proxy->peer_htrd, QSE_HTRD_RESPONSE | QSE_HTRD_TRAILERS);
}
proxy->res = qse_mbs_open (httpd->mmgr, 0, 256);

View File

@ -647,7 +647,7 @@ static qse_httpd_client_t* new_client (qse_httpd_t* httpd, qse_httpd_client_t* t
if (qse_httpd_insert_timer_event (httpd, &idle_event, &client->tmr_idle) <= -1) goto oops;
}
qse_htrd_setoption (client->htrd, QSE_HTRD_REQUEST | QSE_HTRD_TRAILERS | QSE_HTRD_CANONQPATH);
qse_htrd_setopt (client->htrd, QSE_HTRD_REQUEST | QSE_HTRD_TRAILERS | QSE_HTRD_CANONQPATH);
/* copy the public fields,
* keep the private fields initialized at 0 */