written more ursd code

This commit is contained in:
2014-08-27 17:39:31 +00:00
parent 4195be2c84
commit f27f5a650e
4 changed files with 418 additions and 180 deletions

View File

@ -1946,6 +1946,7 @@ static void on_url_rewritten (qse_httpd_t* httpd, const qse_mchar_t* url, const
proxy->flags &= ~PROXY_REWRITE_URL;
printf ("XXXXXXXXXXXXXXXXXXXXXXXXXX URL REWRITTEN TO [%s].....\n", new_url);
if (new_url[0] == QSE_MT('\0'))
{
/* no change. carry on */

View File

@ -221,10 +221,11 @@ static int urs_recv (qse_httpd_t* httpd, qse_httpd_urs_t* urs, qse_ubi_t handle)
urs_pkt_t* pkt;
urs_req_t* req;
printf ("URS_RECV....\n");
printf ("URS_RECV............................................\n");
httpd_xtn = qse_httpd_getxtn (httpd);
/* TODO: use recvmsg with MSG_ERRQUEUE... set socket option IP_RECVERR... */
fromlen = QSE_SIZEOF(fromaddr);
len = recvfrom (handle.i, dc->rcvbuf, QSE_SIZEOF(dc->rcvbuf) - 1, 0, (struct sockaddr*)&fromaddr, &fromlen);
@ -348,6 +349,7 @@ static int urs_send (qse_httpd_t* httpd, qse_httpd_urs_t* urs, const qse_mchar_t
qse_tmr_event_t tmout_event;
printf ("... URS_SEND.....................\n");
httpd_xtn = qse_httpd_getxtn (httpd);
if (dc->req_count >= QSE_COUNTOF(dc->reqs))